|
-
Jan 5th, 2001, 01:25 AM
#1
Thread Starter
Junior Member
How to check whether a form is loaded or no after it has been hidden using hide method.
AS FAST AS POSSIBLE
Eswar
-
Jan 5th, 2001, 01:39 AM
#2
Why don't you set a bool variable to true in the form's load procedure.. then you could check that variable if it is true, it is loaded, if not, then it isn't...
-
Jan 5th, 2001, 01:39 AM
#3
You can set the Me.tag to hid or shown and check that.
-
Jan 5th, 2001, 02:23 AM
#4
transcendental analytic
The form won't unload with hide method, if it's not loaded then it will actually load.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jan 5th, 2001, 02:30 AM
#5
PowerPoster
Juz use the FindWindow API will do.
Code:
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Long, ByVal lpWindowName As String) As Long
Private Sub Command1_Click()
Load Form2
End Sub
Private Sub Command2_Click()
Form2.Show
End Sub
Private Sub Command3_Click()
Form2.Hide
End Sub
Private Sub Command4_Click()
Dim handle As Long
handle = FindWindow(0, "Form2")
If handle <> 0 Then
If Not Form2.Visible Then
MsgBox "Form2 is loaded but not visible."
Else
MsgBox "Form2 is loaded and is visible to all."
End If
Else
MsgBox "Form2 is not loaded"
End If
End Sub
Cheers!
-
Jan 5th, 2001, 02:55 AM
#6
Fanatic Member
-
Jan 5th, 2001, 03:38 AM
#7
PowerPoster
yes, faisalkm. Hide will not unload the form. As from the name hide mean set the form to invisible.
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
|
Click Here to Expand Forum to Full Width
|