|
-
May 27th, 2005, 04:47 PM
#1
Thread Starter
Hyperactive Member
is there a form-after-load event in VB?
What I want to do is:
1) Show the form;
2) Check something, if false, then just show a msgbox, then close form
if I do this in form_load event, the form does not show up when msgbox shows up. After I close msgbox, the form shows up very quick then close. I do not want see the form flashes on the screen.
what I'm doing now is:
1) show the form;
2) in load event, turn on timer, wait 2 seconds;
3) in timer event, check that.
Is there a better way to do this?
thanks
Last edited by temp_12000; May 27th, 2005 at 05:14 PM.
-
May 27th, 2005, 04:52 PM
#2
-
May 27th, 2005, 05:06 PM
#3
Fanatic Member
Re: is there a form-after-load event in VB?
if you want the form showing before the messagebox, put Me.Show just before the msgbox line.
ie.
VB Code:
Private Sub Form_Load()
Me.Show
MsgBox "My message box"
Unload Me
End Sub
-
May 27th, 2005, 05:13 PM
#4
Thread Starter
Hyperactive Member
Re: is there a form-after-load event in VB?
 Originally Posted by Blade
if you want the form showing before the messagebox, put Me.Show just before the msgbox line.
ie.
VB Code:
Private Sub Form_Load()
Me.Show
MsgBox "My message box"
Unload Me
End Sub
cool, this works. thanks for every1.
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
|