home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / crwdemo / tableloc.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-05  |  4.5 KB  |  161 lines

  1. VERSION 2.00
  2. Begin Form TABLELOCATION 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "TABLE LOCATION"
  5.    ClientHeight    =   3075
  6.    ClientLeft      =   1110
  7.    ClientTop       =   1800
  8.    ClientWidth     =   5415
  9.    ForeColor       =   &H00C0C0C0&
  10.    Height          =   3765
  11.    Left            =   1050
  12.    LinkTopic       =   "Form2"
  13.    ScaleHeight     =   3075
  14.    ScaleWidth      =   5415
  15.    Top             =   1170
  16.    Width           =   5535
  17.    Begin CommandButton Command6 
  18.       Caption         =   "Done"
  19.       Height          =   375
  20.       Left            =   2760
  21.       TabIndex        =   8
  22.       Top             =   2100
  23.       Width           =   1635
  24.    End
  25.    Begin CommandButton Command5 
  26.       Caption         =   ">>"
  27.       Height          =   375
  28.       Left            =   3690
  29.       TabIndex        =   7
  30.       Top             =   1560
  31.       Width           =   1215
  32.    End
  33.    Begin CommandButton Command4 
  34.       Caption         =   "<<"
  35.       Height          =   375
  36.       Left            =   2220
  37.       TabIndex        =   6
  38.       Top             =   1560
  39.       Width           =   1155
  40.    End
  41.    Begin SSPanel Statusbar 
  42.       Alignment       =   1  'Left Justify - MIDDLE
  43.       FontBold        =   0   'False
  44.       FontItalic      =   0   'False
  45.       FontName        =   "MS Sans Serif"
  46.       FontSize        =   8.25
  47.       FontStrikethru  =   0   'False
  48.       FontUnderline   =   0   'False
  49.       Height          =   435
  50.       Left            =   0
  51.       TabIndex        =   5
  52.       Top             =   2670
  53.       Width           =   5985
  54.    End
  55.    Begin TextBox Text2 
  56.       Height          =   375
  57.       Left            =   2220
  58.       TabIndex        =   4
  59.       Top             =   990
  60.       Width           =   2685
  61.    End
  62.    Begin TextBox Text1 
  63.       Height          =   375
  64.       Left            =   2220
  65.       TabIndex        =   3
  66.       Top             =   360
  67.       Width           =   2685
  68.    End
  69.    Begin CommandButton Command3 
  70.       Caption         =   "Set Location"
  71.       Height          =   375
  72.       Left            =   390
  73.       TabIndex        =   2
  74.       Top             =   2100
  75.       Width           =   1695
  76.    End
  77.    Begin CommandButton Command2 
  78.       Caption         =   "Get Location"
  79.       Height          =   375
  80.       Left            =   330
  81.       TabIndex        =   1
  82.       Top             =   990
  83.       Width           =   1695
  84.    End
  85.    Begin CommandButton Command1 
  86.       Caption         =   "Number of Tables"
  87.       Height          =   375
  88.       Left            =   330
  89.       TabIndex        =   0
  90.       Top             =   390
  91.       Width           =   1695
  92.    End
  93.    Begin Label Label1 
  94.       BackColor       =   &H00C0C0C0&
  95.       Caption         =   "Increment Table"
  96.       Height          =   345
  97.       Left            =   390
  98.       TabIndex        =   9
  99.       Top             =   1620
  100.       Width           =   1755
  101.    End
  102.    Begin Menu MenuFile 
  103.       Caption         =   "&File"
  104.       Begin Menu Menuexit 
  105.          Caption         =   "&Exit"
  106.       End
  107.    End
  108. Sub Command1_Click ()
  109.   Dim NumTables As Integer
  110.   NumTables = PEGetNtables(jobnum)
  111.   If NumTables <> -1 Then
  112.     Text1.Text = Str(NumTables)
  113.     Statusbar.Caption = "Retrieved Number of Tables"
  114.   Else
  115.     MsgBox ("Retrieving the number of tables has failed")
  116.   End If
  117. End Sub
  118. Sub Command2_Click ()
  119. Dim locInfo As PETableLocation
  120.     locInfo.Location = Chr$(0)
  121.     locInfo.StructSize = Len(locInfo)
  122.     If PEGetNthTableLocation(jobnum, tableN, locInfo) = 1 Then
  123.         Text2.Text = locInfo.Location
  124.         Statusbar.Caption = "Location Info Retrieved"
  125.         
  126.     Else
  127.         MsgBox "Cannot get location info."
  128.         Exit Sub
  129.     End If
  130. End Sub
  131. Sub Command3_Click ()
  132.     Dim locInfo As PETableLocation
  133.     locInfo.StructSize = Len(locInfo)
  134.     locInfo.Location = Text2.Text + Chr$(0)
  135.     If PESetNthTableLocation(jobnum, tableN, locInfo) = 1 Then
  136.         Statusbar.Caption = "Location Info Set"
  137.     Else
  138.         MsgBox "Cannot set location info."
  139.         Exit Sub
  140.     End If
  141. End Sub
  142. Sub Command4_Click ()
  143.    Dim nTables As Integer
  144.    If (tableN > 0) Then
  145.       tableN = tableN - 1
  146.    End If
  147. End Sub
  148. Sub Command5_Click ()
  149.    Dim nTables As Integer
  150.    nTables = PEGetNtables(jobnum)
  151.    If (tableN < nTables - 1) Then
  152.       tableN = tableN + 1
  153.    End If
  154. End Sub
  155. Sub Command6_Click ()
  156.  Unload Me
  157. End Sub
  158. Sub Menuexit_Click ()
  159.  Unload Me
  160. End Sub
  161.