| | |
Code examples for events (e.g. buttons) for a newbie
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2006
Posts: 8
Reputation:
Solved Threads: 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
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:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
form2.visible = true
•
•
Join Date: Jul 2006
Posts: 8
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by Comatose
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:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
form2.visible = true
Thanks for your input anyway.
Regards
Bernard
•
•
Join Date: Jul 2006
Posts: 21
Reputation:
Solved Threads: 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
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
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command2_Click() form1.hide form2.show End Sub
Last edited by Comatose; Jul 31st, 2006 at 12:01 pm.
•
•
•
•
Originally Posted by lover99509
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
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command2_Click() form1.hide form2.show End Sub
![]() |
Similar Threads
- how to write code for update,delete,cancel buttons in datagrid using vb.net only..plz (IT Professionals' Lounge)
- Validation control (ASP.NET)
- Buttons created dynamically VS. events (Python)
- Mouse over buttons on .js file? Urgent-help (JavaScript / DHTML / AJAX)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: how to pass a form to another form
- Next Thread: Check if time is equal = a certain time
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






