Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,094 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,815 people online right now. Registration is fast and FREE... Join Now!




Controlling the Z position of a form?

 
Reply to this topicStart new topic

Controlling the Z position of a form?

lewax00
9 May, 2008 - 08:21 PM
Post #1

New D.I.C Head
*

Joined: 13 Jan, 2008
Posts: 24


My Contributions
Is there any way to control the Z position of a form except BringToFront/SendToBack? Specifically I'm trying to make it so when one form is brought to the front a second form comes up behind it. Closest I could get was something like:

CODE
Private Sub Form1_GotFocus(ByVal sender As Object, ByVal e as System.EventArgs) Handles Form1.GotFocus
Form2.BringToFront
Form1.BringToFront
End Sub


but of course that just starts a loop of switching back and forth between them because bringing Form2 to the front gives it focus, then focus returns to Form1 and sets of the event again...
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 12:11AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month