|
-
Oct 2nd, 2006, 09:53 AM
#2
Hyperactive Member
Re: Can't Show Non-Modal Form...
 Originally Posted by clarkgriswald
VB Code:
Private Sub Timer1_Timer()
Dim lProcessID As Long
Dim lID As Long
Timer1.Interval = 0
'get the process ID for prosper
lProcessID = GetWindowThreadProcessId(Me.hWnd, lID)
'close any open message boxes
CloseMessageBox lProcessID
Form2.Show '<----- DANGER, WILL ROBINSON, DANGER
End Sub
My shot in the dark would be the Form2.Show call in the timer loop is directly causing the error. If you call CloseMessageBox and it doesn't successfully close the MsgBox, then then it will try to show Form2 and blow up.
Have you stepped through your code and made sure that it is closing the MsgBox where and when it should be closing?
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
|