Dumb Dumb Question

Hey Folks,
I'm coming to this VB thing from an old school C++ background . .

Here is My Question
1. Let's say I have two forms formA and formB
2. My program starts and formA fills the screen. It has a button, the button says Goto formB, you click and formB comes up.

How do I do that? How do I call another form in visual basic?

Thanks,

Comments

  • : Hey Folks,
    : I'm coming to this VB thing from an old school C++ background . .
    :
    : Here is My Question
    : 1. Let's say I have two forms formA and formB
    : 2. My program starts and formA fills the screen. It has a button, the button says Goto formB, you click and formB comes up.
    :
    : How do I do that? How do I call another form in visual basic?
    :
    : Thanks,
    :


    Hi,
    In visual Basic, just give the following code in the click event of the button in the formA,

    formB.show ''The show property will automatically load the screen and will display it.

    Thats all..


  • : Hey Folks,
    : I'm coming to this VB thing from an old school C++ background . .
    :
    : Here is My Question
    : 1. Let's say I have two forms formA and formB
    : 2. My program starts and formA fills the screen. It has a button, the button says Goto formB, you click and formB comes up.
    :
    : How do I do that? How do I call another form in visual basic?
    :
    : Thanks,
    :

    if you want a button to open a different form u use this code under the buttons private sub:
    Dim frm As New formB()
    frm.ShowDialog()

    showdialog makes u unable to click on form1 while form2 is up..if u want to be able to use both just use frm.Show instead.
  • Thanks for your help. . . It's amazing two VB.net books and I couldn't find a simple example of a form calling a form.

    Thanks again,
    Kellody


    : : Hey Folks,
    : : I'm coming to this VB thing from an old school C++ background . .
    : :
    : : Here is My Question
    : : 1. Let's say I have two forms formA and formB
    : : 2. My program starts and formA fills the screen. It has a button, the button says Goto formB, you click and formB comes up.
    : :
    : : How do I do that? How do I call another form in visual basic?
    : :
    : : Thanks,
    : :
    :
    :
    : Hi,
    : In visual Basic, just give the following code in the click event of the button in the formA,
    :
    : formB.show ''The show property will automatically load the screen and will display it.
    :
    : Thats all..
    :
    :
    :

  • xiat,
    your instructions worked perfectly! Thanks, Kellody

    : : Hey Folks,
    : : I'm coming to this VB thing from an old school C++ background . .
    : :
    : : Here is My Question
    : : 1. Let's say I have two forms formA and formB
    : : 2. My program starts and formA fills the screen. It has a button, the button says Goto formB, you click and formB comes up.
    : :
    : : How do I do that? How do I call another form in visual basic?
    : :
    : : Thanks,
    : :
    :
    : if you want a button to open a different form u use this code under the buttons private sub:
    : Dim frm As New formB()
    : frm.ShowDialog()
    :
    : showdialog makes u unable to click on form1 while form2 is up..if u want to be able to use both just use frm.Show instead.
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories