home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / demo / rec_lock / exmpl2_1.frm < prev    next >
Text File  |  1994-09-09  |  2KB  |  99 lines

  1. VERSION 2.00
  2. Begin Form frm_Example_2 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Record Locking Pro 1.01 Demo - Example 2"
  6.    ClientHeight    =   2100
  7.    ClientLeft      =   2175
  8.    ClientTop       =   2490
  9.    ClientWidth     =   5520
  10.    Height          =   2505
  11.    Icon            =   EXMPL2_1.FRX:0000
  12.    KeyPreview      =   -1  'True
  13.    Left            =   2115
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    ScaleHeight     =   2100
  18.    ScaleWidth      =   5520
  19.    Top             =   2145
  20.    Width           =   5640
  21.    Begin CommandButton cmd_Start_Demo 
  22.       Caption         =   "Start Demo"
  23.       Default         =   -1  'True
  24.       Height          =   375
  25.       Left            =   840
  26.       TabIndex        =   1
  27.       Top             =   1320
  28.       Width           =   1515
  29.    End
  30.    Begin CommandButton cmd_Exit 
  31.       Cancel          =   -1  'True
  32.       Caption         =   "Ende"
  33.       Height          =   375
  34.       Left            =   3000
  35.       TabIndex        =   2
  36.       Top             =   1320
  37.       Width           =   1515
  38.    End
  39.    Begin TextBox txt_User_Name 
  40.       Height          =   285
  41.       Left            =   1920
  42.       MaxLength       =   20
  43.       TabIndex        =   0
  44.       Top             =   420
  45.       Width           =   2715
  46.    End
  47.    Begin Label lab_ 
  48.       Alignment       =   1  'Right Justify
  49.       BackStyle       =   0  'Transparent
  50.       Caption         =   "Benutzername"
  51.       Height          =   255
  52.       Index           =   0
  53.       Left            =   180
  54.       TabIndex        =   3
  55.       Top             =   480
  56.       Width           =   1635
  57.    End
  58. End
  59. ' Example 2 - Lock-by-Select Demo
  60.  
  61. Option Explicit
  62.  
  63. Const Lock_File_Name = "REC_LOCK.DAT"
  64.  
  65. Sub cmd_Exit_Click ()
  66.  
  67.     If glb_User_Name <> "" Then Done_Locking
  68.     Unload Me
  69.     End
  70.  
  71. End Sub
  72.  
  73. Sub cmd_Start_Demo_Click ()
  74.  
  75.     Dim User_Name As String
  76.  
  77.     User_Name = txt_User_Name.Text
  78.  
  79.     Init_Locking Lock_File_Name, User_Name, lock_by_Select
  80.  
  81.     If glb_Last_Status = st_No_Error Then
  82.         Unload Me
  83.         frm_Cities.Show
  84.     Else
  85.         Show_Status
  86.     End If
  87.  
  88. End Sub
  89.  
  90. Sub Form_Load ()
  91.  
  92.     ChDir App.Path
  93.  
  94.     Center_Form Me
  95.     Draw_Form_Frame Me, 40, 40
  96.  
  97. End Sub
  98.  
  99.