i have 4-5 forms...all of them are called by each other by some or other procedure...now i want to initialize an variable with an integer value only when my program starts....
my problem is where ever i declare the variable...the form gets called and the variable gets re-initialized...
can i declare my integer variable globally and initialize it with a value???
dim globalvariable as integer = 5
gives an error....
i might sound naive...but just hav got stuck on this..
Then add the code you need to inside of sub main but don't forget to put in your Form1.Show or your program will look like it does not even run. Next, GoTo Project>Properties and on the right there is a combo box right under the words "Startup Object:". Select Sub Main and hit OK.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...