Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about MDI parent/child forms

Status
Not open for further replies.

plunkett

Technical User
Joined
Jun 10, 2004
Messages
57
Location
US
This is actually a two part question, the first part being the most important.

1) I have a MDI parent form that loads. Then I have a second form that I want to be on top of the parent form (but not within the MDI shell) that should ask for user input. The second form is kind of like a modal, but I want the user to see the MDI parent form beneath it. How do I accomplish this? I've tried setting the second form to be a child of the MDI parent, but then it is confined within the MDI shell. If it's not set as a child, then I can't keep the form on top (BringToFront doesn't work), and if i use frm.ShowDialog() the MDI parent isn't visible until after the top form is closed out of... any ideas?

2) Is there a good tabbed MDI component for vb.net 2008? I'm actually trying to find a more mIRC style MDI manager that allows me to quickly switch between child forms, but tabs will work too.
 
For your first question, put a timer with an interval of 1000 or so on the parent form and start this timer in the form's load event handler. In the timer's Tick event, stop the timer and open the second form with ShowDialog.


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Ahh, sounds like that would work... Is that the best practice for this scenario?
 
I don't know if it's "best practice" or not, but it's simple, it works and it's how I have done similar things in the past.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
I didn't get what your question is (sorry). But maybe this is what you are going to achieve:
Code:
SecondForm.Owner = MyMDIParent
SecondForm.Show()

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top