home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / object10 / quologin.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-11-30  |  3.6 KB  |  124 lines

  1. VERSION 2.00
  2. Begin Form frmOraLogin 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Quote Login"
  5.    ClientHeight    =   2430
  6.    ClientLeft      =   660
  7.    ClientTop       =   1515
  8.    ClientWidth     =   4050
  9.    Height          =   2835
  10.    Left            =   600
  11.    LinkTopic       =   "Form4"
  12.    ScaleHeight     =   2430
  13.    ScaleWidth      =   4050
  14.    Top             =   1170
  15.    Width           =   4170
  16.    Begin CommandButton cmdCancel 
  17.       Caption         =   "Cancel"
  18.       Height          =   495
  19.       Left            =   2280
  20.       TabIndex        =   4
  21.       Top             =   1680
  22.       Width           =   1215
  23.    End
  24.    Begin CommandButton cmdOK 
  25.       Caption         =   "OK"
  26.       Default         =   -1  'True
  27.       Height          =   495
  28.       Left            =   480
  29.       TabIndex        =   3
  30.       Top             =   1680
  31.       Width           =   1215
  32.    End
  33.    Begin TextBox txtDatabaseName 
  34.       Height          =   285
  35.       Left            =   1440
  36.       TabIndex        =   2
  37.       Text            =   "ExampleDb"
  38.       Top             =   1200
  39.       Width           =   2295
  40.    End
  41.    Begin TextBox txtPassword 
  42.       Height          =   285
  43.       Left            =   1440
  44.       PasswordChar    =   "*"
  45.       TabIndex        =   1
  46.       Text            =   "tiger"
  47.       Top             =   720
  48.       Width           =   2295
  49.    End
  50.    Begin TextBox txtUserName 
  51.       Height          =   285
  52.       Left            =   1440
  53.       TabIndex        =   0
  54.       Text            =   "Scott"
  55.       Top             =   240
  56.       Width           =   2295
  57.    End
  58.    Begin Label Label3 
  59.       Alignment       =   1  'Right Justify
  60.       AutoSize        =   -1  'True
  61.       Caption         =   "Database"
  62.       Height          =   195
  63.       Left            =   480
  64.       TabIndex        =   7
  65.       Top             =   1200
  66.       Width           =   825
  67.    End
  68.    Begin Label Label2 
  69.       Alignment       =   1  'Right Justify
  70.       AutoSize        =   -1  'True
  71.       Caption         =   "Password:"
  72.       Height          =   195
  73.       Left            =   480
  74.       TabIndex        =   6
  75.       Top             =   720
  76.       Width           =   885
  77.    End
  78.    Begin Label Label1 
  79.       Alignment       =   1  'Right Justify
  80.       AutoSize        =   -1  'True
  81.       Caption         =   "User Name:"
  82.       Height          =   195
  83.       Left            =   360
  84.       TabIndex        =   5
  85.       Top             =   240
  86.       Width           =   1005
  87.    End
  88. Option Explicit
  89. Sub cmdCancel_Click ()
  90.  Unload frmOraLogin
  91. End Sub
  92. Sub cmdOK_Click ()
  93.  If txtUserName.Text <> "" Then
  94.   UserName$ = txtUserName.Text
  95.   Password$ = txtPassword.Text
  96.   DatabaseName$ = txtDatabaseName.Text
  97.   Connect$ = UserName$ + "/" + Password$
  98.   On Error GoTo NoOraConnection
  99.  'Session and Database are declared global in quote.bas
  100.   Set OraSession = CreateObject("OracleInProcServer.XOraSession")
  101.   Set OraDatabase = OraSession.OpenDatabase(DatabaseName$, Connect$, 0&)
  102.   frmOraLogin.Hide
  103.   frmQuote.Show
  104.  End If
  105. Exit Sub
  106. NoOraConnection:
  107.  frmOraError.Show MODAL
  108. End Sub
  109. Sub Form_Load ()
  110.  CenterForm frmOraLogin
  111. End Sub
  112. Sub txtDatabaseName_GotFocus ()
  113.  txtDatabaseName.SelStart = 0
  114.  txtDatabaseName.SelLength = Len(txtDatabaseName.Text)
  115. End Sub
  116. Sub txtPassword_GotFocus ()
  117.  txtPassword.SelStart = 0
  118.  txtPassword.SelLength = Len(txtPassword.Text)
  119. End Sub
  120. Sub txtUsername_GotFocus ()
  121.  txtUserName.SelStart = 0
  122.  txtUserName.SelLength = Len(txtUserName.Text)
  123. End Sub
  124.