Answer the question
In order to leave comments, you need to log in
How to connect two files in Windows Forms?
Hello!
I am doing one project in Windows forms. There are 2 documents, one is Form1.cs itself, and the second is with all classes (Classes.cs).
There is a class in Classes.cs that has a method that should draw some kind of square on the picturebox. But the joke is that although I placed the picturebox on the form, it is not displayed in Classes.cs in any way, so I can’t write a method.
Tell me how to make it so that I can call picturebox from Classes.cs?
Answer the question
In order to leave comments, you need to log in
In accordance with the principles of OOP and software development in general, dragging a dependency on the user (Form1.cs) into the used component (Classes.cs) is generally a bad idea.
What can be done:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question