Attribute VB_Name = "Zadavani_hesla"
Option Explicit


'----------------------------------------------------------
'zadani hesla pro vstup do karty prirazeni
'----------------------------------------------------------

Public Sub KontrolaHesla(KeyCode As Integer)

    If (StartOk = False) Then

        Select Case KeyCode
        
            Case 13
            
                ZkusHeslo
        
            Case 27
            
                Unload Frm1
            
        End Select
    
    Else
    
        Select Case KeyCode
        
            Case 13
            
                ZkusHeslo
        
            Case 27
            
                Frm1.SSTabNabidka.Tab = 0
                Frm1.FraStatus.Visible = True
                Frm1.FraHeslo.Visible = False
                
        End Select

    End If

End Sub


'----------------------------------------------------------
'kontrola spravnosti hesla
'----------------------------------------------------------

Public Sub ZkusHeslo()

    Dim i As Integer
          
    If (Frm1.TxtHeslo.Text = HesloSpravce) Then
                      
        Frm1.FraHeslo.Visible = False
        Anno = True
        Frm1.SSTabNabidka.Tab = 1
        Frm1.FraSetup.Visible = True
                
    Else
            
        Frm1.TxtHeslo.SetFocus
                
    End If
    
    Frm1.TxtHeslo.Text = ""

End Sub

