I would like to know the event order of form which is executed while opening form.
I am showing my form using following code and the code in form_load event executes twice.
Once when the form variables are initialised and second when form is displayed. I want it to execute once only.
form showing code:
dim f = new myForm();
f.InitControls()
f.setUIN('222')
f.showDialog()
form_load event:
call InitControls()
here InitControls is called like:
1.) InitControls -> OK
2.) SetUIN -> OK
3.) Initcontrols -> Again executed which is Not ok
I want it in order:
1.) InitControls
2.) SetUIN
1- you call
f.InitControls()so this execute it once.2- you call
dim f = new myForm()method which callsInitializeComponent()this will execute it again.
if you want that order then call
Hope this helped.