locked
call form from another Form RRS feed

  • Question

  • I want to call form from another Form but i want the first Form is Enabled
    i make this  in Button1 of form1 

    fim frm2 as new form2
    frm2.show
     but how to make Form1 is focus if form2 take this focus

    Saturday, May 12, 2007 4:18 PM

Answers

  • If you mean this:

     

    You got a form (frm1), and you want to start a new form (frm2). Then focus on the first form (frm1)

     

    use this piece of code:

     

    Code Snippet

    Dim frm2 As New from2()

    frm2.Show() ' or showdialog() to make this a sub-form of frm1.

    frm1.Focus() ' focus frm1

     

     

    Hope I'd understand you right
    Saturday, May 12, 2007 5:19 PM

All replies

  • If you mean this:

     

    You got a form (frm1), and you want to start a new form (frm2). Then focus on the first form (frm1)

     

    use this piece of code:

     

    Code Snippet

    Dim frm2 As New from2()

    frm2.Show() ' or showdialog() to make this a sub-form of frm1.

    frm1.Focus() ' focus frm1

     

     

    Hope I'd understand you right
    Saturday, May 12, 2007 5:19 PM
  • i solve my problem
    the Soln. 


      Dim frm2 As New Form2

            frm2.Show()
            Me.Focus()

    Saturday, May 12, 2007 7:21 PM