home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch13 / htmlsrvr / htmllink.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-20  |  7.3 KB  |  260 lines

  1. VERSION 5.00
  2. Begin VB.Form frmLinks 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Favorite Links"
  5.    ClientHeight    =   6135
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5895
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   6135
  13.    ScaleWidth      =   5895
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.TextBox txtURL 
  17.       Height          =   375
  18.       Index           =   9
  19.       Left            =   1440
  20.       TabIndex        =   25
  21.       Top             =   5640
  22.       Width           =   4335
  23.    End
  24.    Begin VB.TextBox txtURL 
  25.       Height          =   375
  26.       Index           =   8
  27.       Left            =   1440
  28.       TabIndex        =   24
  29.       Top             =   5160
  30.       Width           =   4335
  31.    End
  32.    Begin VB.TextBox txtURL 
  33.       Height          =   375
  34.       Index           =   7
  35.       Left            =   1440
  36.       TabIndex        =   23
  37.       Top             =   4680
  38.       Width           =   4335
  39.    End
  40.    Begin VB.TextBox txtURL 
  41.       Height          =   375
  42.       Index           =   6
  43.       Left            =   1440
  44.       TabIndex        =   22
  45.       Top             =   4200
  46.       Width           =   4335
  47.    End
  48.    Begin VB.TextBox txtURL 
  49.       Height          =   375
  50.       Index           =   5
  51.       Left            =   1440
  52.       TabIndex        =   21
  53.       Top             =   3720
  54.       Width           =   4335
  55.    End
  56.    Begin VB.TextBox txtURL 
  57.       Height          =   375
  58.       Index           =   4
  59.       Left            =   1440
  60.       TabIndex        =   20
  61.       Top             =   3240
  62.       Width           =   4335
  63.    End
  64.    Begin VB.TextBox txtURL 
  65.       Height          =   375
  66.       Index           =   3
  67.       Left            =   1440
  68.       TabIndex        =   19
  69.       Top             =   2760
  70.       Width           =   4335
  71.    End
  72.    Begin VB.TextBox txtURL 
  73.       Height          =   375
  74.       Index           =   2
  75.       Left            =   1440
  76.       TabIndex        =   18
  77.       Top             =   2280
  78.       Width           =   4335
  79.    End
  80.    Begin VB.TextBox txtURL 
  81.       Height          =   375
  82.       Index           =   1
  83.       Left            =   1440
  84.       TabIndex        =   17
  85.       Top             =   1800
  86.       Width           =   4335
  87.    End
  88.    Begin VB.TextBox txtURL 
  89.       Height          =   375
  90.       Index           =   0
  91.       Left            =   1440
  92.       TabIndex        =   16
  93.       Text            =   "http://www.sybex.com"
  94.       Top             =   1320
  95.       Width           =   4335
  96.    End
  97.    Begin VB.TextBox txtLinkName 
  98.       Height          =   375
  99.       Index           =   9
  100.       Left            =   120
  101.       TabIndex        =   15
  102.       Top             =   5640
  103.       Width           =   1215
  104.    End
  105.    Begin VB.TextBox txtLinkName 
  106.       Height          =   375
  107.       Index           =   8
  108.       Left            =   120
  109.       TabIndex        =   14
  110.       Top             =   5160
  111.       Width           =   1215
  112.    End
  113.    Begin VB.TextBox txtLinkName 
  114.       Height          =   375
  115.       Index           =   7
  116.       Left            =   120
  117.       TabIndex        =   13
  118.       Top             =   4680
  119.       Width           =   1215
  120.    End
  121.    Begin VB.TextBox txtLinkName 
  122.       Height          =   375
  123.       Index           =   6
  124.       Left            =   120
  125.       TabIndex        =   12
  126.       Top             =   4200
  127.       Width           =   1215
  128.    End
  129.    Begin VB.TextBox txtLinkName 
  130.       Height          =   375
  131.       Index           =   5
  132.       Left            =   120
  133.       TabIndex        =   11
  134.       Top             =   3720
  135.       Width           =   1215
  136.    End
  137.    Begin VB.TextBox txtLinkName 
  138.       Height          =   375
  139.       Index           =   4
  140.       Left            =   120
  141.       TabIndex        =   10
  142.       Top             =   3240
  143.       Width           =   1215
  144.    End
  145.    Begin VB.TextBox txtLinkName 
  146.       Height          =   375
  147.       Index           =   3
  148.       Left            =   120
  149.       TabIndex        =   9
  150.       Top             =   2760
  151.       Width           =   1215
  152.    End
  153.    Begin VB.TextBox txtLinkName 
  154.       Height          =   375
  155.       Index           =   2
  156.       Left            =   120
  157.       TabIndex        =   8
  158.       Top             =   2280
  159.       Width           =   1215
  160.    End
  161.    Begin VB.TextBox txtLinkName 
  162.       Height          =   375
  163.       Index           =   1
  164.       Left            =   120
  165.       TabIndex        =   7
  166.       Top             =   1800
  167.       Width           =   1215
  168.    End
  169.    Begin VB.TextBox txtLinkName 
  170.       Height          =   375
  171.       Index           =   0
  172.       Left            =   120
  173.       TabIndex        =   6
  174.       Text            =   "SYBEX"
  175.       Top             =   1320
  176.       Width           =   1215
  177.    End
  178.    Begin VB.CommandButton cmdCancel 
  179.       Cancel          =   -1  'True
  180.       Caption         =   "Cancel"
  181.       Height          =   495
  182.       Left            =   4560
  183.       TabIndex        =   3
  184.       Top             =   720
  185.       Width           =   1215
  186.    End
  187.    Begin VB.CommandButton cmdOK 
  188.       Caption         =   "OK"
  189.       Default         =   -1  'True
  190.       Height          =   495
  191.       Left            =   4560
  192.       TabIndex        =   2
  193.       Top             =   120
  194.       Width           =   1215
  195.    End
  196.    Begin VB.TextBox txtTitle 
  197.       Height          =   375
  198.       Left            =   600
  199.       TabIndex        =   1
  200.       Top             =   360
  201.       Width           =   3135
  202.    End
  203.    Begin VB.Label lblURL 
  204.       Caption         =   "URL:"
  205.       Height          =   255
  206.       Left            =   1320
  207.       TabIndex        =   5
  208.       Top             =   960
  209.       Width           =   375
  210.    End
  211.    Begin VB.Label lblLinkName 
  212.       Caption         =   "Name:"
  213.       Height          =   255
  214.       Left            =   120
  215.       TabIndex        =   4
  216.       Top             =   960
  217.       Width           =   495
  218.    End
  219.    Begin VB.Label lblTitle 
  220.       Caption         =   "Title:"
  221.       Height          =   255
  222.       Left            =   120
  223.       TabIndex        =   0
  224.       Top             =   480
  225.       Width           =   375
  226.    End
  227. Attribute VB_Name = "frmLinks"
  228. Attribute VB_GlobalNameSpace = False
  229. Attribute VB_Creatable = False
  230. Attribute VB_PredeclaredId = True
  231. Attribute VB_Exposed = False
  232. Option Explicit
  233. Private Sub Form_Load()
  234.     frmHTML.Enabled = False
  235. End Sub
  236. Private Sub Form_Unload(Cancel As Integer)
  237.     frmHTML.Enabled = True
  238.     frmHTML.SetFocus
  239. End Sub
  240. Private Sub cmdCancel_Click()
  241.     Unload frmLinks
  242. End Sub
  243. Private Sub cmdOK_Click()
  244.     Dim x As Integer
  245.     frmHTML.LinksText = "<FONT SIZE=+1>" + _
  246.         txtTitle.Text + "</FONT><BR>" + vbCrLf
  247.     For x = 0 To 9
  248.         If txtLinkName(x).Text <> "" And _
  249.             txtURL(x).Text <> "" Then
  250.             frmHTML.LinksText = _
  251.                 frmHTML.LinksText & _
  252.                 "<A HREF=" & Chr(34) & _
  253.                 txtURL(x).Text & Chr(34) & _
  254.                 ">" & txtLinkName(x).Text & _
  255.                 "</A><BR>" & vbCrLf
  256.         End If
  257.     Next x
  258.     Unload frmLinks
  259. End Sub
  260.