home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / leadtools / ocx32.lt / HYPLINK.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-03-27  |  4.1 KB  |  147 lines

  1. VERSION 5.00
  2. Begin VB.Form frmHyperlink 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Set Hyperlink"
  5.    ClientHeight    =   2670
  6.    ClientLeft      =   1905
  7.    ClientTop       =   6255
  8.    ClientWidth     =   6690
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   2670
  14.    ScaleWidth      =   6690
  15.    ShowInTaskbar   =   0   'False
  16.    Begin VB.TextBox Text2 
  17.       Enabled         =   0   'False
  18.       Height          =   285
  19.       Left            =   2640
  20.       TabIndex        =   8
  21.       Top             =   1560
  22.       Width           =   3735
  23.    End
  24.    Begin VB.OptionButton Option1 
  25.       Caption         =   "ANNLINK_WEBPAGE"
  26.       Height          =   255
  27.       Index           =   3
  28.       Left            =   360
  29.       TabIndex        =   6
  30.       Top             =   1560
  31.       Width           =   2175
  32.    End
  33.    Begin VB.OptionButton Option1 
  34.       Caption         =   "ANNLINK_RUN"
  35.       Height          =   255
  36.       Index           =   2
  37.       Left            =   360
  38.       TabIndex        =   5
  39.       Top             =   1200
  40.       Width           =   1455
  41.    End
  42.    Begin VB.OptionButton Option1 
  43.       Caption         =   "ANNLINK_EVENT"
  44.       Height          =   255
  45.       Index           =   1
  46.       Left            =   360
  47.       TabIndex        =   4
  48.       Top             =   840
  49.       Width           =   1695
  50.    End
  51.    Begin VB.Frame Frame1 
  52.       Caption         =   "Hyperlink Type:"
  53.       Height          =   1935
  54.       Left            =   120
  55.       TabIndex        =   2
  56.       Top             =   120
  57.       Width           =   6375
  58.       Begin VB.TextBox Text1 
  59.          Enabled         =   0   'False
  60.          Height          =   285
  61.          Left            =   2520
  62.          TabIndex        =   7
  63.          Top             =   1080
  64.          Width           =   3735
  65.       End
  66.       Begin VB.OptionButton Option1 
  67.          Caption         =   "None"
  68.          Height          =   255
  69.          Index           =   0
  70.          Left            =   240
  71.          TabIndex        =   3
  72.          Top             =   360
  73.          Width           =   1455
  74.       End
  75.    End
  76.    Begin VB.CommandButton Command2 
  77.       Caption         =   "Cancel"
  78.       Height          =   375
  79.       Left            =   5280
  80.       TabIndex        =   1
  81.       Top             =   2160
  82.       Width           =   1215
  83.    End
  84.    Begin VB.CommandButton Command1 
  85.       Caption         =   "OK"
  86.       Height          =   375
  87.       Left            =   3960
  88.       TabIndex        =   0
  89.       Top             =   2160
  90.       Width           =   1215
  91.    End
  92. Attribute VB_Name = "frmHyperlink"
  93. Attribute VB_GlobalNameSpace = False
  94. Attribute VB_Creatable = False
  95. Attribute VB_PredeclaredId = True
  96. Attribute VB_Exposed = False
  97. Public nResult As Integer
  98. Public nType As Integer
  99. Public szLink As String
  100. Private Sub Command1_Click()
  101.     nResult = 1
  102.     Select Case nType
  103.         Case ANNLINK_RUN
  104.            szLink = Text1.Text
  105.         Case ANNLINK_WEBPAGE
  106.            szLink = Text2.Text
  107.         Case Else
  108.            szLink = ""
  109.     End Select
  110.     Hide
  111. End Sub
  112. Private Sub Command2_Click()
  113.     nResult = 0
  114.     Hide
  115. End Sub
  116. Private Sub Form_Load()
  117. '    Option1(0).Value = True
  118. '    nType = ANNLINK_NONE
  119. End Sub
  120. Private Sub Option1_Click(Index As Integer)
  121.     If (Index <> 0) Then
  122.        Option1(0).Value = False
  123.     ElseIf (Index = 0) Then
  124.        Option1(1).Value = False
  125.        Option1(2).Value = False
  126.        Option1(3).Value = False
  127.     End If
  128.     Select Case Index
  129.        Case 0
  130.           nType = ANNLINK_NONE
  131.           Text1.Enabled = False
  132.           Text2.Enabled = False
  133.        Case 1
  134.           nType = ANNLINK_ANNEVENT
  135.           Text1.Enabled = False
  136.           Text2.Enabled = False
  137.        Case 2
  138.           nType = ANNLINK_RUN
  139.           Text1.Enabled = True
  140.           Text2.Enabled = False
  141.        Case 3
  142.           nType = ANNLINK_WEBPAGE
  143.           Text1.Enabled = False
  144.           Text2.Enabled = True
  145.     End Select
  146. End Sub
  147.