-
June 14th, 2012, 04:35 AM
#1
how to open tabs ?
Hello,
i have a login form , and another form with 2 tabs , if the user is admin ( compared with the database ) i want the two tabs to open , if not only on tab !
this is my code so far and its not working ?
Code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim Connections As New MySqlConnection(" server=myserver;user id = root;password=;database=ilan;")
Dim cmd As MySqlCommand = New MySqlCommand("SELECT * FROM users WHERE username = '" & TextBox1.Text & "' AND password = '" & TextBox2.Text & "' ", Connections)
Connections.Open()
Dim sdr As MySqlDataReader = cmd.ExecuteReader()
' If the record can be queried, Pass verification and open another form.
If (sdr.Read() = True) Then
If sdr.Item("lvl") = "1" Then
' what to put here ??????
Else
End If
Else
MessageBox.Show("invalid username or password !")
End If
End Sub
End Class
-
June 14th, 2012, 06:17 AM
#2
Re: how to open tabs ?
The nature of tabs is that only one is visible at a time, while you can see all the tab names across the top.
Do you mean you only want the One tab to be available to non admin and both available to Admin
If this is the case then you could simply set the tab page to not visible.
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
June 14th, 2012, 08:03 AM
#3
Re: how to open tabs ?
yes, how to do this ? should i remove tabs ?
-
June 14th, 2012, 04:07 PM
#4
Re: how to open tabs ?
Code:
{tabpagename}.visible = false
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
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
|