home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / frmweb1a / webbrows.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-10-12  |  52.2 KB  |  1,494 lines

  1. VERSION 5.00
  2. Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "SHDOCVW.DLL"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  4. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  5. Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
  6. Begin VB.Form frmWebBrowser 
  7.    Appearance      =   0  'Flat
  8.    AutoRedraw      =   -1  'True
  9.    BackColor       =   &H8000000B&
  10.    Caption         =   "HCL Applications"
  11.    ClientHeight    =   6315
  12.    ClientLeft      =   3060
  13.    ClientTop       =   3630
  14.    ClientWidth     =   11880
  15.    Icon            =   "WebBrowser.frx":0000
  16.    LinkTopic       =   "Form1"
  17.    LockControls    =   -1  'True
  18.    MDIChild        =   -1  'True
  19.    ScaleHeight     =   6315
  20.    ScaleWidth      =   11880
  21.    ShowInTaskbar   =   0   'False
  22.    WindowState     =   2  'Maximized
  23.    Begin InetCtlsObjects.Inet ctlInet 
  24.       Left            =   7410
  25.       Top             =   3240
  26.       _ExtentX        =   1005
  27.       _ExtentY        =   1005
  28.       _Version        =   393216
  29.    End
  30.    Begin RichTextLib.RichTextBox Text1 
  31.       Height          =   2985
  32.       Left            =   30
  33.       TabIndex        =   4
  34.       Top             =   1350
  35.       Width           =   5385
  36.       _ExtentX        =   9499
  37.       _ExtentY        =   5265
  38.       _Version        =   393217
  39.       BackColor       =   16777152
  40.       HideSelection   =   0   'False
  41.       ScrollBars      =   3
  42.       TextRTF         =   $"WebBrowser.frx":030A
  43.    End
  44.    Begin SHDocVwCtl.WebBrowser ctlWebBrowser 
  45.       Height          =   3060
  46.       Left            =   60
  47.       TabIndex        =   0
  48.       Top             =   1350
  49.       Width           =   5400
  50.       ExtentX         =   9525
  51.       ExtentY         =   5397
  52.       ViewMode        =   1
  53.       Offline         =   0
  54.       Silent          =   0
  55.       RegisterAsBrowser=   0
  56.       RegisterAsDropTarget=   1
  57.       AutoArrange     =   -1  'True
  58.       NoClientEdge    =   0   'False
  59.       AlignLeft       =   0   'False
  60.       ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
  61.       Location        =   ""
  62.    End
  63.    Begin VB.Timer timer1 
  64.       Enabled         =   0   'False
  65.       Interval        =   500
  66.       Left            =   7440
  67.       Top             =   2520
  68.    End
  69.    Begin VB.PictureBox picAddressContainer 
  70.       Align           =   1  'Align Top
  71.       Height          =   435
  72.       Left            =   0
  73.       ScaleHeight     =   375
  74.       ScaleWidth      =   11820
  75.       TabIndex        =   2
  76.       TabStop         =   0   'False
  77.       Top             =   360
  78.       Width           =   11880
  79.       Begin VB.ComboBox cboAddress 
  80.          BackColor       =   &H00FFFFFF&
  81.          Height          =   315
  82.          Left            =   960
  83.          TabIndex        =   1
  84.          Top             =   30
  85.          Width           =   5145
  86.       End
  87.       Begin VB.Label lblAddress 
  88.          Caption         =   "Address:"
  89.          Height          =   165
  90.          Left            =   60
  91.          TabIndex        =   3
  92.          Top             =   90
  93.          Width           =   825
  94.       End
  95.    End
  96.    Begin MSComctlLib.ImageList Imagelist1 
  97.       Left            =   7350
  98.       Top             =   1830
  99.       _ExtentX        =   1005
  100.       _ExtentY        =   1005
  101.       BackColor       =   -2147483643
  102.       ImageWidth      =   16
  103.       ImageHeight     =   16
  104.       MaskColor       =   12632256
  105.       _Version        =   393216
  106.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  107.          NumListImages   =   17
  108.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  109.             Picture         =   "WebBrowser.frx":03C4
  110.             Key             =   "tbrBack"
  111.          EndProperty
  112.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  113.             Picture         =   "WebBrowser.frx":0718
  114.             Key             =   "tbrForward"
  115.          EndProperty
  116.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  117.             Picture         =   "WebBrowser.frx":0A6C
  118.             Key             =   "tbrStop"
  119.          EndProperty
  120.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  121.             Picture         =   "WebBrowser.frx":0DC0
  122.             Key             =   "tbrRefresh"
  123.          EndProperty
  124.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  125.             Picture         =   "WebBrowser.frx":1114
  126.             Key             =   "tbrHome"
  127.          EndProperty
  128.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  129.             Picture         =   "WebBrowser.frx":12BC
  130.             Key             =   "tbrSearch"
  131.          EndProperty
  132.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  133.             Picture         =   "WebBrowser.frx":1610
  134.             Key             =   "tbrFavoritesList"
  135.          EndProperty
  136.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  137.             Picture         =   "WebBrowser.frx":3DC4
  138.             Key             =   "tbrPrintDesktop"
  139.          EndProperty
  140.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  141.             Picture         =   "WebBrowser.frx":40E0
  142.             Key             =   "tbrCapDesktop"
  143.          EndProperty
  144.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  145.             Picture         =   "WebBrowser.frx":43FC
  146.             Key             =   "tbrInbox"
  147.          EndProperty
  148.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  149.             Picture         =   "WebBrowser.frx":6BB0
  150.             Key             =   "tbrOutbox"
  151.          EndProperty
  152.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  153.             Picture         =   "WebBrowser.frx":7004
  154.             Key             =   "tbrContacts"
  155.          EndProperty
  156.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  157.             Picture         =   "WebBrowser.frx":7AD0
  158.             Key             =   "tbrListLinks"
  159.          EndProperty
  160.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  161.             Picture         =   "WebBrowser.frx":7C2C
  162.             Key             =   "tbrDisplayHTMLDoc"
  163.          EndProperty
  164.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  165.             Picture         =   "WebBrowser.frx":7F48
  166.             Key             =   "tbrSaveHTMLDoc"
  167.          EndProperty
  168.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  169.             Picture         =   "WebBrowser.frx":80A4
  170.             Key             =   "tbrPrintHTMLDoc"
  171.          EndProperty
  172.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  173.             Picture         =   "WebBrowser.frx":83C0
  174.             Key             =   "tbrRestoreWebBrowser"
  175.          EndProperty
  176.       EndProperty
  177.    End
  178.    Begin VB.PictureBox picFavouritesListContainer 
  179.       Align           =   1  'Align Top
  180.       Height          =   525
  181.       Left            =   0
  182.       ScaleHeight     =   465
  183.       ScaleWidth      =   11820
  184.       TabIndex        =   5
  185.       TabStop         =   0   'False
  186.       Top             =   795
  187.       Width           =   11880
  188.       Begin VB.PictureBox picLinksListContainer 
  189.          Appearance      =   0  'Flat
  190.          BackColor       =   &H8000000B&
  191.          ForeColor       =   &H80000008&
  192.          Height          =   465
  193.          Left            =   0
  194.          ScaleHeight     =   435
  195.          ScaleWidth      =   11850
  196.          TabIndex        =   17
  197.          TabStop         =   0   'False
  198.          Top             =   0
  199.          Width           =   11880
  200.          Begin VB.ComboBox cboLinksList 
  201.             BackColor       =   &H00FFFFC0&
  202.             Height          =   315
  203.             Left            =   930
  204.             TabIndex        =   18
  205.             Top             =   60
  206.             Width           =   5115
  207.          End
  208.          Begin VB.Label lblLinks 
  209.             Caption         =   "Links:"
  210.             ForeColor       =   &H00800000&
  211.             Height          =   165
  212.             Left            =   60
  213.             TabIndex        =   19
  214.             Top             =   120
  215.             Width           =   825
  216.          End
  217.       End
  218.       Begin VB.PictureBox pic1 
  219.          Height          =   345
  220.          Index           =   3
  221.          Left            =   2640
  222.          ScaleHeight     =   285
  223.          ScaleWidth      =   225
  224.          TabIndex        =   15
  225.          Top             =   60
  226.          Width           =   285
  227.          Begin VB.CommandButton cmdExitFavoritesList 
  228.             BackColor       =   &H00C0C0C0&
  229.             BeginProperty Font 
  230.                Name            =   "MS Sans Serif"
  231.                Size            =   8.25
  232.                Charset         =   0
  233.                Weight          =   700
  234.                Underline       =   0   'False
  235.                Italic          =   0   'False
  236.                Strikethrough   =   0   'False
  237.             EndProperty
  238.             Height          =   285
  239.             Left            =   0
  240.             Picture         =   "WebBrowser.frx":851C
  241.             Style           =   1  'Graphical
  242.             TabIndex        =   16
  243.             ToolTipText     =   "Exit Favorites List (return to Links)"
  244.             Top             =   0
  245.             Width           =   225
  246.          End
  247.       End
  248.       Begin VB.PictureBox pic1 
  249.          Height          =   345
  250.          Index           =   2
  251.          Left            =   2310
  252.          ScaleHeight     =   285
  253.          ScaleWidth      =   225
  254.          TabIndex        =   13
  255.          Top             =   60
  256.          Width           =   285
  257.          Begin VB.CommandButton cmdDeleteFavorite 
  258.             BackColor       =   &H00C0C0C0&
  259.             BeginProperty Font 
  260.                Name            =   "MS Sans Serif"
  261.                Size            =   12
  262.                Charset         =   0
  263.                Weight          =   700
  264.                Underline       =   0   'False
  265.                Italic          =   0   'False
  266.                Strikethrough   =   0   'False
  267.             EndProperty
  268.             Height          =   285
  269.             Left            =   0
  270.             Picture         =   "WebBrowser.frx":8666
  271.             Style           =   1  'Graphical
  272.             TabIndex        =   14
  273.             ToolTipText     =   "Remove from list"
  274.             Top             =   0
  275.             Width           =   225
  276.          End
  277.       End
  278.       Begin VB.PictureBox pic1 
  279.          Height          =   345
  280.          Index           =   1
  281.          Left            =   1980
  282.          ScaleHeight     =   285
  283.          ScaleWidth      =   225
  284.          TabIndex        =   11
  285.          Top             =   60
  286.          Width           =   285
  287.          Begin VB.CommandButton cmdAddFavorite 
  288.             BackColor       =   &H00C0C0C0&
  289.             BeginProperty Font 
  290.                Name            =   "MS Sans Serif"
  291.                Size            =   8.25
  292.                Charset         =   0
  293.                Weight          =   700
  294.                Underline       =   0   'False
  295.                Italic          =   0   'False
  296.                Strikethrough   =   0   'False
  297.             EndProperty
  298.             Height          =   285
  299.             Left            =   0
  300.             Picture         =   "WebBrowser.frx":87B0
  301.             Style           =   1  'Graphical
  302.             TabIndex        =   12
  303.             ToolTipText     =   "Add to Favorites List"
  304.             Top             =   0
  305.             Width           =   225
  306.          End
  307.       End
  308.       Begin VB.ComboBox cboFavoritesList 
  309.          BackColor       =   &H00C0C0FF&
  310.          Height          =   315
  311.          Left            =   3060
  312.          Style           =   2  'Dropdown List
  313.          TabIndex        =   6
  314.          Top             =   60
  315.          Width           =   7485
  316.       End
  317.       Begin VB.PictureBox pic1 
  318.          BackColor       =   &H00FFFFFF&
  319.          Height          =   345
  320.          Index           =   0
  321.          Left            =   1650
  322.          ScaleHeight     =   285
  323.          ScaleWidth      =   225
  324.          TabIndex        =   20
  325.          Top             =   60
  326.          Width           =   285
  327.          Begin VB.CommandButton cmdSelectFavorite 
  328.             BackColor       =   &H00C0C0C0&
  329.             BeginProperty Font 
  330.                Name            =   "MS Sans Serif"
  331.                Size            =   8.25
  332.                Charset         =   0
  333.                Weight          =   700
  334.                Underline       =   0   'False
  335.                Italic          =   0   'False
  336.                Strikethrough   =   0   'False
  337.             EndProperty
  338.             Height          =   285
  339.             Left            =   0
  340.             Picture         =   "WebBrowser.frx":88FA
  341.             Style           =   1  'Graphical
  342.             TabIndex        =   21
  343.             ToolTipText     =   "Select favorite "
  344.             Top             =   0
  345.             Width           =   225
  346.          End
  347.       End
  348.       Begin VB.Label lblFavorites 
  349.          Caption         =   "Favourites:"
  350.          ForeColor       =   &H000000FF&
  351.          Height          =   165
  352.          Left            =   600
  353.          TabIndex        =   7
  354.          Top             =   150
  355.          Width           =   825
  356.       End
  357.    End
  358.    Begin MSComctlLib.Toolbar WebToolbar 
  359.       Align           =   1  'Align Top
  360.       Height          =   360
  361.       Left            =   0
  362.       TabIndex        =   8
  363.       Top             =   0
  364.       Width           =   11880
  365.       _ExtentX        =   20955
  366.       _ExtentY        =   635
  367.       ButtonWidth     =   609
  368.       ButtonHeight    =   582
  369.       AllowCustomize  =   0   'False
  370.       Wrappable       =   0   'False
  371.       Appearance      =   1
  372.       Style           =   1
  373.       ImageList       =   "Imagelist1"
  374.       _Version        =   393216
  375.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  376.          NumButtons      =   22
  377.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  378.             Key             =   "tbrBack"
  379.             Description     =   "Back"
  380.             Object.ToolTipText     =   "Back"
  381.             ImageKey        =   "tbrBack"
  382.             BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628} 
  383.                NumButtonMenus  =   1
  384.                BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628} 
  385.                   Key             =   "Forward"
  386.                EndProperty
  387.             EndProperty
  388.          EndProperty
  389.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  390.             Key             =   "tbrForward"
  391.             Object.ToolTipText     =   "Forward"
  392.             ImageKey        =   "tbrForward"
  393.          EndProperty
  394.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  395.             Key             =   "tbrStop"
  396.             Object.ToolTipText     =   "Stop"
  397.             ImageKey        =   "tbrStop"
  398.             BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628} 
  399.                NumButtonMenus  =   1
  400.                BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628} 
  401.                EndProperty
  402.             EndProperty
  403.          EndProperty
  404.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  405.             Key             =   "tbrRefresh"
  406.             Object.ToolTipText     =   "Refresh"
  407.             ImageKey        =   "tbrRefresh"
  408.          EndProperty
  409.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  410.             Key             =   "tbrHome"
  411.             Object.ToolTipText     =   "Home"
  412.             ImageKey        =   "tbrHome"
  413.          EndProperty
  414.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  415.             Style           =   3
  416.          EndProperty
  417.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  418.             Key             =   "tbrSearch"
  419.             Object.ToolTipText     =   "Search"
  420.             ImageKey        =   "tbrSearch"
  421.             BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628} 
  422.                NumButtonMenus  =   5
  423.                BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628} 
  424.                   Key             =   "Back"
  425.                   Text            =   "Back"
  426.                EndProperty
  427.                BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628} 
  428.                   Key             =   "Forward"
  429.                   Text            =   "Forward"
  430.                EndProperty
  431.                BeginProperty ButtonMenu3 {66833FEE-8583-11D1-B16A-00C0F0283628} 
  432.                   Key             =   "Stop"
  433.                   Text            =   "Stop"
  434.                EndProperty
  435.                BeginProperty ButtonMenu4 {66833FEE-8583-11D1-B16A-00C0F0283628} 
  436.                   Key             =   "Refresh"
  437.                   Text            =   "Refresh"
  438.                EndProperty
  439.                BeginProperty ButtonMenu5 {66833FEE-8583-11D1-B16A-00C0F0283628} 
  440.                   Key             =   "Home"
  441.                   Text            =   "Home"
  442.                EndProperty
  443.             EndProperty
  444.          EndProperty
  445.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  446.             Key             =   "tbrFavoritesList"
  447.             Object.ToolTipText     =   "Display Favorites List"
  448.             ImageKey        =   "tbrFavoritesList"
  449.          EndProperty
  450.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  451.             Style           =   3
  452.          EndProperty
  453.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  454.             Key             =   "tbrPrintDesktop"
  455.             Object.ToolTipText     =   "Print desktop"
  456.             ImageKey        =   "tbrPrintDesktop"
  457.          EndProperty
  458.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  459.             Key             =   "tbrCapDesktop"
  460.             Object.ToolTipText     =   "Capture desktop to file directly"
  461.             ImageKey        =   "tbrCapDesktop"
  462.          EndProperty
  463.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  464.             Style           =   3
  465.          EndProperty
  466.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  467.             Key             =   "tbrInbox"
  468.             Object.ToolTipText     =   "Mail Inbox"
  469.             ImageKey        =   "tbrInbox"
  470.          EndProperty
  471.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  472.             Key             =   "tbrOutbox"
  473.             Object.ToolTipText     =   "Mail Outbox"
  474.             ImageKey        =   "tbrOutbox"
  475.          EndProperty
  476.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  477.             Key             =   "tbrContacts"
  478.             Object.ToolTipText     =   "Contacts"
  479.             ImageKey        =   "tbrContacts"
  480.          EndProperty
  481.          BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  482.             Style           =   3
  483.          EndProperty
  484.          BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  485.             Key             =   "tbrListLinks"
  486.             Object.ToolTipText     =   "List links"
  487.             ImageKey        =   "tbrListLinks"
  488.          EndProperty
  489.          BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  490.             Key             =   "tbrDisplayHTMLDoc"
  491.             Object.ToolTipText     =   "Display HTML document"
  492.             ImageKey        =   "tbrDisplayHTMLDoc"
  493.          EndProperty
  494.          BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  495.             Key             =   "tbrPrintHTMLDoc"
  496.             Object.ToolTipText     =   "Print displayed HTML doc"
  497.             ImageKey        =   "tbrPrintHTMLDoc"
  498.          EndProperty
  499.          BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  500.             Key             =   "tbrSaveHTMLDoc"
  501.             Object.ToolTipText     =   "Save displayed HTML document"
  502.             ImageKey        =   "tbrSaveHTMLDoc"
  503.          EndProperty
  504.          BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  505.             Key             =   "tbrRestoreWebBrowser"
  506.             Object.ToolTipText     =   "Restore web browser"
  507.             ImageKey        =   "tbrRestoreWebBrowser"
  508.          EndProperty
  509.          BeginProperty Button22 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  510.             Style           =   3
  511.          EndProperty
  512.       EndProperty
  513.       Begin MSComctlLib.ProgressBar tbrProgress 
  514.          Height          =   195
  515.          Left            =   9840
  516.          TabIndex        =   10
  517.          Top             =   60
  518.          Width           =   1470
  519.          _ExtentX        =   2593
  520.          _ExtentY        =   344
  521.          _Version        =   393216
  522.          Appearance      =   0
  523.       End
  524.       Begin VB.PictureBox picAnimation 
  525.          Appearance      =   0  'Flat
  526.          BackColor       =   &H80000004&
  527.          ForeColor       =   &H80000008&
  528.          Height          =   285
  529.          Left            =   11550
  530.          Picture         =   "WebBrowser.frx":8A44
  531.          ScaleHeight     =   255
  532.          ScaleWidth      =   255
  533.          TabIndex        =   9
  534.          ToolTipText     =   "Restore web browser"
  535.          Top             =   30
  536.          Width           =   285
  537.       End
  538.    End
  539.    Begin VB.Menu mnuGo 
  540.       Caption         =   "&Go"
  541.       Begin VB.Menu mnuGoBack 
  542.          Caption         =   "&Back"
  543.       End
  544.       Begin VB.Menu mnuGoForward 
  545.          Caption         =   "&Forward"
  546.       End
  547.       Begin VB.Menu mnuGosep1 
  548.          Caption         =   "-"
  549.       End
  550.       Begin VB.Menu mnuGoStop 
  551.          Caption         =   "&Stop"
  552.       End
  553.       Begin VB.Menu mnuGoRefresh 
  554.          Caption         =   "&Refresh"
  555.       End
  556.       Begin VB.Menu mnuGosep2 
  557.          Caption         =   "-"
  558.       End
  559.       Begin VB.Menu mnuGoHome 
  560.          Caption         =   "&Home"
  561.       End
  562.       Begin VB.Menu mnuGosep3 
  563.          Caption         =   "-"
  564.       End
  565.       Begin VB.Menu mnuGoExit 
  566.          Caption         =   "&Exist"
  567.       End
  568.    End
  569.    Begin VB.Menu mnuFile 
  570.       Caption         =   "&File"
  571.       Begin VB.Menu mnuFileSearch 
  572.          Caption         =   "&Search"
  573.       End
  574.       Begin VB.Menu mnuFileSep1 
  575.          Caption         =   "-"
  576.       End
  577.       Begin VB.Menu mnuFileFavoritesList 
  578.          Caption         =   "&Favorites list"
  579.       End
  580.       Begin VB.Menu mnuFileSep2 
  581.          Caption         =   "-"
  582.       End
  583.       Begin VB.Menu mnuURLHistory 
  584.          Caption         =   "URLHistory"
  585.          Index           =   0
  586.          Visible         =   0   'False
  587.       End
  588.       Begin VB.Menu mnuURLHistory 
  589.          Caption         =   "URLHistory1"
  590.          Index           =   1
  591.          Visible         =   0   'False
  592.       End
  593.       Begin VB.Menu mnuURLHistory 
  594.          Caption         =   "URLHistory2"
  595.          Index           =   2
  596.          Visible         =   0   'False
  597.       End
  598.       Begin VB.Menu mnuURLHistory 
  599.          Caption         =   "URLHistory3"
  600.          Index           =   3
  601.          Visible         =   0   'False
  602.       End
  603.       Begin VB.Menu mnuURLHistory 
  604.          Caption         =   "URLHistory4"
  605.          Index           =   4
  606.          Visible         =   0   'False
  607.       End
  608.       Begin VB.Menu mnuURLHistory 
  609.          Caption         =   "URLHistory5"
  610.          Index           =   5
  611.          Visible         =   0   'False
  612.       End
  613.       Begin VB.Menu mnuURLHistory 
  614.          Caption         =   "URLHistory6"
  615.          Index           =   6
  616.          Visible         =   0   'False
  617.       End
  618.       Begin VB.Menu mnuURLHistory 
  619.          Caption         =   "URLHistory7"
  620.          Index           =   7
  621.          Visible         =   0   'False
  622.       End
  623.       Begin VB.Menu mnuURLHistory 
  624.          Caption         =   "URLHistory8"
  625.          Index           =   8
  626.          Visible         =   0   'False
  627.       End
  628.       Begin VB.Menu mnuURLHistory 
  629.          Caption         =   "URLHistory9"
  630.          Index           =   9
  631.          Visible         =   0   'False
  632.       End
  633.    End
  634.    Begin VB.Menu mnuOptions 
  635.       Caption         =   "&Options"
  636.       Begin VB.Menu mnuOptionsToolbar 
  637.          Caption         =   "&Toolbar"
  638.       End
  639.       Begin VB.Menu mnuOptionsStatusbar 
  640.          Caption         =   "&Statusbar"
  641.       End
  642.    End
  643.    Begin VB.Menu mnuCopy 
  644.       Caption         =   "&Copy"
  645.       Begin VB.Menu mnuCopyPrintDesktop 
  646.          Caption         =   "&Print desktop"
  647.       End
  648.       Begin VB.Menu mnuCopysep1 
  649.          Caption         =   "-"
  650.       End
  651.       Begin VB.Menu mnuCopyCapDeskTop 
  652.          Caption         =   "&Capture desktop to file direct"
  653.       End
  654.       Begin VB.Menu mnuCopysep2 
  655.          Caption         =   "-"
  656.       End
  657.       Begin VB.Menu mnuCopySaveDesktopFromClip 
  658.          Caption         =   "Save &desktop  from clipboard (PrnScreen first)"
  659.       End
  660.       Begin VB.Menu mnuCopySaveTextFromClip 
  661.          Caption         =   "Save &text (Copy to clipboard first)"
  662.       End
  663.    End
  664.    Begin VB.Menu mnuMail 
  665.       Caption         =   "&Mail"
  666.       Begin VB.Menu mnuMailInbox 
  667.          Caption         =   "&Inbox"
  668.       End
  669.       Begin VB.Menu mnuMailOutbox 
  670.          Caption         =   "&Outbox"
  671.       End
  672.       Begin VB.Menu mnuMailContacts 
  673.          Caption         =   "&Contacts"
  674.       End
  675.    End
  676.    Begin VB.Menu mnuLinks 
  677.       Caption         =   "&Links"
  678.       Begin VB.Menu mnuLinksListLinks 
  679.          Caption         =   "&List links"
  680.       End
  681.       Begin VB.Menu mnuLinksep1 
  682.          Caption         =   "-"
  683.       End
  684.       Begin VB.Menu mnuLinksDisplayHTMLDoc 
  685.          Caption         =   "&Dispaly HTML doc"
  686.       End
  687.       Begin VB.Menu mnuLinksep2 
  688.          Caption         =   "-"
  689.       End
  690.       Begin VB.Menu mnuLinksPrintHTMLdoc 
  691.          Caption         =   "&Print HTML doc"
  692.       End
  693.       Begin VB.Menu mnuLinksSaveHTMLdoc 
  694.          Caption         =   "&Save HTML doc"
  695.       End
  696.       Begin VB.Menu mnuLinksep3 
  697.          Caption         =   "-"
  698.       End
  699.       Begin VB.Menu mnuLinksRestoreWebBrowser 
  700.          Caption         =   "&Restore web browser"
  701.       End
  702.    End
  703. Attribute VB_Name = "frmWebBrowser"
  704. Attribute VB_GlobalNameSpace = False
  705. Attribute VB_Creatable = False
  706. Attribute VB_PredeclaredId = True
  707. Attribute VB_Exposed = False
  708. ' WebBrowser.frm
  709. ' By Herman Liu
  710. '---------------------------
  711. ' Notes:
  712. '     Include "MS Outlook 98 Object Model" in Project's Reference.
  713. '     If you don't have Outlook, then block/remove at least the following lines (you can
  714. '     leave the menu items and toolbar menus to remain there):
  715. '     (a) Dim oloAPP As Outlook.Application
  716. '         All  ....olo....  lines
  717. '     (b) Sub Outlooklogon(mWhat As String)
  718. '          ....
  719. '         End Sub
  720. '     (c) (In Sub WebToolBar_ButtonClick)
  721. '         Case "TBRINBOX"
  722. '            Outlooklogon "Inbox"
  723. '         Case "TBROUTBOX"
  724. '            Outlooklogon "Outbox"
  725. '         Case "TBRCONTACTS"
  726. '            Outlooklogon "Contacts"
  727. '----------------------------------------------------------------------------
  728. Option Explicit
  729. Private Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long
  730. Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
  731. Private Const VK_MENU = &H12
  732. Private Const VK_SNAPSHOT = &H2C
  733. Private Const KEYEVENTF_KEYUP = &H2
  734. Dim FavoriteFileName As String
  735. Dim mbDontNavigateNow As Boolean
  736. Dim mFrameNum As Integer
  737. Dim mForward As Boolean
  738. Dim mBackward As Boolean
  739. Dim oloAPP As Outlook.Application
  740. Dim oloNS As Outlook.NameSpace
  741. Dim oloFolder As Outlook.MAPIFolder
  742. Dim oloNewMail As Outlook.MailItem
  743. Dim oloAddrList As Outlook.AddressList
  744. Dim oloAddrEntry As Outlook.AddressEntry
  745. Dim oloSharedFolder As Outlook.MAPIFolder
  746. Dim oloRecipient As Outlook.Recipient
  747. Dim URLFailedFlag As Boolean
  748. Dim origToolBarOn As Boolean
  749. Dim gcdg As Object
  750. Const gconThisapp = "HCLappDB"
  751. Const gconURLKey = "URL History"
  752. Private Sub Form_Load()
  753.     On Error Resume Next
  754.     origToolBarOn = frmFrame.FrameToolBar.Visible
  755.        ' Get rid of existing main toolbar
  756.     frmFrame.FrameToolBar.Visible = False
  757.     Me.AutoRedraw = True
  758.     mFrameNum = 1
  759.     mForward = True
  760.     mBackward = False
  761.     mnuOptionsToolbar.Checked = True
  762.       ' Test existence of Favorites.rtf, if not, will create one.
  763.     FavoriteFileName = App.Path & "\Favorites.txt"
  764.     Dim mHandle
  765.     mHandle = FreeFile
  766.     Open FavoriteFileName For Binary As #mHandle
  767.     Close #mHandle
  768.     Me.Show
  769.     Form_Resize
  770.     timer1.Interval = 500
  771.     Text1.Visible = False
  772.     ctlWebBrowser.Visible = True
  773.     picLinksListContainer.Visible = True
  774.     ToggleLinksMenus True
  775.     GetRecentURLs
  776.       ' Use whatever user's default home address
  777.     mnuGoHome_Click
  778. End Sub
  779. Private Sub Form_Activate()
  780.     FillcboFavoritesList
  781. End Sub
  782. Private Sub FillcboFavoritesList()
  783.     Dim mHandle
  784.     Dim tmp As String
  785.     cboFavoritesList.Clear
  786.     mHandle = FreeFile
  787.     Open FavoriteFileName For Input As #mHandle
  788.     Do While Not EOF(mHandle)
  789.         Line Input #mHandle, tmp
  790.         If Len(Trim(tmp)) > 0 Then
  791.             cboFavoritesList.AddItem tmp
  792.         End If
  793.     Loop
  794.     Close #mHandle
  795.     If cboFavoritesList.ListCount > 0 Then
  796.         cboFavoritesList.ListIndex = 0
  797.     End If
  798. End Sub
  799. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  800.     On Error Resume Next
  801.     Screen.MousePointer = vbDefault
  802.     frmFrame.FrameToolBar.Visible = origToolBarOn
  803.     ctlInet.Cancel
  804. End Sub
  805. Private Sub Form_Resize()
  806.     On Error Resume Next
  807.     cboAddress.Width = Me.ScaleWidth - cboAddress.Left - 100
  808.     cboLinksList.Width = Me.ScaleWidth - cboLinksList.Left - 100
  809.     ctlWebBrowser.Width = Me.ScaleWidth - 100
  810.     ctlWebBrowser.Height = Me.ScaleHeight - (picLinksListContainer.Top + _
  811.         picLinksListContainer.Height) - 500
  812.     Text1.Width = ctlWebBrowser.Width
  813.     Text1.Height = ctlWebBrowser.Height
  814. End Sub
  815. Private Sub cboAddress_Click()
  816.     If mbDontNavigateNow Then
  817.          Exit Sub
  818.     End If
  819.     cboLinksList.Clear
  820.     doNavigate cboAddress.Text
  821.     If URLFailedFlag = False Then
  822.          WriteRecentURLs cboAddress.Text
  823.          GetRecentURLs
  824.          ctlWebBrowser.SetFocus
  825.     End If
  826. End Sub
  827. Private Sub cboAddress_KeyPress(KeyAscii As Integer)
  828.     If KeyAscii = vbKeyReturn Then
  829.         cboAddress_Click
  830.     End If
  831. End Sub
  832. Private Sub doNavigate(inAddress As String)
  833.     Screen.MousePointer = vbHourglass
  834.     If Len(inAddress) > 0 Then
  835.         cboLinksList.Clear
  836.         mnuLinksRestoreWebBrowser_Click
  837.           'try to navigate to the address
  838.         timer1.Enabled = True
  839.         ctlWebBrowser.Navigate inAddress
  840.     End If
  841.     Screen.MousePointer = vbDefault
  842. End Sub
  843. Private Sub ctlWebBrowser_DownloadComplete()
  844.     On Error Resume Next
  845.     Me.Caption = ctlWebBrowser.LocationName
  846. End Sub
  847. Private Sub ctlWebBrowser_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
  848.     On Error Resume Next
  849.     Dim i As Integer
  850.     Dim bFound As Boolean
  851.     Me.Caption = ctlWebBrowser.LocationName
  852.     For i = 0 To cboAddress.ListCount - 1
  853.         If cboAddress.List(i) = ctlWebBrowser.LocationURL Then
  854.             bFound = True
  855.             Exit For
  856.         End If
  857.     Next i
  858.     mbDontNavigateNow = True
  859.     If bFound Then
  860.         cboAddress.RemoveItem i
  861.         URLFailedFlag = False
  862.     Else
  863.         URLFailedFlag = True
  864.     End If
  865.     cboAddress.AddItem ctlWebBrowser.LocationURL, 0
  866.     cboAddress.ListIndex = 0
  867.     mbDontNavigateNow = False
  868. End Sub
  869. ' For frmWebBrowser's own toolbar
  870. Private Sub mnuOptionsToolbar_Click()
  871.     Me.mnuOptionsToolbar.Checked = Not Me.mnuOptionsToolbar.Checked
  872.     If Me.mnuOptionsToolbar.Checked Then
  873.         Me.WebToolbar.Visible = True
  874.         ctlWebBrowser.Top = ctlWebBrowser.Top + Me.WebToolbar.Height
  875.     Else
  876.         Me.WebToolbar.Visible = False
  877.         ctlWebBrowser.Top = ctlWebBrowser.Top - Me.WebToolbar.Height
  878.     End If
  879. End Sub
  880. ' For frmFrame's status bar
  881. Private Sub mnuOptionsStatusbar_Click()
  882.     OptionsStatusbarProc Me
  883. End Sub
  884. Private Sub mnuOptions_Click()
  885.     mnuOptionsToolbar.Checked = Me.WebToolbar.Visible
  886.     mnuOptionsStatusbar.Checked = frmFrame.StatusBar1.Visible
  887. End Sub
  888. Private Sub mnuLinksListLinks_Click()
  889.      If cboAddress.Text = "" Then
  890.          MsgBox "No URL/address yet"
  891.          Exit Sub
  892.      End If
  893.      Screen.MousePointer = vbHourglass
  894.      picLinksListContainer.Visible = True
  895.       ' Fill cboLinksList with available links
  896.      cboLinksList.Clear
  897.      Dim i
  898.      For i = 0 To ctlWebBrowser.Document.links.Length - 1
  899.           cboLinksList.AddItem ctlWebBrowser.Document.links(i).href
  900.               ' We wish to limit the number
  901.           If i >= 100 Then
  902.                Exit For
  903.           End If
  904.      Next i
  905.      Screen.MousePointer = vbDefault
  906.      If i = 0 Then
  907.           MsgBox "No links listed, try a different level or a different URL"
  908.      Else
  909.           cboLinksList.ListIndex = 0
  910.           ctlWebBrowser.SetFocus
  911.      End If
  912.  End Sub
  913. Private Sub mnuLinksPrintHTMLdoc_Click()
  914.     On Error GoTo Errhandler
  915.     If cboLinksList.ListCount = 0 Then
  916.          MsgBox "No HTML document yet"
  917.          Exit Sub
  918.     End If
  919.     If Text1.Text = "" Then
  920.         MsgBox "You have not yet fetched HTML document or HTML document empty"
  921.           Exit Sub
  922.     End If
  923.     Set gcdg = frmFrame.CommonDialog1
  924.     gcdg.DialogTitle = "Print"
  925.     gcdg.CancelError = True
  926.     gcdg.Flags = cdlPDReturnDC + cdlPDPageNums
  927.     gcdg.ShowPrinter
  928.     If Err = MSComDlg.cdlCancel Then
  929.          Exit Sub
  930.     End If
  931.     Text1.SelPrint gcdg.hDC, True
  932.     Set gcdg = Nothing
  933.     Exit Sub
  934.      
  935. Errhandler:
  936.      If Err <> 32755 Then
  937.           ErrMsgProc "mnuLinkPrintHTMLDoc_Click"
  938.      End If
  939. End Sub
  940. Private Sub mnuLinksSaveHTMLDoc_Click()
  941.      On Error GoTo Errhandler
  942.      If cboLinksList.ListCount = 0 Then
  943.           MsgBox "No HTML document yet"
  944.           Exit Sub
  945.      End If
  946.      If Text1.Text = "" Then
  947.           MsgBox "You have not yet fetched HTML document or HTML document empty"
  948.           Exit Sub
  949.      End If
  950.      Dim mfilespec As String
  951.      Set gcdg = frmFrame.CommonDialog1
  952.      gcdg.FileName = mfilespec
  953.      gcdg.Flags = cdlOFNOverwritePrompt
  954.      gcdg.ShowSave
  955.      If gcdg.FileName = "" Then
  956.           Exit Sub
  957.      End If
  958.      mfilespec = gcdg.FileName
  959.      Screen.MousePointer = vbHourglass
  960.      If mfilespec <> "" Then
  961.           Text1.SaveFile mfilespec, 1
  962.      End If
  963.      Set gcdg = Nothing
  964.      Screen.MousePointer = vbDefault
  965.      Exit Sub
  966.      
  967. Errhandler:
  968.      Screen.MousePointer = vbDefault
  969.      If Err <> 32755 Then
  970.           ErrMsgProc "mnuLinkSaveHTMLDoc_Click"
  971.      End If
  972. End Sub
  973. Private Sub mnuLinksDisplayHTMLDoc_Click()
  974.      On Error Resume Next                   ' May disp empty page, e.g if not connected
  975.      If cboLinksList.Text = "" Then
  976.           MsgBox "No listed links yet"
  977.           Exit Sub
  978.      End If
  979.      Dim HTMLcontent
  980.      Screen.MousePointer = vbHourglass
  981.      picLinksListContainer.Visible = True
  982.      Text1.Text = ""
  983.       ' Open the URL / try to open
  984.      HTMLcontent = ctlInet.OpenURL(cboLinksList.Text)
  985.      Text1.SelRTF = HTMLcontent
  986.      ctlWebBrowser.Visible = False
  987.      Text1.Visible = True
  988.      ToggleLinksMenus False
  989.      Text1.SetFocus
  990.      Screen.MousePointer = vbDefault
  991. End Sub
  992. Private Sub mnuLinksRestoreWebBrowser_Click()
  993.      If ctlWebBrowser.Visible = True Then
  994.           Text1.Visible = False
  995.           Exit Sub
  996.      End If
  997.      picLinksListContainer.Visible = True
  998.      Text1.Text = ""
  999.      Text1.Visible = False
  1000.      ctlWebBrowser.Visible = True
  1001.      ToggleLinksMenus True
  1002. End Sub
  1003. Private Sub ToggleLinksMenus(Onoff As Boolean)
  1004.      Screen.MousePointer = vbHourglass
  1005.      mnuGo.Enabled = Onoff
  1006.      mnuFile.Enabled = Onoff
  1007.      mnuCopy.Enabled = Onoff
  1008.      WebToolbar.Buttons("tbrBack").Enabled = Onoff
  1009.      WebToolbar.Buttons("tbrForward").Enabled = Onoff
  1010.      WebToolbar.Buttons("tbrStop").Enabled = Onoff
  1011.      WebToolbar.Buttons("tbrHome").Enabled = Onoff
  1012.      WebToolbar.Buttons("tbrRefresh").Enabled = Onoff
  1013.      WebToolbar.Buttons("tbrSearch").Enabled = Onoff
  1014.      WebToolbar.Buttons("tbrFavoritesList").Enabled = Onoff
  1015.      WebToolbar.Buttons("tbrPrintDesktop").Enabled = Onoff
  1016.      WebToolbar.Buttons("tbrCapDesktop").Enabled = Onoff
  1017.      mnuLinksPrintHTMLdoc.Enabled = Not Onoff
  1018.      mnuLinksSaveHTMLdoc.Enabled = Not Onoff
  1019.      WebToolbar.Buttons("tbrPrintHTMLDoc").Enabled = Not Onoff
  1020.      WebToolbar.Buttons("tbrSaveHTMLDoc").Enabled = Not Onoff
  1021.      Screen.MousePointer = vbDefault
  1022. End Sub
  1023. Private Sub Timer1_Timer()
  1024.     If ctlWebBrowser.Busy = False Then
  1025.         Me.Caption = ctlWebBrowser.LocationName
  1026.         Me.tbrProgress.Value = 0
  1027.     Else
  1028.         Me.Caption = "Processing..."
  1029.     End If
  1030. End Sub
  1031. Private Sub WebToolBar_ButtonClick(ByVal Button As Button)
  1032.     On Error Resume Next
  1033.     timer1.Enabled = True
  1034.     Me.tbrProgress.Value = 90
  1035.     Select Case UCase(Button.key)
  1036.         Case "TBRBACK"
  1037.             ctlWebBrowser.GoBack
  1038.         Case "TBRFORWARD"
  1039.             ctlWebBrowser.GoForward
  1040.         Case "TBRSTOP"
  1041.             Me.tbrProgress.Value = 0
  1042.             timer1.Enabled = False
  1043.             ctlWebBrowser.Stop
  1044.             Me.Caption = ctlWebBrowser.LocationName
  1045.         Case "TBRREFRESH"
  1046.             ctlWebBrowser.Refresh
  1047.         Case "TBRHOME"
  1048.             ctlWebBrowser.GoHome
  1049.         Case "TBRSEARCH"
  1050.             ctlWebBrowser.GoSearch
  1051.         Case "TBRFAVORITESLIST"
  1052.             mnuFileFavoritesList_Click
  1053.         Case "TBRPRINTDESKTOP"
  1054.             mnuCopyPrintDesktop_Click
  1055.         Case "TBRCAPDESKTOP"
  1056.             mnuCopyCapDeskTop_Click
  1057.         Case "TBRINBOX"
  1058.             Outlooklogon "Inbox"
  1059.         Case "TBROUTBOX"
  1060.             Outlooklogon "Outbox"
  1061.         Case "TBRCONTACTS"
  1062.             Outlooklogon "Contacts"
  1063.         Case "TBRLISTLINKS"
  1064.             mnuLinksListLinks_Click
  1065.         Case "TBRDISPLAYHTMLDOC"
  1066.             mnuLinksDisplayHTMLDoc_Click
  1067.         Case "TBRPRINTHTMLDOC"
  1068.             mnuLinksPrintHTMLdoc_Click
  1069.         Case "TBRSAVEHTMLDOC"
  1070.             mnuLinksSaveHTMLDoc_Click
  1071.         Case "TBRRESTOREWEBBROWSER"
  1072.             mnuLinksRestoreWebBrowser_Click
  1073.     End Select
  1074. End Sub
  1075. Private Sub picAnimation_Click()
  1076.     mnuLinksRestoreWebBrowser_Click
  1077. End Sub
  1078. Private Sub mnuGoBack_Click()
  1079.     WebToolBar_ButtonClick frmWebBrowser.WebToolbar.Buttons("tbrBack")
  1080. End Sub
  1081. Private Sub mnuGoForward_Click()
  1082.     WebToolBar_ButtonClick frmWebBrowser.WebToolbar.Buttons("tbrForward")
  1083. End Sub
  1084. Private Sub mnuGoHome_Click()
  1085.       ' Ensure ctlWebBrowser to be visible
  1086.     mnuLinksRestoreWebBrowser_Click
  1087.     WebToolBar_ButtonClick frmWebBrowser.WebToolbar.Buttons("tbrHome")
  1088. End Sub
  1089. Private Sub mnuGoRefresh_Click()
  1090.     mnuLinksRestoreWebBrowser_Click
  1091.     WebToolBar_ButtonClick frmWebBrowser.WebToolbar.Buttons("tbrRefresh")
  1092. End Sub
  1093. Private Sub mnuGoStop_Click()
  1094.     WebToolBar_ButtonClick frmWebBrowser.WebToolbar.Buttons("tbrStop")
  1095. End Sub
  1096. Private Sub mnuGoExit_Click()
  1097.     Unload Me
  1098. End Sub
  1099. Private Sub mnuFileSearch_Click()
  1100.     WebToolBar_ButtonClick frmWebBrowser.WebToolbar.Buttons("tbrSearch")
  1101. End Sub
  1102. Private Sub mnuFileFavoritesList_Click()
  1103.     picLinksListContainer.Visible = False
  1104. End Sub
  1105. Private Sub mnuURLHistory_Click(Index As Integer)
  1106.     cboAddress.Text = mnuURLHistory(Index).Caption
  1107.     cboAddress.SetFocus
  1108. End Sub
  1109. Private Sub GetRecentURLs()
  1110.     On Error Resume Next
  1111.     Dim i As Integer
  1112.     Dim varURLs As Variant      '
  1113.     Dim key As String
  1114.     If GetSetting(gconThisapp, gconURLKey, "URLHistory1") = Empty Then
  1115.         Exit Sub
  1116.     End If
  1117.     varURLs = GetAllSettings(gconThisapp, gconURLKey)
  1118.     For i = 0 To UBound(varURLs, 1)
  1119.           mnuURLHistory(0).Visible = True
  1120.           mnuURLHistory(i).Caption = varURLs(i, 1)
  1121.           mnuURLHistory(i).Visible = True
  1122.     Next i
  1123. End Sub
  1124. Sub WriteRecentURLs(inURL As String)
  1125.     If LTrim(Trim(inURL)) = "" Then
  1126.         Exit Sub
  1127.     End If
  1128.     Dim i As Integer
  1129.     Dim strURL, key As String
  1130.     Dim arrList(8) As String
  1131.     For i = 9 To 1 Step -1
  1132.         key = "URLHistory" & i
  1133.         strURL = GetSetting(gconThisapp, gconURLKey, key)
  1134.         If strURL <> "" Then
  1135.             key = "URLHistory" & (i + 1)
  1136.             SaveSetting gconThisapp, gconURLKey, key, strURL
  1137.             arrList(i - 1) = strURL
  1138.         End If
  1139.     Next i
  1140.     SaveSetting gconThisapp, gconURLKey, "URLHistory1", inURL
  1141. End Sub
  1142. Private Sub mnuMailInbox_Click()
  1143.     WebToolBar_ButtonClick frmWebBrowser.WebToolbar.Buttons("tbrInbox")
  1144. End Sub
  1145. Private Sub mnuMailOutbox_Click()
  1146.     WebToolBar_ButtonClick frmWebBrowser.WebToolbar.Buttons("tbrOutbox")
  1147. End Sub
  1148. Private Sub mnuMailContacts_Click()
  1149.     WebToolBar_ButtonClick frmWebBrowser.WebToolbar.Buttons("tbrContacts")
  1150. End Sub
  1151. Private Sub Outlooklogon(mWhat As String)
  1152.      ' Ignore errors first, when we look for a running copy
  1153.     On Error Resume Next
  1154.     Set oloAPP = GetObject(, "Outlook.Application")
  1155.     If Err.Number <> 0 Then          'If Outlook is not running then
  1156.         Set oloAPP = CreateObject("Outlook.Application")
  1157.     End If
  1158.     Err.Clear   ' In case error occurred.
  1159.     On Error GoTo Errhandler
  1160.        ' Get namespace for "MAPI"
  1161.     Set oloNS = oloAPP.GetNamespace("MAPI")
  1162.        ' Let the user logon to Outlook with the Outlook Profile dialog box,
  1163.        ' and then create a new session.
  1164.     oloNS.Logon "", "", True, True
  1165.     Select Case UCase(mWhat)
  1166.         Case "INBOX"
  1167.             GetInbox
  1168.         Case "OUTBOX"
  1169.             GetOutbox
  1170.         Case "CONTACTS"
  1171.             GetContacts
  1172.     End Select
  1173.     CleanUpOutlook
  1174.     Exit Sub
  1175. Errhandler:
  1176.    ErrMsgProc "OutlookLogon"
  1177. End Sub
  1178. Private Sub GetInbox()
  1179.     Set oloFolder = oloNS.GetDefaultFolder(olFolderInbox)
  1180.       'Display the Inbox in a new Explorer window
  1181.     oloFolder.Display
  1182. End Sub
  1183. Private Sub GetOutbox()
  1184.     Set oloFolder = oloNS.GetDefaultFolder(olFolderOutbox)
  1185.     oloFolder.Display
  1186. End Sub
  1187. Private Sub GetContacts()
  1188.     Set oloFolder = oloNS.GetDefaultFolder(olFolderContacts)
  1189.     oloFolder.Display
  1190. End Sub
  1191. Private Sub CleanUpOutlook()
  1192.     oloNS.Logoff
  1193.     Set oloNS = Nothing
  1194.     Set oloAPP = Nothing
  1195. End Sub
  1196. Private Sub GetSharedFolder(strRecipient As String)
  1197.       'Create a new recipient object and resolve it.
  1198.     Set oloRecipient = oloNS.CreateRecipient(strRecipient)
  1199.     oloRecipient.Resolve
  1200.     'If this user exists on the Exchange server..
  1201.     If oloRecipient.Resolved Then
  1202.           'Get the shared calendar folder
  1203.         Set oloSharedFolder = oloNS.GetSharedDefaultFolder _
  1204.               (oloRecipient, olFolderCalendar)
  1205.           'Display it in a new Outlook Explorer window.
  1206.         oloSharedFolder.Display
  1207.     Else
  1208.         MsgBox "Unable to locate " & strRecipient & _
  1209.            "Try another name.", vbInformation
  1210.     End If
  1211. End Sub
  1212. Private Sub NewMailMessage()
  1213.       'Create a new mail message item.
  1214.     Set oloNewMail = oloAPP.CreateItem(olMailItem)
  1215.     With oloNewMail
  1216.            'Add the subject of the mail message.
  1217.         .Subject = ""
  1218.            'Create some body text.
  1219.         .Body = ""
  1220.            'Add a recipient and test to make sure that the
  1221.            'address is valid using the Resolve method.
  1222.         With .Recipients.Add("xxxx@yyyyyyy.com")
  1223.             .Type = olTo
  1224.         End With
  1225.         With .Attachments.Add _
  1226.             ("", olByReference)
  1227.             .DisplayName = ""
  1228.         End With
  1229.         'Send the mail message.
  1230.         .Send
  1231.     End With
  1232. End Sub
  1233. Private Sub mnuCopyPrintDesktop_Click()
  1234.     On Error GoTo Errhandler
  1235.     Set gcdg = frmFrame.CommonDialog1
  1236.     gcdg.DialogTitle = "Print"
  1237.     gcdg.CancelError = True
  1238.     gcdg.Flags = cdlPDReturnDC + cdlPDPageNums
  1239.     gcdg.ShowPrinter
  1240.     If Err = MSComDlg.cdlCancel Then
  1241.          Set gcdg = Nothing
  1242.          Exit Sub
  1243.     End If
  1244.     Me.PrintForm
  1245.     Set gcdg = Nothing
  1246.     Exit Sub
  1247. Errhandler:
  1248.     If Err <> 32755 Then
  1249.          ErrMsgProc "mnuCopyPrintDesktop_Click"
  1250.     End If
  1251. End Sub
  1252. ' Save current screen to file directly
  1253. Private Sub mnuCopyCapDeskTop_Click()
  1254.     On Error GoTo Errhandler
  1255.     Dim mfilespec As String
  1256.     Set gcdg = frmFrame.CommonDialog1
  1257.     gcdg.FileName = mfilespec
  1258.     gcdg.Flags = cdlOFNOverwritePrompt
  1259.     gcdg.ShowSave
  1260.     If gcdg.FileName = "" Then
  1261.         Set gcdg = Nothing
  1262.         Exit Sub
  1263.     End If
  1264.     mfilespec = gcdg.FileName
  1265.     Clipboard.Clear
  1266.     keybd_event VK_MENU, 0, 0, 0          ' Plant "Alt" key
  1267.     DoEvents
  1268.     keybd_event VK_SNAPSHOT, 1, 0, 0      ' Plant "Print Screen" key
  1269.     DoEvents
  1270.     keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0     ' Release "Alt" key
  1271.     DoEvents
  1272.       ' (Image is now in clipboard) print from clipboard to file
  1273.     SavePicture Clipboard.GetData(0), mfilespec
  1274.     Clipboard.Clear
  1275.     Set gcdg = Nothing
  1276.     Exit Sub
  1277. Errhandler:
  1278.     If Err <> 32755 Then
  1279.          ErrMsgProc "mnuCopyCapDeskTop_Click"
  1280.     End If
  1281. End Sub
  1282. ' Save desktop in clipboard to file
  1283. ' Sometimes you cannot invoke Save menu when a current screen
  1284. ' is active, in this case you need to Alt+PrintScreen to capture
  1285. ' that screen to clipboard first.  When menu is visible again,
  1286. ' use this function to save stored image to file.
  1287. Private Sub mnuCopySaveDesktopFromClip_Click()
  1288.     On Error GoTo Errhandler
  1289.     If Not (Clipboard.GetFormat(vbCFBitmap) Or Clipboard.GetFormat(vbCFMetafile) Or _
  1290.        Clipboard.GetFormat(vbCFDIB) Or Clipboard.GetFormat(vbCFPalette)) Then
  1291.          MsgBox "No picture in clipboard yet"
  1292.          Exit Sub
  1293.     End If
  1294.     Dim mfilespec As String
  1295.     Set gcdg = frmFrame.CommonDialog1
  1296.     gcdg.FileName = mfilespec
  1297.     gcdg.Flags = cdlOFNOverwritePrompt
  1298.     gcdg.ShowSave
  1299.     If gcdg.FileName = "" Then
  1300.          Set gcdg = Nothing
  1301.          Exit Sub
  1302.     End If
  1303.     mfilespec = gcdg.FileName
  1304.     Clipboard.Clear
  1305.     keybd_event VK_MENU, 0, 0, 0          ' Plant "Alt" key
  1306.     DoEvents
  1307.     keybd_event VK_SNAPSHOT, 1, 0, 0      ' Plant "Print Screen" key
  1308.     DoEvents
  1309.     keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0     ' Release "Alt" key
  1310.     DoEvents
  1311.       ' (Image is now in clipboard) print from clipboard to file
  1312.     SavePicture Clipboard.GetData(0), mfilespec
  1313.     Clipboard.Clear
  1314.     Set gcdg = Nothing
  1315.     Exit Sub
  1316. Errhandler:
  1317.     If Err <> 32755 Then
  1318.          ErrMsgProc "mnuCopySaveDesktopFromClip_Click"
  1319.     End If
  1320. End Sub
  1321. Private Sub mnuCopySaveTextFromClip_Click()
  1322.     On Error GoTo Errhandler
  1323.     Set gcdg = frmFrame.CommonDialog1
  1324.     If Clipboard.GetFormat(vbCFText) Then
  1325.         Dim mfilespec As String
  1326.         gcdg.FileName = mfilespec
  1327.         gcdg.Flags = cdlOFNOverwritePrompt
  1328.         gcdg.ShowSave
  1329.         If gcdg.FileName = "" Then
  1330.             Set gcdg = Nothing
  1331.             Exit Sub
  1332.         End If
  1333.         mfilespec = gcdg.FileName
  1334.         Text1.Text = ""
  1335.         Text1.SelText = Clipboard.GetText()
  1336.         If Text1.Text = "" Then
  1337.             MsgBox "Failure to copy clipboard text"
  1338.             Exit Sub
  1339.         End If
  1340.         Text1.SaveFile mfilespec, rtfRTF
  1341.         Text1.Text = ""
  1342.     Else
  1343.         MsgBox "No text in clipboard yet"
  1344.     End If
  1345.     Set gcdg = Nothing
  1346.     Exit Sub
  1347. Errhandler:
  1348.     If Err <> 32755 Then
  1349.          ErrMsgProc "mnuCopySaveTextFromClip_Click"
  1350.     End If
  1351. End Sub
  1352. Private Sub cmdSelectFavorite_Click()
  1353.     If cboFavoritesList.ListCount = 0 Then
  1354.         MsgBox "No entry in Favorites List yet"
  1355.         Exit Sub
  1356.     End If
  1357.     cboAddress.Text = cboFavoritesList.Text
  1358.     cboAddress.SetFocus
  1359. End Sub
  1360. Private Sub cmdAddFavorite_Click()
  1361.     Screen.MousePointer = vbHourglass
  1362.     Dim mHandle As Variant
  1363.     Dim arrLines() As String
  1364.     Text1.Text = ""
  1365.     mHandle = FreeFile
  1366.     Open FavoriteFileName For Input As #mHandle
  1367.     Text1 = StrConv(InputB(LOF(mHandle), 1), vbUnicode)
  1368.     If Text1.Text <> "" Then
  1369.         If cboFavoritesList.ListCount > 0 Then
  1370.              If LineThere(cboAddress.Text) = True Then
  1371.                   Close #mHandle
  1372.                   Screen.MousePointer = vbDefault
  1373.                   MsgBox "Favorites List already has this entry"
  1374.                   Exit Sub
  1375.              End If
  1376.         End If
  1377.         Text1.Text = Text1.Text & vbCrLf & LTrim(Trim(cboAddress.Text))
  1378.     Else
  1379.         Text1.Text = LTrim(Trim(cboAddress.Text))
  1380.     End If
  1381.     Close #mHandle
  1382.     Me.Text1.SaveFile FavoriteFileName, 1
  1383.     Me.Text1.Text = ""
  1384.     SortFileLines
  1385.     FillcboFavoritesList
  1386.     ctlWebBrowser.SetFocus
  1387.     Screen.MousePointer = vbDefault
  1388. End Sub
  1389. Private Sub cmdDeleteFavorite_Click()
  1390.     If cboFavoritesList.ListCount = 0 Then
  1391.          MsgBox "No entry in Favorites List yet"
  1392.          Exit Sub
  1393.     End If
  1394.         
  1395.     Screen.MousePointer = vbHourglass
  1396.     Dim mHandle
  1397.     Dim h, i
  1398.     Dim tmp
  1399.     i = cboFavoritesList.ListIndex
  1400.     cboFavoritesList.RemoveItem i
  1401.     DoEvents
  1402.       ' Copy combo items to file.
  1403.     mHandle = FreeFile
  1404.     Open FavoriteFileName For Output As #mHandle
  1405.     For i = 0 To cboFavoritesList.ListCount - 1
  1406.          tmp = cboFavoritesList.List(i)
  1407.          Print #mHandle, tmp
  1408.          If i < (cboFavoritesList.ListCount - 1) Then
  1409.               Print #mHandle, Chr(13)
  1410.          End If
  1411.     Next i
  1412.     Close #mHandle
  1413.     If cboFavoritesList.ListCount > 0 Then
  1414.          cboFavoritesList.ListIndex = 0
  1415.     End If
  1416.     ctlWebBrowser.SetFocus
  1417.     Screen.MousePointer = vbDefault
  1418. End Sub
  1419. Private Sub cmdExitFavoritesList_Click()
  1420.     picLinksListContainer.Visible = True
  1421.     ctlWebBrowser.SetFocus
  1422. End Sub
  1423. Private Function LineThere(inText) As Boolean
  1424.     Dim strLine As String
  1425.     Dim h, i
  1426.     h = cboFavoritesList.ListIndex
  1427.     LineThere = False
  1428.     For i = 0 To cboFavoritesList.ListCount - 1
  1429.         strLine = LTrim(Trim(cboFavoritesList.List(i)))
  1430.         If strLine = inText Then
  1431.              LineThere = True
  1432.              Exit For
  1433.         End If
  1434.     Next i
  1435.     cboFavoritesList.ListIndex = h
  1436. End Function
  1437. Private Sub SortFileLines()
  1438.     Dim strLine As String
  1439.     Dim intLineNums As Integer
  1440.     Dim arrLines() As String
  1441.     Dim mHandle As Variant
  1442.     mHandle = FreeFile
  1443.       ' We know file is in existence
  1444.     Open FavoriteFileName For Input As #mHandle
  1445.     Do While Not EOF(mHandle)
  1446.         Line Input #mHandle, strLine
  1447.         strLine = LTrim(Trim(strLine))
  1448.         intLineNums = intLineNums + 1
  1449.         ReDim Preserve arrLines(1 To intLineNums)
  1450.         arrLines(intLineNums) = strLine
  1451.     Loop
  1452.     Close #mHandle
  1453.     SelectionSort arrLines, 1, intLineNums
  1454.        ' Copy back to original file
  1455.        ' We use Open for "Output" to truncate the file first
  1456.        ' before writing new lines.  File is small in this case.
  1457.     mHandle = FreeFile
  1458.     Open FavoriteFileName For Output As #mHandle
  1459.     Dim i
  1460.     For i = 1 To intLineNums
  1461.          If Len(Trim(arrLines(i))) > 0 Then
  1462.              Print #mHandle, arrLines(i)
  1463.          End If
  1464.     Next i
  1465.     Close #mHandle
  1466. End Sub
  1467. Private Sub SelectionSort(inSortList() As String, ByVal inStart As Integer, ByVal inEnd As Integer)
  1468.     Dim i, j, intSelect
  1469.     Dim strSelect As String, strTemp As String
  1470.     For i = inStart To (inEnd - 1)
  1471.         intSelect = i
  1472.         strSelect = inSortList(i)
  1473.         For j = i + 1 To inEnd
  1474.             If StrComp(inSortList(j), strSelect, vbTextCompare) < 0 Then
  1475.                 strSelect = inSortList(j)
  1476.                 intSelect = j
  1477.             End If
  1478.         Next j
  1479.         inSortList(intSelect) = inSortList(i)
  1480.         inSortList(i) = strSelect
  1481.     Next i
  1482. End Sub
  1483. Sub OptionsStatusbarProc(CurrentForm As Form)
  1484.     CurrentForm.mnuOptionsStatusbar.Checked = Not CurrentForm.mnuOptionsStatusbar.Checked
  1485.     If CurrentForm.mnuOptionsStatusbar.Checked Then
  1486.         frmFrame.StatusBar1.Visible = True
  1487.     Else
  1488.         frmFrame.StatusBar1.Visible = False
  1489.     End If
  1490. End Sub
  1491. Sub ErrMsgProc(mMsg As String)
  1492.     MsgBox mMsg & vbCrLf & Err.Number & Space(5) & Err.Description
  1493. End Sub
  1494.