|
-
Jan 6th, 2009, 07:35 PM
#1
Thread Starter
New Member
visual basic-navagating through forms
i have to do a dialog for a company and it contains many forms and link between the forms. for example if i want a button in the menu to navagate the user to form 2 where they can proceed further. what is the code to use? simple navagtion code to take the user to wriet forms.
ill be waiting for ur response, many thanks
-
Jan 7th, 2009, 07:28 AM
#2
Re: visual basic-navagating through forms
-
Jan 7th, 2009, 07:43 AM
#3
Re: visual basic-navagating through forms
In your click event of either a menu item or button just show your new form and either hide or unload your first form.
Code:
Form2.Show
Form1.Visible = True
'Or
'Unload Form2
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 8th, 2009, 05:43 PM
#4
Thread Starter
New Member
Re: visual basic-navagating through forms
hi, i am struggling with a simple login form. i have already created the rest of the forms and now want to have a login form as my first form. i have tried the following code but nothin is comming up. please help !!
If txtusername.Text = "20620752" Then
End If
If txtpassword.Text = "lizan" Then
End If
'Accepted, continue to frmmainmenu.Show, Else Msg("Wrong Password") End IF Else Msg("Wrong Username")End IF
-
Jan 8th, 2009, 06:47 PM
#5
Re: visual basic-navagating through forms
Is this what you want?
Code:
If txtusername.Text = "20620752" Then
If txtpassword.Text = "lizan" Then
frmmainmenu.Show
Else
Msgbox "Wrong Password"
End If
Else
Msgbox "Wrong Username"
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|