home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Cafe
- BackColor = &H00000000&
- BorderStyle = 0 'None
- ClientHeight = 6945
- ClientLeft = 0
- ClientTop = 375
- ClientWidth = 9660
- ClipControls = 0 'False
- ControlBox = 0 'False
- Height = 7380
- Icon = "Cafe.frx":0000
- Left = -60
- LinkTopic = "Cafe"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 9200
- ScaleMode = 0 'User
- ScaleWidth = 9660
- ShowInTaskbar = 0 'False
- Top = 0
- Width = 9780
- WindowState = 2 'Maximized
- Begin VB.Timer Timer2
- Enabled = 0 'False
- Interval = 1000
- Left = 7110
- Top = 4305
- End
- Begin VB.TextBox txtTime
- Height = 360
- Left = 5265
- Locked = -1 'True
- TabIndex = 7
- Top = 3120
- Visible = 0 'False
- Width = 1815
- End
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 60000
- Left = 6315
- Top = 4290
- End
- Begin VB.CommandButton cmdLogOn
- Caption = "Log On"
- Height = 360
- Left = 2670
- TabIndex = 6
- Top = 3120
- Visible = 0 'False
- Width = 915
- End
- Begin VB.TextBox txtPass
- Height = 360
- Left = 3975
- PasswordChar = "*"
- TabIndex = 5
- Top = 3120
- Width = 1020
- End
- Begin VB.Label Label6
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "Click Here To Log Off"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Nuptial BT"
- Size = 14.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 375
- Left = 3075
- TabIndex = 8
- Top = 5580
- Visible = 0 'False
- Width = 3315
- End
- Begin VB.Label Label5
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = " Or Click Here To Play Games Offline"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Nuptial BT"
- Size = 14.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000C000&
- Height = 615
- Left = 2970
- TabIndex = 4
- Top = 4560
- Visible = 0 'False
- Width = 3225
- End
- Begin VB.Label Label4
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = " Password Correct Click Here To Connect"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Nuptial BT"
- Size = 15.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000C000&
- Height = 780
- Left = 2970
- TabIndex = 3
- Top = 3630
- Visible = 0 'False
- Width = 3300
- End
- Begin VB.Label Label3
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "To Connect To The Internet Enter Your Password"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 24
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 1155
- Left = 1110
- TabIndex = 2
- Top = 1920
- Width = 7305
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "Welcome To"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Nuptial BT"
- Size = 36
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FFC0FF&
- Height = 810
- Left = 2145
- TabIndex = 1
- Top = 75
- Width = 4860
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Internet Cafe"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Nuptial BT"
- Size = 72
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FFFFFF&
- Height = 1560
- Left = 465
- TabIndex = 0
- Top = 465
- Width = 8190
- End
- Attribute VB_Name = "Cafe"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cmdLogOn_Click()
- Dim strResult As String * 60 'no variable length strings allowed
- Dim lngResult As Long
- Dim strFileName As String
- strFileName = App.Path & "\Passwords.ini"
- On Error GoTo Err
- If txtPass.Text = "" Then Exit Sub 'must type something
- lngResult = GetPrivateProfileString("Passwords", _
- txtPass.Text, strFileName, strResult, Len(strResult), _
- strFileName)
- txtTime.Text = Trim(strResult)
- If Len(txtTime.Text) > 3 Then '999 minute limit
- 'a longer return string means there was no entry and
- 'a filename was returned
- MsgBox "Password is invalid."
- txtPass.Text = "" 'reset
- txtPass.SetFocus 'get cursor back to textbox
- cmdLogOn.Visible = False
- ElseIf txtTime.Text = "0" Then
- MsgBox "Time has expired on this password."
- txtPass.Text = ""
- txtPass.SetFocus
- MsgBox "Remember to Log Off when finished or your time will continue. Please close all programs before you Log Off or time expires."
- Timer2.Enabled = False 'turn everything on for user
- cmdLogOn.Visible = False
- Label4.Visible = True
- Label5.Visible = True
- Label6.Visible = True
- Timer1.Enabled = True
- txtTime.Visible = True
- txtPass.Visible = False
- txtTime.Text = txtTime.Text & " minutes remaining."
- End If
- Exit Sub
- MsgBox "Error"
- End Sub
- Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
- KeyLog KeyCode, Shift 'this is for the admin password only
- End Sub
- Private Sub Form_Load()
- AdjustForm Me
- DisableKeys True 'comment out for safety
- TaskBar False
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- Cancel = True
- End Sub
- Private Sub Form_Resize()
- FormResize Me
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- DisableKeys False
- End Sub
- Private Sub Label4_Click() 'click here to connect
- Run Me, "C:\Program Files\Netscape\Communicator\Program\Netscape.exe"
- Label4.Visible = False 'so user cant dial-up twice
- End Sub
- Private Sub Label5_Click() 'click here to play games offline
- Game.Show 'show offline program list
- End Sub
- Private Sub Label6_Click() 'Click here to log off
- Dim rtn As Integer
- Label6.Visible = False
- rtn = MsgBox("Log Off?", vbYesNo, "Internet Cafe Log Off")
- If rtn = vbYes Then
- Timer1.Enabled = False 'stop minute counter
- Timer2.Enabled = True 'end internet connection
- txtTime.Visible = False 'hide time counter
- txtPass.Visible = True 'show password box
- txtPass.Text = "" 'empty it
- Label5.Visible = False 'hide user interfaces
- Label4.Visible = False
- Label6.Visible = True 'cancel log off
- End If
- End Sub
- Private Sub Timer1_Timer()
- Dim lngRet As Long
- Dim strFileName
- Dim RemainingTime As String
- Dim strResult As String * 60
- strFileName = App.Path & "\Passwords.ini"
- 'read ini
- lngRet = GetPrivateProfileString("Passwords", _
- txtPass.Text, strFileName, strResult, Len(strResult), _
- strFileName)
- RemainingTime = Str(CInt(strResult) - 1) 'take a minute off time record
- lngRet = WritePrivateProfileString("Passwords", _
- txtPass.Text, RemainingTime, strFileName)
- txtTime.Text = RemainingTime & " minutes remaining."
- End Sub
- Private Sub Timer2_Timer()
- HangUp 'keep connection terminated
- End Sub
- Private Sub txtPass_Change()
- If Len(txtPass.Text) > 4 Then 'using 5 digit passwords
- cmdLogOn.Visible = True
- End If
- End Sub
- Private Sub txtPass_KeyDown(KeyCode As Integer, Shift As Integer)
- KeyLog KeyCode, Shift
- End Sub
- Private Sub txtTime_Change()
- Dim lRt As Long
- If Left(Trim(txtTime.Text), 1) = "1" Then '1 minute left
- lRt = sndPlaySound(App.Path & "\Time.wav", SND_ASYNC)
- End If
- If Left(Trim(txtTime.Text), 3) = "0 m" Then 'times up
- HangUp 'terminate ISP connection
- Timer2.Enabled = True 'keep internet connection closed
- Timer1.Enabled = False 'stop minute counter
- Label4.Visible = False ' hide user interfaces
- Label5.Visible = False
- Label6.Visible = False
- txtTime.Visible = False
- txtPass.Visible = True 'show password box
- txtPass.Text = ""
- Timed.Show 'show time's up splash
- End If
- End Sub
- Private Sub txtTime_KeyDown(KeyCode As Integer, Shift As Integer)
- KeyLog KeyCode, Shift
- End Sub
-