|
-
Sep 14th, 2000, 12:22 AM
#1
I am having form that puts another form overlayed on top. At this time the first form is disabled, but visible partially underneath. When I display the MsgBox on the second form, my program overlies the first form over the second and then shows MsgBox on top of the first form. What I want is that the MsgBox is shown over the second form.
To sumarise, I have:
Form1 (underneath) --> SmallerForm2 (on top)
When SmallerForm2 displays Msgbox, I want:
Form1 (underneath) --> SmallerForm2 (on top) -->MsgBox (on top of SmallerForm2)
But, what I get instead is:
SmallerForm2 (underneath) --> Form1 (on top) -->MsgBox (on top of Form1)
Code in Form1:
---------------
'more than one station found, now we have to show it in the list
Form1.Enabled = False
SmallerForm2.Show
Code in SmallerForm2:
---------------------
'We must choose one entry from the list
If Module1.ListChoice = 0 Then
MsgBox "You must choose an entry from the list", vbOKOnly + vbExclamation, "Messagio"
End If
etc...
The Form1 comes on top of SmallerForm2 during the execution of MsgBox statement and once the user presses <OK>, it all returns in the right place, so obviously MsgBox does something to it. How do I stop it because I want SmallerForm2 visible underneath MsgBox.
Thanks.
-
Sep 14th, 2000, 12:31 AM
#2
Addicted Member
I'm not 100% sure if this will work, and it might have some other sideeffects but:
Code:
'Change:
SmallerForm2.Show
'To:
SmallerForm2.Show vbModal
This will always show SmallerForm2 over the top of Form1. This might help your messagebox problem but be aware that if you show the form vbModally you can never get back to Form1 as long as SmallerForm2 is still being viewed (showed - when you do SmallerForm2.Hide, or .Unload etc then Form1 will be shown again)
Just try it and see what happens,
-
Sep 14th, 2000, 12:57 AM
#3
I played around and yes, it does what I want, thanks.
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
|