cannot keep form topmost

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a parent(container) form which opens another form, and that one opens
another etc.., each form is open with Form.MdiParent = Me.MdiParent. (apart
from the first one which is just "= Me")

However, there is one form which is smaller than others, and i have set it
to Topmost = TRUE.

but the problem is when i click those forms at the background, the smaller
one will go disappear into background. How come? I thought it meant to stay
ontop, no?

Please help as I want it to stay ontop forever until i want to close it.
many thanks,
jon
 
when you call the child forms, are you using form.show or form.showdialog ?
showdialog makes the form modal, that will keep it on top, but limit your
functionality a bit...
 
I used form.show( )
I cannot use form.showdialogue, it gives me compile error.
 
I did some quick experimentation with this and found that if you set the
small form's TopMost property
to True at *Design Time* then you get the problem you describe (that is, it
doesn't stay on top).

However, I tried the following code block at runtime and it seemed to do the
trick.
See if it works for you:

Code:
Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem9.Click
Dim fp As New frmPredator
fp.Show()
fp.TopMost = True
End Sub
Ged Mead
 
I meant to mention - It seems that if you have more than one form with its
TopMost property
set to True then none of the forms remain as TopMost. This is the case
whether you set the
TopMost properties of the forms either at design time or at run time.

Ged Mead
 
I cannot use form.showdialogue, it gives me compile error.

Did you spell it that way? 'showdialogue' ? It must be form.showdialog.
What compiler error are you getting? That should work.


--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
Chris,

This is about MDI and in my opinion is the answer already given by Ged
Medhead

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top