*/
Know a good article or link that we're missing? Submit it!
*/

View \frmStart.frm

WinDOS Shell 0.1A

Submitted By: Shehbaz
Rating: starstarstarstarstar (Rate It)


VERSION 5.00
Object = "{4E3D9D11-0C63-11D1-8BFB-0060081841DE}#1.0#0"; "Xlisten.dll"
Object = "{EEE78583-FE22-11D0-8BEF-0060081841DE}#1.0#0"; "XVoice.dll"
Begin VB.Form frmStart
   BackColor       =   &H00000000&
   BorderStyle     =   0  'None
   Caption         =   "Password Authentication"
   ClientHeight    =   9000
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   11880
   ForeColor       =   &H00000000&
   Icon            =   "frmStart.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmStart.frx":0442
   ScaleHeight     =   9000
   ScaleWidth      =   11880
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   WindowState     =   2  'Maximized
   Begin ACTIVEVOICEPROJECTLibCtl.DirectSS DirectSS1
      Height          =   705
      Left            =   8505
      OleObjectBlob   =   "frmStart.frx":5C85
      TabIndex        =   7
      Top             =   2865
      Visible         =   0   'False
      Width           =   690
   End
   Begin ACTIVELISTENPROJECTLibCtl.DirectSR DirectSR1
      Height          =   540
      Left            =   7905
      OleObjectBlob   =   "frmStart.frx":5CDD
      TabIndex        =   6
      Top             =   2970
      Visible         =   0   'False
      Width           =   450
   End
   Begin VB.Timer Timer1
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   10005
      Top             =   5175
   End
   Begin VB.TextBox txtpassword
      BackColor       =   &H00000000&
      BorderStyle     =   0  'None
      BeginProperty Font
         Name            =   "Xenotron"
         Size            =   60
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF8080&
      Height          =   810
      IMEMode         =   3  'DISABLE
      Left            =   2565
      MaxLength       =   13
      MousePointer    =   3  'I-Beam
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   4500
      Width           =   7275
   End
   Begin VB.Label Label2
      BackStyle       =   0  'Transparent
      BeginProperty Font
         Name            =   "Xenotron"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0080FF80&
      Height          =   600
      Left            =   2385
      TabIndex        =   5
      Top             =   7305
      Width           =   6795
   End
   Begin VB.Label Label3
      BackStyle       =   0  'Transparent
      BeginProperty Font
         Name            =   "Xenotron"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0080FF80&
      Height          =   600
      Left            =   2385
      TabIndex        =   4
      Top             =   7965
      Width           =   6795
   End
   Begin VB.Label Label1
      BackStyle       =   0  'Transparent
      BeginProperty Font
         Name            =   "Xenotron"
         Size            =   27.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0080FF80&
      Height          =   675
      Left            =   2385
      TabIndex        =   3
      Top             =   6600
      Width           =   7590
   End
   Begin VB.Label lblExit
      BackStyle       =   0  'Transparent
      BeginProperty Font
         Name            =   "Courier New"
         Size            =   36
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C0C0&
      Height          =   735
      Left            =   9885
      MousePointer    =   10  'Up Arrow
      TabIndex        =   2
      Top             =   7920
      Width           =   1815
   End
   Begin VB.Label lblError
      Alignment       =   2  'Center
      BackColor       =   &H00000000&
      BeginProperty Font
         Name            =   "OCR A Extended"
         Size            =   48
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   390
      Left            =   8085
      TabIndex        =   1
      Top             =   5235
      Width           =   1650
   End
End
Attribute VB_Name = "frmStart"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim times As Integer

Public Function TellTime(h As Integer)
morn = 0
sun = 12
even = 17
night = 21
If h >= morn And h < sun Then
    Label1.Caption = "Good Morning"
Else
If h >= sun And h < even Then
    Label1.Caption = "Good Afternoon"
Else
If h >= even And h < night Then
    Label1.Caption = "Good Evening"
Else
If h >= night Then
    Label1.Caption = "Good Night"
End If
End If
End If
End If
End Function

Private Function GetIn()
txtpassword.Enabled = False
Timer1.Enabled = True
DirectSS1.Speak (Label1.Caption)
DirectSR1.Deactivate
TellTime (Hour(Time))
Label2.Caption = "Please wait...." & vbCrLf & "Loading Interface... "
Label3.Caption = "Time: " & Time & vbCrLf & "Date: " & Date
End Function

Private Sub DirectSR1_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, ByVal results As Long)
If Phrase = "enter" Then
    GetIn
    Exit Sub
End If
If Phrase = "shehbaz" Or Phrase = "open sesame" Or Phrase = "i am up to no good" Then
    lblError.Visible = False
    txtpassword.Text = ""
    txtpassword.SetFocus
End If
End Sub

Private Sub Timer1_Timer()
    Timer1.Enabled = False
    frmMain.Show vbModal
    Unload Me
End Sub

Private Sub Form_Load()
Dim morn As Integer
Dim sun As Integer
Dim even As Integer
Dim night As Integer
Dim All As Boolean
times = 0
Dim totaldata As String
  'define configuration
  '[Grammer], set language to english (1033)
  '[<Start>], define the words we are looking for
totaldata = "[Grammar]" & vbCrLf & _
"langid = 1033" & vbCrLf & _
"type=cfg" & vbCrLf & _
"[<Start>]" & vbCrLf & _
"<start>=enter" & vbCrLf & _
"<start>=Open sesame" & vbCrLf & _
"<start>=i am up to no good" & vbCrLf & _
"<start>=shehbaz" & vbCrLf
DirectSR1.GrammarFromString (totaldata)
DirectSR1.Activate
End Sub

Private Sub lblExit_Click()
frmExit.Show vbModal
End Sub

Private Sub txtpassword_Change()
If txtpassword.Text <> "" Then
lblError.Visible = True
End If
End Sub

Private Sub txtpassword_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
    End
End If
If KeyAscii = 13 Then
    If txtpassword.Text = "" Then
        GetIn
    Else
        lblError.Visible = False
        txtpassword.Text = ""
        txtpassword.SetFocus
        times = times + 1
        If times > 3 Then
            frmBomb.Show vbModal
        End If
     End If
End If
End Sub

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.