VB.NET window call problem

xiaoxiao2021-03-06  40

Source code:

Private sub button1_click (byvale as system.Object, byval e as system.eventargs) Handles Button1.Click Dimf2 As New Form2 frm2.show ()

End Sub

This will generate a new Form2 window each time you click on the button.

After modification

DIM F2 AS New Form2

Private sub button1_click (byvale) Handles Button1.click if f2 is nothing or f2.isdisposed THEN

F2 = new form2

END IF

F2.show ()

End Sub

转载请注明原文地址:https://www.9cbs.com/read-51292.html

New Post(0)