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

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

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:

Is this in vb6, or .NET? If it's in VB4, 5, or 6, post the project in a .zip and I'll check it out.

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
commented: Good Job +5

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....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.