0

Hi

I am a new user of VB (or any prgramming for that matter) and keen to learn. A very simple example of what I was looking for was the code for a button to open another form. Does anyone know where I can access simple event proceedure codes - a sort of list of basics if you like. Any help would be appreciated.

Regards

Bernard

3
Contributors
5
Replies
6
Views
11 Years
Discussion Span
Last Post by Comatose
0

Hmn, as far as I know, The closest thing you'll get is the MSDN library, and good luck making a lot of sense of it.... a Visual Basic 6 example of this, assuming you have 2 forms, form1 and form2, would look like this in the command button:

form2.visible = true
0

Hmn, as far as I know, The closest thing you'll get is the MSDN library, and good luck making a lot of sense of it.... a Visual Basic 6 example of this, assuming you have 2 forms, form1 and form2, would look like this in the command button:

form2.visible = true

Many thanks but I have tried this without much luck. I agree that the MSDN Library is much for someone called Einstein than a humble beginner like me.

Thanks for your input anyway.

Regards

Bernard:sad:

1

You can use the show and hide
if you have tow forms form1 in which your command button is placed and form2 the one you want to go to when you click the button you can easily write in the click event of the command button

Private Sub Command2_Click()
form1.hide
form2.show
End Sub
Votes + Comments
Good Job
0

You can use the show and hide
if you have tow forms form1 in which your command button is placed and form2 the one you want to go to when you click the button you can easily write in the click event of the command button

Private Sub Command2_Click()
form1.hide
form2.show
End Sub

Nice Post lover99509, but it should be also noted that using the .hide and the .show method is significantly slower on benchmark tests than directly altering the .Visible property itself....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.