home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / crystal / extras / crpedemo / security.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-12-15  |  3.8 KB  |  123 lines

  1. VERSION 2.00
  2. Begin Form Security 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Access Security"
  5.    ClientHeight    =   2805
  6.    ClientLeft      =   2250
  7.    ClientTop       =   1620
  8.    ClientWidth     =   5730
  9.    Height          =   3210
  10.    Left            =   2190
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   2805
  13.    ScaleWidth      =   5730
  14.    Top             =   1275
  15.    Width           =   5850
  16.    Begin SSFrame Frame3D1 
  17.       Caption         =   "Security Information"
  18.       Font3D          =   0  'None
  19.       ForeColor       =   &H00000000&
  20.       Height          =   1545
  21.       Left            =   240
  22.       TabIndex        =   4
  23.       Top             =   315
  24.       Width           =   5145
  25.       Begin TextBox Text2 
  26.          Height          =   330
  27.          Left            =   1200
  28.          PasswordChar    =   "*"
  29.          TabIndex        =   1
  30.          Top             =   900
  31.          Width           =   3570
  32.       End
  33.       Begin TextBox Text1 
  34.          Height          =   330
  35.          Left            =   1200
  36.          TabIndex        =   0
  37.          Top             =   405
  38.          Width           =   3570
  39.       End
  40.       Begin Label Label4 
  41.          BackColor       =   &H00C0C0C0&
  42.          Caption         =   "Password"
  43.          Height          =   285
  44.          Left            =   270
  45.          TabIndex        =   7
  46.          Top             =   945
  47.          Width           =   915
  48.       End
  49.       Begin Label Label3 
  50.          BackColor       =   &H00C0C0C0&
  51.          Caption         =   "User ID"
  52.          Height          =   240
  53.          Left            =   300
  54.          TabIndex        =   6
  55.          Top             =   450
  56.          Width           =   870
  57.       End
  58.    End
  59.    Begin CommandButton Command3 
  60.       Caption         =   "OK"
  61.       Height          =   375
  62.       Left            =   3840
  63.       TabIndex        =   5
  64.       Top             =   2205
  65.       Width           =   1545
  66.    End
  67.    Begin CommandButton Command2 
  68.       Caption         =   "Set Security Info"
  69.       Height          =   375
  70.       Left            =   2070
  71.       TabIndex        =   3
  72.       Top             =   2205
  73.       Width           =   1680
  74.    End
  75.    Begin CommandButton Command1 
  76.       Caption         =   "Get Security Info"
  77.       Height          =   375
  78.       Left            =   300
  79.       TabIndex        =   2
  80.       Top             =   2205
  81.       Width           =   1680
  82.    End
  83. Sub Command1_Click ()
  84. Dim NTable As Integer
  85. Dim SessionInfo As PESessionInfo
  86. NTable = 0
  87. SessionInfo.StructSize = Len(SessionInfo)
  88. SessionInfo.UserID = Chr$(0)
  89. SessionInfo.Password = Chr$(0)
  90. SessionInfo.SessionHandle = 0
  91. If PEGetNthTableSessionInfo(JobNum, 0, SessionInfo) = 1 Then
  92.   Text1.Text = SessionInfo.UserID
  93.   Text2.Text = SessionInfo.Password
  94.   Main!StatusBar.Caption = "Security Info Retrieved!"
  95.       RCode = GetErrorString(JobNum)
  96.       MsgBox "PEGetNthTableSessionInfo Error #: " + Str(ErrorCode) + " - " + RCode
  97. End If
  98. End Sub
  99. Sub Command2_Click ()
  100.    Dim NTable As Integer
  101.    Dim SessionInfo As PESessionInfo
  102.    NTable = 0
  103.                                                  
  104.    SessionInfo.StructSize = Len(SessionInfo)
  105.    SessionInfo.UserID = Text1.Text + Chr$(0)
  106.    SessionInfo.Password = Text2.Text + Chr$(0)
  107.    SessionInfo.SessionHandle = 0
  108.    If PESetNthTableSessionInfo(JobNum, NTable, SessionInfo, True) = False Then
  109.       RCode = GetErrorString(JobNum)
  110.       MsgBox "PESetNthTableSessionInfo Error #: " + Str(ErrorCode) + " - " + RCode
  111.    Else
  112.       Main!StatusBar.Caption = "Security Info Set!"
  113.    End If
  114. End Sub
  115. Sub Command3_Click ()
  116.   Unload Me
  117. End Sub
  118. Sub MenuMoreInfo_Click ()
  119. End Sub
  120. Sub MenuSecurityExit_Click ()
  121.  Unload Me
  122. End Sub
  123.