home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / himetr1r / frminput.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-08-14  |  3.3 KB  |  117 lines

  1. VERSION 5.00
  2. Begin VB.Form frmInput 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Add A Link"
  5.    ClientHeight    =   1710
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   3915
  9.    BeginProperty Font 
  10.       Name            =   "Tahoma"
  11.       Size            =   8.25
  12.       Charset         =   0
  13.       Weight          =   400
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    Icon            =   "frmInput.frx":0000
  19.    LinkTopic       =   "Form1"
  20.    MaxButton       =   0   'False
  21.    MinButton       =   0   'False
  22.    ScaleHeight     =   1710
  23.    ScaleWidth      =   3915
  24.    ShowInTaskbar   =   0   'False
  25.    StartUpPosition =   3  'Windows Default
  26.    Begin VB.CommandButton cmdOK 
  27.       Caption         =   "&OK"
  28.       Default         =   -1  'True
  29.       Height          =   375
  30.       Left            =   1440
  31.       TabIndex        =   5
  32.       Top             =   1200
  33.       Width           =   1095
  34.    End
  35.    Begin VB.CommandButton cmdCancel 
  36.       Caption         =   "&Cancel"
  37.       Height          =   375
  38.       Left            =   2760
  39.       TabIndex        =   4
  40.       Top             =   1200
  41.       Width           =   975
  42.    End
  43.    Begin VB.TextBox txtName 
  44.       Height          =   285
  45.       Left            =   1200
  46.       TabIndex        =   3
  47.       Top             =   720
  48.       Width           =   2535
  49.    End
  50.    Begin VB.TextBox txtLink 
  51.       Height          =   285
  52.       Left            =   1200
  53.       TabIndex        =   1
  54.       Top             =   240
  55.       Width           =   2535
  56.    End
  57.    Begin VB.Label lblURL 
  58.       AutoSize        =   -1  'True
  59.       Caption         =   "URL:"
  60.       Height          =   195
  61.       Left            =   240
  62.       TabIndex        =   2
  63.       Top             =   240
  64.       Width           =   345
  65.    End
  66.    Begin VB.Label lblName 
  67.       AutoSize        =   -1  'True
  68.       Caption         =   "Link Name:"
  69.       Height          =   195
  70.       Left            =   240
  71.       TabIndex        =   0
  72.       Top             =   720
  73.       Width           =   780
  74.    End
  75. Attribute VB_Name = "frmInput"
  76. Attribute VB_GlobalNameSpace = False
  77. Attribute VB_Creatable = False
  78. Attribute VB_PredeclaredId = True
  79. Attribute VB_Exposed = False
  80. '----------------------------------------
  81. '- Name: Sam Huggill
  82. '- Email: sam@vbsquare.com
  83. '- Web: http://www.vbsquare.com/
  84. '- Company: Lighthouse Internet Solutions
  85. '- Date/Time: 14/08/99 11:32:38
  86. '----------------------------------------
  87. '- Notes:   Simple input dialog to replace
  88. '           the InputBox function
  89. '----------------------------------------
  90. Option Explicit
  91. Private Sub cmdCancel_Click()
  92.     Unload Me
  93. End Sub
  94. Private Sub cmdOK_Click()
  95.     If txtLink.Text = "" Then MsgBox "Please enter a link.", vbOKOnly + vbCritical: Exit Sub
  96.     If txtName.Text = "" Then
  97.         g_strName = txtLink.Text
  98.     Else
  99.         g_strName = txtName.Text
  100.     End If
  101.     g_strLink = txtLink.Text
  102.     Unload Me
  103. End Sub
  104. Private Sub Form_Load()
  105.     g_blnEnd = False
  106.     txtName = g_strName
  107.     txtLink = g_strLink
  108.     CentreForm Me
  109. End Sub
  110. Private Sub Form_Unload(Cancel As Integer)
  111.     If txtLink.Text = "" Then
  112.         g_blnEnd = False
  113.     Else
  114.         g_blnEnd = True
  115.     End If
  116. End Sub
  117.