-
1) In , modify the program class.
using system;
using ;
using ;
using ;
Application.
The main entry point.
stathread]
static void main();
Use form2 in the project as the launch form.
2) Get the startup form.
In your program, use the following ** to get the startup form.
-
As an example, hope it helps. ** Private void buttonconfirm click(object sender, eventargs e) result.
-
Form is also a class, and the objects of this class are no different from others, as long as they are public, they can all be accessed by each other, not necessarily static
In a WinForm program, the Form object is usually a horizontal relationship, and the ** written is usually below this level, so you will feel that you don't know how to reference the desired window object (as long as the object is referenced, the public members in the object can be accessed), in fact, it is very simple, two methods, 1A record of all window objects is kept at the upper level of the form (e.g. your first window) so that all windows can access each other.
2.If the window has a strong affiliation, you can use it as a private member of the window that generated (or opened) it.
-
Add that from to the current project on the basis of the public static variable, use the namespace or package that you want to reference form in your current class, and then create the object, and click the fromVariable name.
-
new form() and bring the variable over form1
string str1 = ;
public form1() construct the function.
form2string str2 = ;
public form2(string str1).
-
Why doesn't it work?
Also, you can make another class, set the member to public, and transfer through this class.
-
new myform().showdialog();myform is the form you're going to open.
If your form is in another project, you need to right-click on the current project to add the app.
-
Declaring an object, and then the object's show() will do. It's simple.
-
InitializeComponent() is used to initialize the interface.
c is also main. WinForm programs are event-driven.
The console program is similar to C++. You can see it by selecting the console when you create it.
That's what I know. Still learning.
-
Overload the form2 constructor, pass the form1 object to form2, use show() when form2 displays, and use the passed object in form2 to get the current form1 running state.
-
It's hard to put into words, but here's the way: you go and learn about multithreading and non-modal windows.
-
private void createform(string strname)
You can try to do it with reflexes.
-
What are you going to read? Please make the problem clear, or no one will take care of you.
using system;
using ; >>>More
int sum=0;
for(int i = 0 ;i< -1;i++) assumes that the ID of the datalist is datalist1 >>>More
function getsqlserverlist(strings:tstrings):boolean;
The function is implemented as follows: >>>More
Generally refers to floppy disks for DOS.
Now there are also discs that can be used without an operating system. >>>More
The simplest and most complex method.
Iterate through each element of one vector and find the same in the other. >>>More