home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD15750332001.psc / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-02-27  |  45.5 KB  |  1,107 lines

  1. VERSION 5.00
  2. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  3. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  4. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  5. Begin VB.Form Form1 
  6.    BorderStyle     =   1  'Fixed Single
  7.    Caption         =   "VB Starter Kit Volume 1"
  8.    ClientHeight    =   7035
  9.    ClientLeft      =   45
  10.    ClientTop       =   390
  11.    ClientWidth     =   7110
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   7035
  16.    ScaleWidth      =   7110
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin VB.CommandButton Command4 
  19.       Caption         =   "About"
  20.       Height          =   375
  21.       Left            =   120
  22.       TabIndex        =   29
  23.       Top             =   6600
  24.       Width           =   1215
  25.    End
  26.    Begin VB.CommandButton Command3 
  27.       Caption         =   "Exit"
  28.       Height          =   375
  29.       Left            =   5760
  30.       TabIndex        =   28
  31.       Top             =   6600
  32.       Width           =   1215
  33.    End
  34.    Begin VB.CommandButton Command1 
  35.       Caption         =   "Copy"
  36.       Height          =   255
  37.       Left            =   5640
  38.       TabIndex        =   3
  39.       Top             =   4290
  40.       Width           =   1335
  41.    End
  42.    Begin RichTextLib.RichTextBox RTF 
  43.       Height          =   1935
  44.       Left            =   0
  45.       TabIndex        =   1
  46.       Top             =   4560
  47.       Width           =   7095
  48.       _ExtentX        =   12515
  49.       _ExtentY        =   3413
  50.       _Version        =   393217
  51.       ReadOnly        =   -1  'True
  52.       ScrollBars      =   3
  53.       RightMargin     =   2e6
  54.       TextRTF         =   $"Form1.frx":0000
  55.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  56.          Name            =   "Courier New"
  57.          Size            =   11.25
  58.          Charset         =   0
  59.          Weight          =   400
  60.          Underline       =   0   'False
  61.          Italic          =   0   'False
  62.          Strikethrough   =   0   'False
  63.       EndProperty
  64.    End
  65.    Begin TabDlg.SSTab SSTab1 
  66.       Height          =   4215
  67.       Left            =   0
  68.       TabIndex        =   0
  69.       Top             =   0
  70.       Width           =   7095
  71.       _ExtentX        =   12515
  72.       _ExtentY        =   7435
  73.       _Version        =   393216
  74.       Tabs            =   5
  75.       TabsPerRow      =   5
  76.       TabHeight       =   520
  77.       TabCaption(0)   =   "Strings"
  78.       TabPicture(0)   =   "Form1.frx":00E3
  79.       Tab(0).ControlEnabled=   -1  'True
  80.       Tab(0).Control(0)=   "Frame8"
  81.       Tab(0).Control(0).Enabled=   0   'False
  82.       Tab(0).ControlCount=   1
  83.       TabCaption(1)   =   "Files"
  84.       TabPicture(1)   =   "Form1.frx":00FF
  85.       Tab(1).ControlEnabled=   0   'False
  86.       Tab(1).Control(0)=   "Frame1"
  87.       Tab(1).Control(1)=   "Frame2"
  88.       Tab(1).Control(2)=   "Frame3"
  89.       Tab(1).ControlCount=   3
  90.       TabCaption(2)   =   "Navigation"
  91.       TabPicture(2)   =   "Form1.frx":011B
  92.       Tab(2).ControlEnabled=   0   'False
  93.       Tab(2).Control(0)=   "Frame4"
  94.       Tab(2).ControlCount=   1
  95.       TabCaption(3)   =   "Read/Write"
  96.       TabPicture(3)   =   "Form1.frx":0137
  97.       Tab(3).ControlEnabled=   0   'False
  98.       Tab(3).Control(0)=   "Frame6"
  99.       Tab(3).Control(1)=   "Frame5"
  100.       Tab(3).ControlCount=   2
  101.       TabCaption(4)   =   "Examples"
  102.       TabPicture(4)   =   "Form1.frx":0153
  103.       Tab(4).ControlEnabled=   0   'False
  104.       Tab(4).Control(0)=   "Frame7"
  105.       Tab(4).ControlCount=   1
  106.       Begin VB.Frame Frame8 
  107.          Height          =   3495
  108.          Left            =   240
  109.          TabIndex        =   50
  110.          Top             =   480
  111.          Width           =   6615
  112.          Begin VB.TextBox Text1 
  113.             Height          =   285
  114.             Left            =   360
  115.             Locked          =   -1  'True
  116.             TabIndex        =   62
  117.             Text            =   "     C:\Program Files\Microsoft Visual Studio\VB98\VB6.exe     "
  118.             Top             =   360
  119.             Width           =   4695
  120.          End
  121.          Begin VB.CommandButton cmdStrings 
  122.             Caption         =   "Instr"
  123.             Height          =   375
  124.             Index           =   0
  125.             Left            =   360
  126.             TabIndex        =   61
  127.             Top             =   1500
  128.             Width           =   1815
  129.          End
  130.          Begin VB.CommandButton cmdStrings 
  131.             Caption         =   "InstrRev"
  132.             Height          =   375
  133.             Index           =   1
  134.             Left            =   360
  135.             TabIndex        =   60
  136.             Top             =   1980
  137.             Width           =   1815
  138.          End
  139.          Begin VB.CommandButton cmdStrings 
  140.             Caption         =   "Trim"
  141.             Height          =   375
  142.             Index           =   2
  143.             Left            =   360
  144.             TabIndex        =   59
  145.             Top             =   2460
  146.             Width           =   1815
  147.          End
  148.          Begin VB.CommandButton cmdStrings 
  149.             Caption         =   "Split"
  150.             Height          =   375
  151.             Index           =   3
  152.             Left            =   360
  153.             TabIndex        =   58
  154.             Top             =   2940
  155.             Width           =   1815
  156.          End
  157.          Begin VB.CommandButton cmdStrings 
  158.             Caption         =   "Left"
  159.             Height          =   375
  160.             Index           =   4
  161.             Left            =   2400
  162.             TabIndex        =   57
  163.             Top             =   1500
  164.             Width           =   1815
  165.          End
  166.          Begin VB.CommandButton cmdStrings 
  167.             Caption         =   "Mid"
  168.             Height          =   375
  169.             Index           =   5
  170.             Left            =   2400
  171.             TabIndex        =   56
  172.             Top             =   1980
  173.             Width           =   1815
  174.          End
  175.          Begin VB.CommandButton cmdStrings 
  176.             Caption         =   "Right"
  177.             Height          =   375
  178.             Index           =   6
  179.             Left            =   2400
  180.             TabIndex        =   55
  181.             Top             =   2460
  182.             Width           =   1815
  183.          End
  184.          Begin VB.CommandButton cmdStrings 
  185.             Caption         =   "Join"
  186.             Height          =   375
  187.             Index           =   7
  188.             Left            =   2400
  189.             TabIndex        =   54
  190.             Top             =   2940
  191.             Width           =   1815
  192.          End
  193.          Begin VB.CommandButton cmdStrings 
  194.             Caption         =   "Path Only"
  195.             Height          =   375
  196.             Index           =   8
  197.             Left            =   4440
  198.             TabIndex        =   53
  199.             Top             =   1500
  200.             Width           =   1815
  201.          End
  202.          Begin VB.CommandButton cmdStrings 
  203.             Caption         =   "File Only"
  204.             Height          =   375
  205.             Index           =   9
  206.             Left            =   4440
  207.             TabIndex        =   52
  208.             Top             =   1980
  209.             Width           =   1815
  210.          End
  211.          Begin VB.CommandButton cmdStrings 
  212.             Caption         =   "Extension Only"
  213.             Height          =   375
  214.             Index           =   10
  215.             Left            =   4440
  216.             TabIndex        =   51
  217.             Top             =   2460
  218.             Width           =   1815
  219.          End
  220.          Begin VB.Label Label1 
  221.             Height          =   615
  222.             Left            =   360
  223.             TabIndex        =   63
  224.             Top             =   780
  225.             Width           =   5895
  226.          End
  227.       End
  228.       Begin VB.Frame Frame7 
  229.          Height          =   3255
  230.          Left            =   -74760
  231.          TabIndex        =   43
  232.          Top             =   600
  233.          Width           =   6495
  234.          Begin VB.CommandButton Command12 
  235.             Caption         =   "Window handler"
  236.             Height          =   375
  237.             Left            =   480
  238.             TabIndex        =   64
  239.             Top             =   2520
  240.             Width           =   1575
  241.          End
  242.          Begin VB.CommandButton Command11 
  243.             Caption         =   "File Properties"
  244.             Height          =   375
  245.             Left            =   480
  246.             TabIndex        =   46
  247.             Top             =   1920
  248.             Width           =   1575
  249.          End
  250.          Begin VB.CommandButton Command10 
  251.             Caption         =   "Text Editor"
  252.             Height          =   375
  253.             Left            =   480
  254.             TabIndex        =   45
  255.             Top             =   1320
  256.             Width           =   1575
  257.          End
  258.          Begin VB.CommandButton Command9 
  259.             Caption         =   "Menus"
  260.             Height          =   375
  261.             Left            =   480
  262.             TabIndex        =   44
  263.             Top             =   720
  264.             Width           =   1575
  265.          End
  266.          Begin VB.Label Label7 
  267.             Caption         =   "Change the state of any open windows"
  268.             Height          =   255
  269.             Left            =   2400
  270.             TabIndex        =   65
  271.             Top             =   2520
  272.             Width           =   3375
  273.          End
  274.          Begin VB.Label Label6 
  275.             Caption         =   "Brings up the standard Windows File Property Dialog"
  276.             Height          =   375
  277.             Left            =   2400
  278.             TabIndex        =   49
  279.             Top             =   1920
  280.             Width           =   3735
  281.          End
  282.          Begin VB.Label Label5 
  283.             Caption         =   "A basic text editor showing toolbar functions, cut, copy, paste, infinite undo/redo, using temp files."
  284.             Height          =   495
  285.             Left            =   2400
  286.             TabIndex        =   48
  287.             Top             =   1320
  288.             Width           =   3855
  289.          End
  290.          Begin VB.Label Label4 
  291.             Caption         =   "Change the appearance of the standard VB menu"
  292.             Height          =   375
  293.             Left            =   2400
  294.             TabIndex        =   47
  295.             Top             =   720
  296.             Width           =   3855
  297.          End
  298.       End
  299.       Begin VB.Frame Frame6 
  300.          Caption         =   "Images"
  301.          Height          =   3495
  302.          Left            =   -71400
  303.          TabIndex        =   31
  304.          Top             =   480
  305.          Width           =   3255
  306.          Begin VB.HScrollBar HS 
  307.             Height          =   255
  308.             Left            =   240
  309.             TabIndex        =   42
  310.             Top             =   2640
  311.             Visible         =   0   'False
  312.             Width           =   2535
  313.          End
  314.          Begin VB.VScrollBar VS 
  315.             Height          =   2295
  316.             Left            =   2760
  317.             TabIndex        =   41
  318.             Top             =   360
  319.             Visible         =   0   'False
  320.             Width           =   255
  321.          End
  322.          Begin VB.PictureBox PicFrame 
  323.             Height          =   2535
  324.             Left            =   240
  325.             ScaleHeight     =   2475
  326.             ScaleWidth      =   2715
  327.             TabIndex        =   39
  328.             Top             =   360
  329.             Width           =   2775
  330.             Begin VB.PictureBox Picture1 
  331.                AutoSize        =   -1  'True
  332.                BorderStyle     =   0  'None
  333.                Height          =   735
  334.                Left            =   0
  335.                ScaleHeight     =   735
  336.                ScaleWidth      =   1095
  337.                TabIndex        =   40
  338.                Top             =   0
  339.                Width           =   1095
  340.             End
  341.          End
  342.          Begin VB.CommandButton Command8 
  343.             Caption         =   "Save As"
  344.             Height          =   375
  345.             Left            =   1680
  346.             TabIndex        =   35
  347.             Top             =   3000
  348.             Width           =   1335
  349.          End
  350.          Begin VB.CommandButton Command7 
  351.             Caption         =   "Open"
  352.             Height          =   375
  353.             Left            =   240
  354.             TabIndex        =   34
  355.             Top             =   3000
  356.             Width           =   1335
  357.          End
  358.       End
  359.       Begin VB.Frame Frame5 
  360.          Caption         =   "Text"
  361.          Height          =   3495
  362.          Left            =   -74760
  363.          TabIndex        =   30
  364.          Top             =   480
  365.          Width           =   3255
  366.          Begin VB.OptionButton Option4 
  367.             Caption         =   "Rich Text Format"
  368.             Height          =   255
  369.             Left            =   720
  370.             TabIndex        =   38
  371.             Top             =   2640
  372.             Width           =   1695
  373.          End
  374.          Begin VB.OptionButton Option3 
  375.             Caption         =   "Plain Text"
  376.             Height          =   255
  377.             Left            =   720
  378.             TabIndex        =   37
  379.             Top             =   2400
  380.             Value           =   -1  'True
  381.             Width           =   1815
  382.          End
  383.          Begin RichTextLib.RichTextBox RichTextBox1 
  384.             Height          =   1935
  385.             Left            =   240
  386.             TabIndex        =   36
  387.             Top             =   360
  388.             Width           =   2775
  389.             _ExtentX        =   4895
  390.             _ExtentY        =   3413
  391.             _Version        =   393217
  392.             Enabled         =   -1  'True
  393.             ScrollBars      =   2
  394.             AutoVerbMenu    =   -1  'True
  395.             TextRTF         =   $"Form1.frx":016F
  396.          End
  397.          Begin VB.CommandButton Command6 
  398.             Caption         =   "Save As"
  399.             Height          =   375
  400.             Left            =   1680
  401.             TabIndex        =   33
  402.             Top             =   3000
  403.             Width           =   1335
  404.          End
  405.          Begin VB.CommandButton Command5 
  406.             Caption         =   "Open"
  407.             Height          =   375
  408.             Left            =   240
  409.             TabIndex        =   32
  410.             Top             =   3000
  411.             Width           =   1335
  412.          End
  413.       End
  414.       Begin VB.Frame Frame4 
  415.          Height          =   3495
  416.          Left            =   -74640
  417.          TabIndex        =   23
  418.          Top             =   480
  419.          Width           =   6375
  420.          Begin VB.ComboBox Combo1 
  421.             Height          =   315
  422.             ItemData        =   "Form1.frx":0340
  423.             Left            =   360
  424.             List            =   "Form1.frx":0350
  425.             Style           =   2  'Dropdown List
  426.             TabIndex        =   27
  427.             Top             =   840
  428.             Width           =   2535
  429.          End
  430.          Begin VB.FileListBox File1 
  431.             Height          =   2820
  432.             Left            =   3360
  433.             TabIndex        =   26
  434.             Top             =   360
  435.             Width           =   2655
  436.          End
  437.          Begin VB.DirListBox Dir1 
  438.             Height          =   1890
  439.             Left            =   360
  440.             TabIndex        =   25
  441.             Top             =   1320
  442.             Width           =   2535
  443.          End
  444.          Begin VB.DriveListBox Drive1 
  445.             Height          =   315
  446.             Left            =   360
  447.             TabIndex        =   24
  448.             Top             =   360
  449.             Width           =   2535
  450.          End
  451.       End
  452.       Begin VB.Frame Frame3 
  453.          Caption         =   "Browse for folder"
  454.          Height          =   975
  455.          Left            =   -70680
  456.          TabIndex        =   20
  457.          Top             =   3000
  458.          Width           =   2415
  459.          Begin VB.CommandButton Command2 
  460.             Caption         =   "Browse"
  461.             Height          =   375
  462.             Left            =   240
  463.             TabIndex        =   21
  464.             Top             =   480
  465.             Width           =   1935
  466.          End
  467.          Begin VB.Label Label3 
  468.             Caption         =   "Without MS Shell"
  469.             Height          =   255
  470.             Left            =   240
  471.             TabIndex        =   22
  472.             Top             =   240
  473.             Width           =   1935
  474.          End
  475.       End
  476.       Begin VB.Frame Frame2 
  477.          Caption         =   "Common Dialog"
  478.          Height          =   2295
  479.          Left            =   -70680
  480.          TabIndex        =   13
  481.          Top             =   600
  482.          Width           =   2415
  483.          Begin VB.CommandButton cmdCmnDlg 
  484.             Caption         =   "Font"
  485.             Height          =   375
  486.             Index           =   3
  487.             Left            =   1320
  488.             TabIndex        =   19
  489.             Top             =   1800
  490.             Width           =   855
  491.          End
  492.          Begin VB.CommandButton cmdCmnDlg 
  493.             Caption         =   "Color"
  494.             Height          =   375
  495.             Index           =   2
  496.             Left            =   240
  497.             Style           =   1  'Graphical
  498.             TabIndex        =   18
  499.             Top             =   1800
  500.             Width           =   855
  501.          End
  502.          Begin VB.CommandButton cmdCmnDlg 
  503.             Caption         =   "Save"
  504.             Height          =   375
  505.             Index           =   1
  506.             Left            =   1320
  507.             TabIndex        =   17
  508.             Top             =   1320
  509.             Width           =   855
  510.          End
  511.          Begin VB.CommandButton cmdCmnDlg 
  512.             Caption         =   "Open"
  513.             Height          =   375
  514.             Index           =   0
  515.             Left            =   240
  516.             TabIndex        =   16
  517.             Top             =   1320
  518.             Width           =   855
  519.          End
  520.          Begin MSComDlg.CommonDialog CommonDialog1 
  521.             Left            =   2040
  522.             Top             =   240
  523.             _ExtentX        =   847
  524.             _ExtentY        =   847
  525.             _Version        =   393216
  526.          End
  527.          Begin VB.OptionButton Option2 
  528.             Caption         =   "Pure code"
  529.             Height          =   255
  530.             Left            =   360
  531.             TabIndex        =   15
  532.             Top             =   840
  533.             Width           =   1335
  534.          End
  535.          Begin VB.OptionButton Option1 
  536.             Caption         =   "With MS Common Dialog Control 6.0"
  537.             Height          =   375
  538.             Left            =   360
  539.             TabIndex        =   14
  540.             Top             =   360
  541.             Value           =   -1  'True
  542.             Width           =   1935
  543.          End
  544.       End
  545.       Begin VB.Frame Frame1 
  546.          Caption         =   "Using MS Shell Controls and Automation"
  547.          Height          =   3375
  548.          Left            =   -74760
  549.          TabIndex        =   4
  550.          Top             =   600
  551.          Width           =   3855
  552.          Begin VB.CommandButton cmd 
  553.             Caption         =   "Browse for folder"
  554.             Height          =   375
  555.             Index           =   0
  556.             Left            =   240
  557.             TabIndex        =   12
  558.             Top             =   360
  559.             Width           =   3375
  560.          End
  561.          Begin VB.CommandButton cmd 
  562.             Caption         =   "Browse for folder (Root : Desktop)"
  563.             Height          =   375
  564.             Index           =   1
  565.             Left            =   240
  566.             TabIndex        =   11
  567.             Top             =   840
  568.             Width           =   3375
  569.          End
  570.          Begin VB.CommandButton cmd 
  571.             Caption         =   "Open Windows folder"
  572.             Height          =   375
  573.             Index           =   2
  574.             Left            =   240
  575.             TabIndex        =   10
  576.             Top             =   1320
  577.             Width           =   3375
  578.          End
  579.          Begin VB.CommandButton cmd 
  580.             Caption         =   "Find Files"
  581.             Height          =   375
  582.             Index           =   3
  583.             Left            =   240
  584.             TabIndex        =   9
  585.             Top             =   1920
  586.             Width           =   1575
  587.          End
  588.          Begin VB.CommandButton cmd 
  589.             Caption         =   "Run File"
  590.             Height          =   375
  591.             Index           =   4
  592.             Left            =   240
  593.             TabIndex        =   8
  594.             Top             =   2400
  595.             Width           =   1575
  596.          End
  597.          Begin VB.CommandButton cmd 
  598.             Caption         =   "Tray Properties"
  599.             Height          =   375
  600.             Index           =   5
  601.             Left            =   240
  602.             TabIndex        =   7
  603.             Top             =   2880
  604.             Width           =   1575
  605.          End
  606.          Begin VB.CommandButton cmd 
  607.             Caption         =   "Minimise All"
  608.             Height          =   375
  609.             Index           =   6
  610.             Left            =   2040
  611.             TabIndex        =   6
  612.             Top             =   1920
  613.             Width           =   1575
  614.          End
  615.          Begin VB.CommandButton cmd 
  616.             Caption         =   "Un Minimise All"
  617.             Height          =   375
  618.             Index           =   7
  619.             Left            =   2040
  620.             TabIndex        =   5
  621.             Top             =   2400
  622.             Width           =   1575
  623.          End
  624.       End
  625.    End
  626.    Begin VB.Label Label2 
  627.       Caption         =   "Code :"
  628.       Height          =   255
  629.       Left            =   120
  630.       TabIndex        =   2
  631.       Top             =   4320
  632.       Width           =   1575
  633.    End
  634. Attribute VB_Name = "Form1"
  635. Attribute VB_GlobalNameSpace = False
  636. Attribute VB_Creatable = False
  637. Attribute VB_PredeclaredId = True
  638. Attribute VB_Exposed = False
  639. 'I have not commented this code because the useful
  640. 'code is shown in the RichtextBox
  641. Dim MyShell As shell32.Shell
  642. Dim sfile As String
  643. Private Sub cmd_Click(Index As Integer)
  644. On Error Resume Next
  645. sfile = ""
  646. Select Case Index
  647.     Case 0
  648.         RTF.Text = "'You need to reference 'MS Shell Controls and Automation' in this project" + vbCrLf + _
  649.         "Dim MyShell As Shell32.Shell" + vbCrLf + _
  650.         "Private Sub Form_Load()" + vbCrLf + _
  651.         "   On Error Resume Next" + vbCrLf + _
  652.         "   Dim sfile As String" + vbCrLf + _
  653.         "   Set MyShell = New Shell32.Shell" + vbCrLf + _
  654.         "   sfile = MyShell.BrowseForFolder(Me.hWnd, " + Chr(34) + "fish" + Chr(34) + ", 0)" + vbCrLf + _
  655.         "End Sub"
  656.         sfile = MyShell.BrowseForFolder(Me.Hwnd, "fish", 0)
  657.         If sfile <> "" Then
  658.             MsgBox "You selected " + sfile
  659.         End If
  660.     Case 1
  661.         RTF.Text = "'You need to reference 'MS Shell Controls and Automation' in this project" + vbCrLf + _
  662.         "Dim MyShell As Shell32.Shell" + vbCrLf + _
  663.         "Private Sub Form_Load()" + vbCrLf + _
  664.         "   On Error Resume Next" + vbCrLf + _
  665.         "   Dim sfile As String" + vbCrLf + _
  666.         "   Set MyShell = New Shell32.Shell" + vbCrLf + _
  667.         "   sfile = MyShell.BrowseForFolder(Me.hWnd, " + Chr(34) + "fish" + Chr(34) + ", 0," + Chr(34) + "C:\windows\desktop" + Chr(34) + ")" + vbCrLf + _
  668.         "End Sub"
  669.         sfile = MyShell.BrowseForFolder(Me.Hwnd, "fish", 0, "C:\windows\desktop")
  670.         If sfile <> "" Then
  671.             MsgBox "You selected " + sfile
  672.         End If
  673.     Case 2
  674.         RTF.Text = "'You need to reference 'MS Shell Controls and Automation' in this project" + vbCrLf + _
  675.         "Dim MyShell As Shell32.Shell" + vbCrLf + _
  676.         "Private Sub Form_Load()" + vbCrLf + _
  677.         "   Dim sfile As String" + vbCrLf + _
  678.         "   Set MyShell = New Shell32.Shell" + vbCrLf + _
  679.         "   MyShell.Open (" + Chr(34) + "C:\windows" + Chr(34) + ")" + vbCrLf + _
  680.         "End Sub"
  681.         MyShell.Open ("C:\windows")
  682.     Case 3
  683.         RTF.Text = "'You need to reference 'MS Shell Controls and Automation' in this project" + vbCrLf + _
  684.         "Dim MyShell As Shell32.Shell" + vbCrLf + _
  685.         "Private Sub Form_Load()" + vbCrLf + _
  686.         "   Dim sfile As String" + vbCrLf + _
  687.         "   Set MyShell = New Shell32.Shell" + vbCrLf + _
  688.         "   MyShell.FindFiles" + vbCrLf + _
  689.         "End Sub"
  690.         MyShell.FindFiles
  691.     Case 4
  692.         RTF.Text = "'You need to reference 'MS Shell Controls and Automation' in this project" + vbCrLf + _
  693.         "Dim MyShell As Shell32.Shell" + vbCrLf + _
  694.         "Private Sub Form_Load()" + vbCrLf + _
  695.         "   Dim sfile As String" + vbCrLf + _
  696.         "   Set MyShell = New Shell32.Shell" + vbCrLf + _
  697.         "   MyShell.FileRun" + vbCrLf + _
  698.         "End Sub"
  699.         MyShell.FileRun
  700.     Case 5
  701.         RTF.Text = "'You need to reference 'MS Shell Controls and Automation' in this project" + vbCrLf + _
  702.         "Dim MyShell As Shell32.Shell" + vbCrLf + _
  703.         "Private Sub Form_Load()" + vbCrLf + _
  704.         "   Dim sfile As String" + vbCrLf + _
  705.         "   Set MyShell = New Shell32.Shell" + vbCrLf + _
  706.         "   MyShell.TrayProperties" + vbCrLf + _
  707.         "End Sub"
  708.         MyShell.TrayProperties
  709.     Case 6
  710.         RTF.Text = "'You need to reference 'MS Shell Controls and Automation' in this project" + vbCrLf + _
  711.         "Dim MyShell As Shell32.Shell" + vbCrLf + _
  712.         "Private Sub Form_Load()" + vbCrLf + _
  713.         "   Dim sfile As String" + vbCrLf + _
  714.         "   Set MyShell = New Shell32.Shell" + vbCrLf + _
  715.         "   MyShell.MinimizeAll" + vbCrLf + _
  716.         "End Sub"
  717.         MyShell.MinimizeAll
  718.     Case 7
  719.         RTF.Text = "'You need to reference 'MS Shell Controls and Automation' in this project" + vbCrLf + _
  720.         "Dim MyShell As Shell32.Shell" + vbCrLf + _
  721.         "Private Sub Form_Load()" + vbCrLf + _
  722.         "   Dim sfile As String" + vbCrLf + _
  723.         "   Set MyShell = New Shell32.Shell" + vbCrLf + _
  724.         "   MyShell.UndoMinimizeALL" + vbCrLf + _
  725.         "End Sub"
  726.         MyShell.UndoMinimizeALL
  727. End Select
  728. End Sub
  729. Private Sub cmdCmnDlg_Click(Index As Integer)
  730. On Error GoTo woops
  731. cmdCmnDlg(2).BackColor = &H8000000F
  732. With cmdCmnDlg(3)
  733.     .FontName = "MS Sans Serif"
  734.     .FontSize = 8
  735.     .FontBold = False
  736.     .FontItalic = False
  737.     .FontStrikethru = False
  738.     .FontUnderline = False
  739. End With
  740. If Option1.Value = True Then
  741.     Select Case Index
  742.         Case 0
  743.             RTF.Text = "Dim sfile As String" + vbCrLf + _
  744.             "On Error GoTo woops" + vbCrLf + _
  745.             "With CommonDialog1" + vbCrLf + _
  746.             "    .DialogTitle = " + Chr(34) + "Open Files" + Chr(34) + vbCrLf + _
  747.             "    .CancelError = True" + vbCrLf + _
  748.             "    .Filter = " + Chr(34) + "Text files (*.txt;*.doc)|*.txt;*.doc|All files (*.*)|*.*" + Chr(34) + vbCrLf + _
  749.             "    .ShowOpen" + vbCrLf + _
  750.             "     If Len(.FileName) = 0 Then Exit Sub" + vbCrLf + _
  751.             "    sfile = .FileName" + vbCrLf + _
  752.             "End With" + vbCrLf + _
  753.             "woops: Exit Sub"
  754.             With CommonDialog1
  755.                 .DialogTitle = "Open Files"
  756.                 .CancelError = True
  757.                 .Filter = "Text files (*.txt;*.doc)|*.txt;*.doc|All files (*.*)|*.*"
  758.                 .ShowOpen
  759.                 If Len(.FileName) = 0 Then Exit Sub
  760.                 sfile = .FileName
  761.             End With
  762.             MsgBox "You selected " + sfile + vbCrLf + "You need to add code to actually open the file."
  763.         Case 1
  764.             RTF.Text = "Dim sfile As String" + vbCrLf + _
  765.             "On Error GoTo woops" + vbCrLf + _
  766.             "With CommonDialog1" + vbCrLf + _
  767.             "    .DialogTitle = " + Chr(34) + "Save Files" + Chr(34) + vbCrLf + _
  768.             "    .CancelError = True" + vbCrLf + _
  769.             "    .Filter = " + Chr(34) + "Text files (*.txt;*.doc)|*.txt;*.doc|All files (*.*)|*.*" + Chr(34) + vbCrLf + _
  770.             "    .ShowSave" + vbCrLf + _
  771.             "     If Len(.FileName) = 0 Then Exit Sub" + vbCrLf + _
  772.             "    sfile = .FileName" + vbCrLf + _
  773.             "End With" + vbCrLf + _
  774.             "woops: Exit Sub"
  775.             With CommonDialog1
  776.                 .DialogTitle = "Save Files"
  777.                 .CancelError = True
  778.                 .Filter = "Text files (*.txt;*.doc)|*.txt;*.doc|All files (*.*)|*.*"
  779.                 .ShowSave
  780.                 If Len(.FileName) = 0 Then Exit Sub
  781.                 sfile = .FileName
  782.             End With
  783.             MsgBox "You selected " + sfile + vbCrLf + "You need to add code to actually save the file."
  784.         Case 2
  785.             RTF.Text = "CommonDialog1.CancelError = True" + vbCrLf + _
  786.             "CommonDialog1.flags = 0" + vbCrLf + _
  787.             "CommonDialog1.Action = 3" + vbCrLf + _
  788.             "Me.BackColor = CommonDialog1.Color"
  789.             CommonDialog1.CancelError = True
  790.             CommonDialog1.flags = 0
  791.             CommonDialog1.Action = 3
  792.             cmdCmnDlg(2).BackColor = CommonDialog1.Color
  793.         Case 3
  794.             RTF.Text = "CommonDialog1.flags = cdlCFBoth Or cdlCFEffects" + vbCrLf + _
  795.             "CommonDialog1.ShowFont" + vbCrLf + _
  796.             "With RichTextBox1" + vbCrLf + _
  797.             "    .SelFontName = CommonDialog1.FontName" + vbCrLf + _
  798.             "    .SelFontSize = CommonDialog1.FontSize" + vbCrLf + _
  799.             "    .SelBold = CommonDialog1.FontBold" + vbCrLf + _
  800.             "    .SelItalic = CommonDialog1.FontItalic" + vbCrLf + _
  801.             "    .SelStrikeThru = CommonDialog1.FontStrikethru" + vbCrLf + _
  802.             "    .SelUnderline = CommonDialog1.FontUnderline" + vbCrLf + _
  803.             "    .SelColor = CommonDialog1.Color" + vbCrLf + _
  804.             "End With"
  805.             CommonDialog1.flags = cdlCFBoth Or cdlCFEffects
  806.             CommonDialog1.ShowFont
  807.             With cmdCmnDlg(3)
  808.                 .FontName = CommonDialog1.FontName
  809.                 .FontSize = CommonDialog1.FontSize
  810.                 .FontBold = CommonDialog1.FontBold
  811.                 .FontItalic = CommonDialog1.FontItalic
  812.                 .FontStrikethru = CommonDialog1.FontStrikethru
  813.                 .FontUnderline = CommonDialog1.FontUnderline
  814.             End With
  815.     End Select
  816. ElseIf Option2.Value = True Then
  817.     Select Case Index
  818.         Case 0
  819.             RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project." + vbCrLf + _
  820.             "sfile = ShowOpen(" + Chr(34) + "Text Files (*.txt;*.doc)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.txt;*.doc" + Chr(34) + " + Chr(0) + " + Chr(34) + "All Files (*.*)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.*" + Chr(34) + " + Chr(0), 5, " + Chr(34) + "C:\windows" + Chr(34) + ", " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")"
  821.             sfile = ShowOpen("Text Files (*.txt;*.doc)" + Chr(0) + "*.txt;*.doc" + Chr(0) + "All Files (*.*)" + Chr(0) + "*.*" + Chr(0), 5, "C:\windows", "Bobo Enterprises")
  822.         Case 1
  823.             RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project." + vbCrLf + _
  824.             "sfile = ShowSave(" + Chr(34) + "Text Files (*.txt;*.doc)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.txt;*.doc" + Chr(34) + " + Chr(0) + " + Chr(34) + "All Files (*.*)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.*" + Chr(34) + " + Chr(0), 5, " + Chr(34) + "C:\windows" + Chr(34) + ", " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")"
  825.             sfile = ShowSave("Text Files (*.txt;*.doc)" + Chr(0) + "*.txt;*.doc" + Chr(0) + "All Files (*.*)" + Chr(0) + "*.*" + Chr(0), 5, "C:\windows", "Bobo Enterprises")
  826.         Case 2
  827.             RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project." + vbCrLf + _
  828.             "Private Sub Form_Load()" + vbCrLf + _
  829.             "   InitCmnDlg Me.hwnd" + vbCrLf + _
  830.             "   Me.BackColor = ShowColor" + vbCrLf + _
  831.             "End Sub"
  832.             cmdCmnDlg(2).BackColor = ShowColor
  833.         Case 3
  834.             RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project." + vbCrLf + _
  835.             "ShowFont" + vbCrLf + _
  836.             "With RichTextBox1" + vbCrLf + _
  837.             "   .SelFontName = mFontName" + vbCrLf + _
  838.             "   .SelFontSize = mFontsize" + vbCrLf + _
  839.             "   .SelBold = mBold" + vbCrLf + _
  840.             "   .SelItalic = mItalic" + vbCrLf + _
  841.             "   .SelStrikeThru = mStrikethru" + vbCrLf + _
  842.             "   .SelUnderline = mUnderline" + vbCrLf + _
  843.             "   .SelColor = mFontColor" + vbCrLf + _
  844.             "End With"
  845.             ShowFont
  846.             With cmdCmnDlg(3)
  847.                 .FontName = mFontName
  848.                 .FontSize = mFontsize
  849.                 .FontBold = mBold
  850.                 .FontItalic = mItalic
  851.                 .FontStrikethru = mStrikethru
  852.                 .FontUnderline = mUnderline
  853.             End With
  854.     End Select
  855. End If
  856. woops:
  857. End Sub
  858. Private Sub cmdStrings_Click(Index As Integer)
  859. Dim found As Long, temp As Variant
  860. Select Case Index
  861.     Case 0
  862.        found = InStr(1, Text1.Text, "VB")
  863.        If found <> 0 Then
  864.             Label1 = "Found VB at character " + Str(found)
  865.             Text1.SetFocus
  866.             Text1.SelStart = found - 1
  867.             Text1.SelLength = 2
  868.        End If
  869.        RTF.Text = "found = InStr(1, Text1.Text, " + Chr(34) + "VB" + Chr(34) + ")" + vbCrLf + _
  870.                     "If found <> 0 Then" + vbCrLf + _
  871.                     "     Text1.SetFocus" + vbCrLf + _
  872.                     "     Text1.SelStart = found - 1" + vbCrLf + _
  873.                     "     Text1.SelLength = 2" + vbCrLf + _
  874.                     "End If"
  875.     Case 1
  876.        found = InStrRev(Text1.Text, "VB")
  877.        If found <> 0 Then
  878.             Label1 = "Found VB at character " + Str(found)
  879.             Text1.SetFocus
  880.             Text1.SelStart = found - 1
  881.             Text1.SelLength = 2
  882.        End If
  883.        RTF.Text = "found = InStrRev(Text1.Text, " + Chr(34) + "VB" + Chr(34) + ")" + vbCrLf + _
  884.                     "If found <> 0 Then" + vbCrLf + _
  885.                     "     Text1.SetFocus" + vbCrLf + _
  886.                     "     Text1.SelStart = found - 1" + vbCrLf + _
  887.                     "     Text1.SelLength = 2" + vbCrLf + _
  888.                     "End If"
  889.     Case 2
  890.         Text1.Text = Trim(Text1.Text)
  891.         Label1 = "The Trim function removes spaces from the start and end of a string."
  892.         RTF.Text = "Text1.Text = Trim(Text1.Text)"
  893.     Case 3
  894.         Label1 = ""
  895.         For x = 0 To UBound(Split(Text1.Text, "\"))
  896.             Label1 = Label1 + Split(Text1.Text, "\")(x) + ", "
  897.         Next x
  898.         Label1 = Trim(Label1)
  899.         If Right(Label1, 1) = "," Then Label1 = Left(Label1, Len(Label1) - 1)
  900.         Label1 = "Divided this string into" + Str(x) + " compoents - " + Label1
  901.         RTF.Text = "Dim fred() as string" + vbCrLf + _
  902.         "For x = 0 To UBound(Split(Text1.Text, " + Chr(34) + "\" + Chr(34) + "))" + vbCrLf + _
  903.         "   fred(x) = Split(Text1.Text, " + Chr(34) + "\" + Chr(34) + ")" + vbCrLf + _
  904.         "Next x"
  905.     Case 4
  906.         Label1 = "The 10 characters on the left of this string are - " + Left(Trim(Text1.Text), 10)
  907.         RTF.Text = "Text1.Text = Left(Text1.Text, 10)"
  908.     Case 5
  909.         Label1 = "The characters in the middle of this string, starting at the tenth letter and ending at the tenth last letter are - " + Mid(Trim(Text1.Text), 11, Len(Trim(Text1.Text)) - 20)
  910.         RTF.Text = "Text1.Text = Mid(Text1.Text, 11, Len(Text1.Text) - 20)"
  911.     Case 6
  912.         Label1 = "The 10 characters on the right of this string are - " + Right(Trim(Text1.Text), 10)
  913.         RTF.Text = "Text1.Text = Right(Text1.Text, 10)"
  914.     Case 7
  915.         temp = Split(Text1.Text, "Microsoft Visual Studio")
  916.         Label1 = "The Join function complements the Split function. It combines an array of strings with a chosen delimiter." + vbCrLf + Join(temp, "Bobo Enterprises")
  917.         RTF.Text = "Dim temp As Variant" + vbCrLf + _
  918.         "temp = Split(Text1.Text, " + Chr(34) + "Microsoft Visual Studio" + Chr(34) + ")" + vbCrLf + _
  919.         "Label1 = Join(temp, " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")"
  920.     Case 8
  921.         Label1 = Mid(Trim(Text1.Text), 1, InStrRev(Trim(Text1.Text), "\"))
  922.         RTF.Text = "Label1 = Mid(Text1.Text, 1, InStrRev(Trim(Text1.Text), " + Chr(34) + "\" + Chr(34) + "))"
  923.     Case 9
  924.         Label1 = Mid(Trim(Text1.Text), InStrRev(Trim(Text1.Text), "\") + 1)
  925.         RTF.Text = "Label1 = Mid(Text1.Text, InStrRev(Text1.Text, " + Chr(34) + "\" + Chr(34) + ") + 1)"
  926.     Case 10
  927.         Label1 = Mid(Trim(Text1.Text), InStrRev(Trim(Text1.Text), ".") + 1)
  928.         RTF.Text = "Label1 = Mid(Text1.Text, InStrRev(Text1.Text, " + Chr(34) + "." + Chr(34) + ") + 1)"
  929. End Select
  930. End Sub
  931. Private Sub Command1_Click()
  932. Clipboard.Clear
  933. Clipboard.SetText RTF.Text
  934. End Sub
  935. Private Sub Command10_Click()
  936. frmTxtEdit.Show vbModal
  937. End Sub
  938. Private Sub Command11_Click()
  939. sfile = ShowOpen("All Files (*.*)" + Chr(0) + "*.*" + Chr(0), 5, "C:\windows", "Bobo Enterprises")
  940. If sfile <> "" Then GetPropDlg Me, sfile
  941. End Sub
  942. Private Sub Command12_Click()
  943. frmWindow.Show vbModal
  944. End Sub
  945. Private Sub Command2_Click()
  946. RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project." + vbCrLf + _
  947. "sfile = BrowseForFolder(" + Chr(34) + "C:\windows" + Chr(34) + ", " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")"
  948. sfile = BrowseForFolder("C:\windows", "Bobo Enterprises")
  949. If sfile <> "" Then MsgBox "You selected " + sfile
  950. End Sub
  951. Private Sub Command3_Click()
  952. Unload Me
  953. End Sub
  954. Private Sub Command4_Click()
  955. Form2.Show vbModal
  956. End Sub
  957. Private Sub Command5_Click()
  958. If Option3.Value = True Then
  959.     RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project or use MS CommonDialog Control" + vbCrLf + _
  960.     "sfile = ShowOpen(" + Chr(34) + "Text Files (*.txt)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.txt" + Chr(34) + " + Chr(0) + " + Chr(34) + "All Files (*.*)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.*" + Chr(34) + " + Chr(0), 5, " + Chr(34) + "C:\windows" + Chr(34) + ", " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")" + vbCrLf + _
  961.     "If sfile <> " + Chr(34) + Chr(34) + " Then RichTextBox1.Text = ReadText(sfile)"
  962.     sfile = ShowOpen("Text Files (*.txt)" + Chr(0) + "*.txt" + Chr(0) + "All Files (*.*)" + Chr(0) + "*.*" + Chr(0), 5, "C:\windows", "Bobo Enterprises")
  963.     If sfile <> "" Then RichTextBox1.Text = ReadText(sfile)
  964. ElseIf Option4.Value = True Then
  965.     RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project or use MS CommonDialog Control" + vbCrLf + _
  966.     "sfile = ShowOpen(" + Chr(34) + "Text Files (*.txt)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.txt" + Chr(34) + " + Chr(0) + " + Chr(34) + "All Files (*.*)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.*" + Chr(34) + " + Chr(0), 5, " + Chr(34) + "C:\windows" + Chr(34) + ", " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")" + vbCrLf + _
  967.     "If sfile <> " + Chr(34) + Chr(34) + " Then RichTextBox1.LoadFile sfile"
  968.     sfile = ShowOpen("Text Files (*.txt)" + Chr(0) + "*.txt" + Chr(0) + "All Files (*.*)" + Chr(0) + "*.*" + Chr(0), 5, "C:\windows", "Bobo Enterprises")
  969.     If sfile <> "" Then RichTextBox1.LoadFile sfile
  970. End If
  971. End Sub
  972. Private Sub Command6_Click()
  973. If Option3.Value = True Then
  974.     RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project or use MS CommonDialog Control" + vbCrLf + _
  975.     "sfile = ShowSave(" + Chr(34) + "Text Files (*.txt)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.txt" + Chr(34) + " + Chr(0) + " + Chr(34) + ", 5, " + Chr(34) + "C:\windows" + Chr(34) + ", " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")" + vbCrLf + _
  976.     "If sfile <> " + Chr(34) + Chr(34) + " Then FileSave RichTextBox1.Text, sfile"
  977.     sfile = ShowSave("Text Files (*.txt)" + Chr(0) + "*.txt" + Chr(0), 5, "C:\windows", "Bobo Enterprises")
  978.     If sfile <> "" Then
  979.         If Right(sfile, 4) <> ".txt" Then sfile = sfile + ".txt"
  980.         FileSave RichTextBox1.Text, sfile
  981.     End If
  982. ElseIf Option4.Value = True Then
  983.     RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project or use MS CommonDialog Control" + vbCrLf + _
  984.     "sfile = ShowSave(" + Chr(34) + "Text Files (*.txt)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.txt" + Chr(34) + " + Chr(0) + " + Chr(34) + ", 5, " + Chr(34) + "C:\windows" + Chr(34) + ", " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")" + vbCrLf + _
  985.     "If sfile <> " + Chr(34) + Chr(34) + " Then RichTextBox1.SaveFile sfile"
  986.     sfile = ShowSave("Text Files (*.txt)" + Chr(0) + "*.txt" + Chr(0), 5, "C:\windows", "Bobo Enterprises")
  987.     If sfile <> "" Then
  988.         If Right(sfile, 4) <> ".txt" Then sfile = sfile + ".txt"
  989.         RichTextBox1.SaveFile sfile
  990.     End If
  991. End If
  992. End Sub
  993. Private Sub Command7_Click()
  994. RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project or use MS CommonDialog Control" + vbCrLf + _
  995. "sfile = ShowOpen(" + Chr(34) + "Image Files (*.bmp;*.jpg;*.gif)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.bmp;*.jpg;*.gif" + Chr(34) + " + Chr(0) + " + Chr(34) + "All Files (*.*)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.*" + Chr(34) + " + Chr(0), 5, " + Chr(34) + "C:\windows" + Chr(34) + ", " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")" + vbCrLf + _
  996. "If sfile <> " + Chr(34) + Chr(34) + " Then Picture1.Picture = LoadPicture(sfile)"
  997. sfile = ShowOpen("Image Files (*.bmp;*.jpg;*.gif)" + Chr(0) + "*.bmp;*.jpg;*.gif" + Chr(0) + "All Files (*.*)" + Chr(0) + "*.*" + Chr(0), 5, "C:\windows", "Bobo Enterprises")
  998. If sfile <> "" Then Picture1.Picture = LoadPicture(sfile)
  999. SizeImage
  1000. End Sub
  1001. Private Sub Command8_Click()
  1002. RTF.Text = "'You need to include the Module 'CmnDialog.bas' in your project or use MS CommonDialog Control" + vbCrLf + _
  1003. "sfile = ShowSave(" + Chr(34) + "Bitmap Files (*.bmp)" + Chr(34) + " + Chr(0) + " + Chr(34) + "*.bmp" + Chr(34) + " + Chr(0) + " + Chr(34) + ", 5, " + Chr(34) + "C:\windows" + Chr(34) + ", " + Chr(34) + "Bobo Enterprises" + Chr(34) + ")" + vbCrLf + _
  1004. "If sfile <> " + Chr(34) + Chr(34) + " Then SavePicture Picture1.Image, sfile"
  1005. sfile = ShowSave("Bitmap Files (*.bmp)" + Chr(0) + "*.bmp" + Chr(0), 5, "C:\windows", "Bobo Enterprises")
  1006. If sfile <> "" Then
  1007.     If Right(sfile, 4) <> ".bmp" Then sfile = sfile + ".bmp"
  1008.     SavePicture Picture1.Image, sfile
  1009. End If
  1010. End Sub
  1011. Private Sub Command9_Click()
  1012. frmMenus.Show vbModal
  1013. End Sub
  1014. Private Sub Dir1_Change()
  1015. File1.path = Dir1.path
  1016. End Sub
  1017. Private Sub Drive1_Change()
  1018. On Error Resume Next
  1019. Dir1.path = Drive1.Drive
  1020. File1.path = Dir1.path
  1021. End Sub
  1022. Private Sub Form_Load()
  1023. Set MyShell = New shell32.Shell
  1024. InitCmnDlg Me.Hwnd
  1025. Combo1.ListIndex = 3
  1026. End Sub
  1027. Private Sub Combo1_Click()
  1028. On Error Resume Next
  1029. Select Case Combo1.ListIndex
  1030. Case 0
  1031.     File1.Pattern = "*.DOC"
  1032. Case 1
  1033.     File1.Pattern = "*.TXT"
  1034. Case 2
  1035.     File1.Pattern = "*.TXT;*.DOC;*.WRI;*.INI;*.INF;*.LOG;*.RTF"
  1036. Case 3
  1037.     File1.Pattern = "*.*"
  1038. End Select
  1039. End Sub
  1040. Private Sub Form_Unload(Cancel As Integer)
  1041. Unload Form2
  1042. Unload frmMenus
  1043. Unload frmTxtEdit
  1044. Unload frmWindow
  1045. End Sub
  1046. Private Sub HS_Change()
  1047. Picture1.Left = -HS.Value
  1048. End Sub
  1049. Private Sub HS_Scroll()
  1050. Picture1.Left = -HS.Value
  1051. End Sub
  1052. Private Sub SSTab1_Click(PreviousTab As Integer)
  1053. If SSTab1.Tab = 2 Then
  1054.     RTF.Text = "Private Sub Dir1_Change()" + vbCrLf + "    File1.Path = Dir1.Path" + vbCrLf + "End Sub" + vbCrLf + vbCrLf + _
  1055.     "Private Sub Drive1_Change()" + vbCrLf + "On Error Resume Next" + vbCrLf + "Dir1.Path = Drive1.Drive" + vbCrLf + "File1.Path = Dir1.Path" + vbCrLf + "End Sub" + vbCrLf + vbCrLf + _
  1056.     "Private Sub Form_Load()" + vbCrLf + "Set MyShell = New shell32.Shell" + vbCrLf + "InitCmnDlg Me.hwnd" + vbCrLf + "Combo1.ListIndex = 3" + vbCrLf + _
  1057.     "End Sub" + vbCrLf + vbCrLf + "Private Sub Combo1_Click()" + vbCrLf + "On Error Resume Next" + vbCrLf + "Select Case Combo1.ListIndex" + vbCrLf + "  Case 0" + vbCrLf + "      File1.Pattern = " + Chr(34) + "*.DOC" + Chr(34) + vbCrLf + _
  1058.     "  Case 1" + vbCrLf + "      File1.Pattern = " + Chr(34) + "*.TXT" + Chr(34) + vbCrLf + "  Case 2" + vbCrLf + "      File1.Pattern = " + Chr(34) + "*.TXT;*.DOC;*.WRI;*.INI;*.INF;*.LOG;*.RTF" + Chr(34) + vbCrLf + _
  1059.     "  Case 3" + vbCrLf + "      File1.Pattern = " + Chr(34) + "*.*" + Chr(34) + vbCrLf + "  End Select" + vbCrLf + "End Sub"
  1060. End If
  1061. End Sub
  1062. Public Sub FileSave(Text As String, filepath As String)
  1063. On Error Resume Next
  1064. Dim Directory As String
  1065.               Directory$ = filepath
  1066.               Open Directory$ For Output As #1
  1067.               
  1068.            Print #1, Text
  1069.        Close #1
  1070. Exit Sub
  1071. End Sub
  1072. Public Function ReadText(path As String) As String
  1073.     Dim temptxt As String
  1074.     temptxt = ""
  1075.     Open path For Input As #1
  1076.     Do While Not EOF(1)
  1077.         Line Input #1, x
  1078.         temptxt = temptxt + x + vbCrLf
  1079.     Loop
  1080.     Close #1
  1081.     ReadText = temptxt
  1082. End Function
  1083. Public Sub SizeImage()
  1084. If Picture1.Width > PicFrame.Width Then
  1085.     HS.Visible = True
  1086.     PicFrame.Height = 2535 - HS.Height
  1087.     PicFrame.Height = 2535
  1088.     HS.Visible = False
  1089. End If
  1090. If Picture1.Height > PicFrame.Height Then
  1091.     VS.Visible = True
  1092.     PicFrame.Width = PicFrame.Width - VS.Width
  1093.     PicFrame.Width = 2775
  1094.     VS.Visible = False
  1095. End If
  1096. HS.Width = PicFrame.Width
  1097. VS.Height = PicFrame.Height
  1098. HS.Max = Picture1.Width - HS.Width
  1099. VS.Max = Picture1.Height - VS.Height
  1100. End Sub
  1101. Private Sub VS_Change()
  1102. Picture1.Top = -VS.Value
  1103. End Sub
  1104. Private Sub VS_Scroll()
  1105. Picture1.Top = -VS.Value
  1106. End Sub
  1107.