-
Checking form status
Hello,
There are there forms [frmMain,frm1,frm2] in my application [vb.net].
How can I check one Form has been loaded or not from frmMain?
Any help would be appreciated.
-
One way is by using TypeName
Code:
If TypeName(frm1) <> "Nothing" Then
MessageBox.Show("Loaded!")
Else
MessageBox.Show("Not Loaded!")
End If
-
I can't. How should i do?:-(
-
The simplest way to do this is using a static (shared) variable as flag.
Set it to false on default and turn it to true on the form load event.
-
Thanks.oupoi.
Actually, we can use global variable in module. I don't want to use like that.
Because, If we have many forms, we will need to declare many variable.I think it is not good for performance.
In V6, I think we can use "App.PrevInstance".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|