VB6 variable initialization problem

xiaoxiao2021-03-06  22

New construction, two new forms, as follows: form1: Private Sub Command1_Click () Form2.Show 1End Sub Form2: Private i As IntegerPrivate Sub Command1_Click () i = 23234 Unload MeEnd SubPrivate Sub Form_Load () Debug.Print iEnd Sub section Press the button 1 button, you know that the default is 0. If the form 2 presses the button exits, enter the form 2 again, at which time the variable is 23234. This is because VB seems to have no initialization every time if form2.show 1 is changed to DIM II as new form2 Ii.show 1 will not

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

New Post(0)