how to open tabs ?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: how to open tabs ?

  1. #1
    Join Date
    Jun 2012
    Posts
    2

    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

  2. #2
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,770

    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.

  3. #3
    Join Date
    Jun 2012
    Posts
    2

    Re: how to open tabs ?

    yes, how to do this ? should i remove tabs ?

  4. #4
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,770

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center