form visible at front

desperado

Well-known member
Joined
Oct 7, 2006
Messages
68
Programming Experience
Beginner
Hi, I know i might sound dumb to some but i require some help please. Its pretty simple what I am trying to do, I have a MDI container which loads some form, there are loads of forms but to make things simple i will try to explain it using 3 forms. The program works by a menu opening form 1, in that form the user opens form 2, now when the user exits form 2, form 3 should appear and should be visible at the front. I know its simple but im struggling on it, the problem i get is that form 3 appears behind the actual program, So far I have tried the following pieces of coding:

VB.NET:
Me.Close()
Dim frmreturnitems As New Form15
frmreturnitems .Show()
frmreturnitems .BringToFront()

I have also tried .Showdialogue(Me) but there are problems, as I have a textbox on form2 and form3 which holds the same data, so when form 3 appears it shows the same data as form2.

Im sorry if i sound confusing, but if anyone could help id appreciate it.

Thanks
 
Last edited by a moderator:
Did you try to activate the form? form123.Activate() is the command. Is this really related to MDI? It doesn't look so by your code. Anyway, I've moved the thread to Windows.Forms forum since this request is very Forms related. And please enter descriptive thread titles regarding the programming topic, thread was renamed.
 
TopMost have a very special meaning and even if your form "went to front" by doing it is has implications you should be aware of, it is probably not what you want. When you set TopMost no other windows can be put in front of yours unless it is minimized.
 
Oh I just realised damn, is there a way where I can have it at the front when the program runs? without the use of the minimize button? Or is there no way and I have to include the minimise button? (Its just I have set the control of the form to false and include a 'Done' button with the form)
 
Perhaps. You could also look into Owner and OwnedForms properties, they are used typically for tool forms that stay on top of only their 'parent' form. I think you have expressed what you are doing and what you want to do in a confusing way, so I don't understand.
 
Back
Top