Results 1 to 3 of 3

Thread: How do I keep frm1 always on top of frm2 ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    258

    Question

    I'm using a timer slide 1 form out from behind another .
    The probem is when is when the timer goes off
    Code:
     Private Sub Timer1_Timer()
    Form2.Left = Form2.Left - 75
    If Form2.Left <= 2580 Then Timer1.Enabled = False
    End Sub
    frm 2 gets in front of frm1

    Heres the trigger
    Code:
    Private Sub Command3_Click()
    Form2.Show
    Timer1.Enabled = True
    End Sub
    and frm2 load

    Code:
    Private Sub Form_Load()
    
    Me.Top = Form1.Top
    Me.Left = Form1.Left
    Form1.SetFocus
    
    End Sub
    it would also be nice if it was locked to form1 until it was used . that way you could also move frm1 and frm2 would follow .
    Visual Basic 6 SP4 on win98se

    QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!

  2. #2
    Guest
    Maybe this thread might help? And don't make the Timer go off.

  3. #3
    Guest
    Insert a Timer and add the following to Form1
    Code:
    Private Sub Form_Load()
        Timer1.Interval = 1
        Form2.Show
    End Sub
    
    Private Sub Timer1_Timer()
        ZOrder 0
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width