home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 February
/
PCWK0296.iso
/
po7_win
/
object10
/
login.frm
< prev
next >
Wrap
Text File
|
1994-11-20
|
4KB
|
142 lines
VERSION 2.00
Begin Form frmLogin
BorderStyle = 3 'Fixed Double
Caption = "Login Test"
ClientHeight = 2370
ClientLeft = 2910
ClientTop = 3555
ClientWidth = 4050
Height = 2775
Left = 2850
LinkTopic = "Form4"
ScaleHeight = 2370
ScaleWidth = 4050
Top = 3210
Width = 4170
Begin CommandButton Cancel
Caption = "Cancel"
Height = 495
Left = 2280
TabIndex = 7
Top = 1680
Width = 1215
End
Begin CommandButton ok
Caption = "OK"
Default = -1 'True
Height = 495
Left = 480
TabIndex = 6
Top = 1680
Width = 1215
End
Begin TextBox lDatabaseName
Height = 285
Left = 1440
TabIndex = 2
Text = "ExampleDb"
Top = 1200
Width = 2295
End
Begin TextBox lPassword
Height = 285
Left = 1440
PasswordChar = "*"
TabIndex = 1
Text = "tiger"
Top = 720
Width = 2295
End
Begin TextBox lUsername
Height = 285
Left = 1440
TabIndex = 0
Text = "Scott"
Top = 240
Width = 2295
End
Begin Label Label3
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Database"
Height = 195
Left = 480
TabIndex = 5
Top = 1200
Width = 825
End
Begin Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Password:"
Height = 195
Left = 480
TabIndex = 4
Top = 720
Width = 885
End
Begin Label Label1
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "User Name:"
Height = 195
Left = 240
TabIndex = 3
Top = 240
Width = 1005
End
End
Option Explicit
Sub Cancel_Click ()
Unload frmLogin
End
End Sub
Sub Form_Load ()
Call CenterForm(frmLogin)
End Sub
Sub lDatabaseName_GotFocus ()
lDatabaseName.SelStart = 0
lDatabaseName.SelLength = Len(lDatabaseName.Text)
End Sub
Sub lPassword_GotFocus ()
lPassword.SelStart = 0
lPassword.SelLength = Len(lPassword.Text)
End Sub
Sub lUsername_GotFocus ()
lUserName.SelStart = 0
lUserName.SelLength = Len(lUserName.Text)
End Sub
Sub OK_Click ()
If lUserName.Text <> "" Then
UserName$ = lUserName.Text
Password$ = lPassword.Text
DatabaseName$ = lDatabaseName.Text
Connect$ = UserName$ + "/" + Password$
On Error GoTo NoOraConnection
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.DbOpenDatabase(DatabaseName$, Connect$, 0&)
NoOraConnection:
frmLogOraError.Show MODAL
End
End If
End Sub