home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 13 / CD_ASCQ_13_0494.iso / maj / 1697 / samples / gotoline.frm < prev    next >
Text File  |  1993-09-29  |  2KB  |  66 lines

  1. VERSION 2.00
  2. Begin Form frmGotoLine 
  3.    Caption         =   "Goto Line"
  4.    Height          =   1800
  5.    Left            =   1185
  6.    LinkTopic       =   "Form2"
  7.    ScaleHeight     =   1395
  8.    ScaleWidth      =   4020
  9.    Top             =   2340
  10.    Width           =   4140
  11.    Begin TextBox Text1 
  12.       Height          =   375
  13.       Left            =   120
  14.       TabIndex        =   1
  15.       Top             =   540
  16.       Width           =   1665
  17.    End
  18.    Begin CommandButton cmdcancel 
  19.       Cancel          =   -1  'True
  20.       Caption         =   "Cancel"
  21.       Height          =   375
  22.       Left            =   2685
  23.       TabIndex        =   3
  24.       Top             =   645
  25.       Width           =   1095
  26.    End
  27.    Begin CommandButton cmdOK 
  28.       Caption         =   "OK"
  29.       Default         =   -1  'True
  30.       Height          =   375
  31.       Left            =   2685
  32.       TabIndex        =   2
  33.       Top             =   120
  34.       Width           =   1095
  35.    End
  36.    Begin Label Label1 
  37.       Caption         =   "&Line Number:"
  38.       Height          =   255
  39.       Left            =   120
  40.       TabIndex        =   0
  41.       Top             =   240
  42.       Width           =   1455
  43.    End
  44. End
  45. Option Explicit
  46.  
  47. Sub cmdcancel_Click ()
  48.     Unload Me
  49. End Sub
  50.  
  51. Sub cmdOK_Click ()
  52.     DoIt
  53. End Sub
  54.  
  55. Sub DoIt ()
  56.     On Error GoTo SearchError
  57.     Dim GoLine As Long
  58.     GoLine = CLng(Text1.Text)
  59.     Resume Next
  60.     frmMDI.ActiveForm.ActiveControl.CaretY = CLng(Text1.Text)
  61. SearchError:
  62.     Resume Next
  63.     Unload Me
  64. End Sub
  65.  
  66.