home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / folder / folders.frm < prev    next >
Text File  |  1994-05-30  |  21KB  |  622 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Tab Test"
  5.    ClientHeight    =   4815
  6.    ClientLeft      =   1380
  7.    ClientTop       =   2055
  8.    ClientWidth     =   7110
  9.    Height          =   5220
  10.    KeyPreview      =   -1  'True
  11.    Left            =   1320
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   4815
  14.    ScaleWidth      =   7110
  15.    Top             =   1710
  16.    Width           =   7230
  17.    Begin Frame Frm 
  18.       Caption         =   "Misc2"
  19.       Height          =   3615
  20.       Index           =   5
  21.       Left            =   1200
  22.       TabIndex        =   3
  23.       Top             =   1800
  24.       Width           =   4575
  25.       Begin CommandButton Command2 
  26.          Caption         =   "&Quit"
  27.          Height          =   495
  28.          Left            =   2040
  29.          TabIndex        =   29
  30.          Top             =   2400
  31.          Width           =   735
  32.       End
  33.       Begin Label Label15 
  34.          BackColor       =   &H00C0C0C0&
  35.          Caption         =   "No VBXs"
  36.          FontBold        =   -1  'True
  37.          FontItalic      =   0   'False
  38.          FontName        =   "MS Sans Serif"
  39.          FontSize        =   9.75
  40.          FontStrikethru  =   0   'False
  41.          FontUnderline   =   0   'False
  42.          Height          =   255
  43.          Index           =   5
  44.          Left            =   480
  45.          TabIndex        =   49
  46.          Top             =   960
  47.          Width           =   3000
  48.       End
  49.       Begin Label Label15 
  50.          BackColor       =   &H00C0C0C0&
  51.          Caption         =   "No DLLs"
  52.          FontBold        =   -1  'True
  53.          FontItalic      =   0   'False
  54.          FontName        =   "MS Sans Serif"
  55.          FontSize        =   9.75
  56.          FontStrikethru  =   0   'False
  57.          FontUnderline   =   0   'False
  58.          Height          =   255
  59.          Index           =   4
  60.          Left            =   480
  61.          TabIndex        =   48
  62.          Top             =   1200
  63.          Width           =   3000
  64.       End
  65.       Begin Label Label15 
  66.          BackColor       =   &H00C0C0C0&
  67.          Caption         =   "Completely customizable"
  68.          FontBold        =   -1  'True
  69.          FontItalic      =   0   'False
  70.          FontName        =   "MS Sans Serif"
  71.          FontSize        =   9.75
  72.          FontStrikethru  =   0   'False
  73.          FontUnderline   =   0   'False
  74.          Height          =   255
  75.          Index           =   3
  76.          Left            =   480
  77.          TabIndex        =   47
  78.          Top             =   1440
  79.          Width           =   3000
  80.       End
  81.       Begin Label Label15 
  82.          BackColor       =   &H00C0C0C0&
  83.          Caption         =   "No fees or licenses"
  84.          FontBold        =   -1  'True
  85.          FontItalic      =   0   'False
  86.          FontName        =   "MS Sans Serif"
  87.          FontSize        =   9.75
  88.          FontStrikethru  =   0   'False
  89.          FontUnderline   =   0   'False
  90.          Height          =   255
  91.          Index           =   2
  92.          Left            =   480
  93.          TabIndex        =   46
  94.          Top             =   1680
  95.          Width           =   3000
  96.       End
  97.       Begin Label Label15 
  98.          BackColor       =   &H00C0C0C0&
  99.          Caption         =   "Piece of Cake"
  100.          FontBold        =   -1  'True
  101.          FontItalic      =   0   'False
  102.          FontName        =   "MS Sans Serif"
  103.          FontSize        =   9.75
  104.          FontStrikethru  =   0   'False
  105.          FontUnderline   =   0   'False
  106.          Height          =   255
  107.          Index           =   1
  108.          Left            =   480
  109.          TabIndex        =   45
  110.          Top             =   1920
  111.          Width           =   3000
  112.       End
  113.       Begin Label Label15 
  114.          BackColor       =   &H00C0C0C0&
  115.          Caption         =   "It's all done with code!"
  116.          FontBold        =   -1  'True
  117.          FontItalic      =   0   'False
  118.          FontName        =   "MS Sans Serif"
  119.          FontSize        =   12
  120.          FontStrikethru  =   0   'False
  121.          FontUnderline   =   0   'False
  122.          Height          =   255
  123.          Index           =   0
  124.          Left            =   240
  125.          TabIndex        =   44
  126.          Top             =   600
  127.          Width           =   3000
  128.       End
  129.    End
  130.    Begin Frame Frm 
  131.       Caption         =   "Step 1"
  132.       Height          =   1575
  133.       Index           =   1
  134.       Left            =   3120
  135.       TabIndex        =   6
  136.       Top             =   2760
  137.       Width           =   3015
  138.       Begin PictureBox Picture1 
  139.          Height          =   255
  140.          Left            =   120
  141.          ScaleHeight     =   225
  142.          ScaleWidth      =   945
  143.          TabIndex        =   28
  144.          Top             =   2040
  145.          Width           =   975
  146.       End
  147.       Begin Frame Frame3 
  148.          Caption         =   "Step 1"
  149.          Height          =   975
  150.          Left            =   3360
  151.          TabIndex        =   25
  152.          Top             =   1920
  153.          Width           =   1215
  154.          Begin HScrollBar HScroll1 
  155.             Height          =   255
  156.             Left            =   120
  157.             TabIndex        =   41
  158.             Top             =   600
  159.             Width           =   975
  160.          End
  161.          Begin DriveListBox Drive1 
  162.             Height          =   315
  163.             Left            =   120
  164.             TabIndex        =   40
  165.             Top             =   240
  166.             Width           =   975
  167.          End
  168.       End
  169.       Begin Frame Frame2 
  170.          Caption         =   "Misc"
  171.          Height          =   855
  172.          Left            =   1920
  173.          TabIndex        =   24
  174.          Top             =   1920
  175.          Width           =   1335
  176.          Begin OptionButton Option1 
  177.             Caption         =   "Option2"
  178.             FontBold        =   0   'False
  179.             FontItalic      =   0   'False
  180.             FontName        =   "MS Sans Serif"
  181.             FontSize        =   8.25
  182.             FontStrikethru  =   0   'False
  183.             FontUnderline   =   0   'False
  184.             Height          =   255
  185.             Index           =   1
  186.             Left            =   120
  187.             TabIndex        =   39
  188.             Top             =   480
  189.             Width           =   855
  190.          End
  191.          Begin OptionButton Option1 
  192.             Caption         =   "Option1"
  193.             FontBold        =   0   'False
  194.             FontItalic      =   0   'False
  195.             FontName        =   "MS Sans Serif"
  196.             FontSize        =   8.25
  197.             FontStrikethru  =   0   'False
  198.             FontUnderline   =   0   'False
  199.             Height          =   255
  200.             Index           =   0
  201.             Left            =   120
  202.             TabIndex        =   38
  203.             Top             =   240
  204.             Width           =   855
  205.          End
  206.       End
  207.       Begin Frame Frame1 
  208.          Caption         =   "Brag"
  209.          Height          =   975
  210.          Left            =   960
  211.          TabIndex        =   23
  212.          Top             =   2040
  213.          Width           =   1095
  214.          Begin CommandButton Command3 
  215.             Caption         =   "xyz"
  216.             Height          =   255
  217.             Left            =   360
  218.             TabIndex        =   37
  219.             Top             =   360
  220.             Width           =   375
  221.          End
  222.       End
  223.       Begin Label Label10 
  224.          BackColor       =   &H00C0C0C0&
  225.          Caption         =   "Add whatever controls are appropriate to each Frame."
  226.          Height          =   495
  227.          Index           =   1
  228.          Left            =   120
  229.          TabIndex        =   36
  230.          Top             =   1320
  231.          Width           =   4575
  232.       End
  233.       Begin Label Label10 
  234.          BackColor       =   &H00C0C0C0&
  235.          Caption         =   "Set the Caption property of each Frame to be the name for the folder tab."
  236.          Height          =   495
  237.          Index           =   0
  238.          Left            =   120
  239.          TabIndex        =   27
  240.          Top             =   840
  241.          Width           =   4575
  242.       End
  243.       Begin Label Label9 
  244.          BackColor       =   &H00C0C0C0&
  245.          Caption         =   "Create multiple Frame controls as an array.  Also create one PictureBox."
  246.          Height          =   495
  247.          Left            =   120
  248.          TabIndex        =   26
  249.          Top             =   360
  250.          Width           =   4575
  251.       End
  252.    End
  253.    Begin Frame Frm 
  254.       Caption         =   "Step 3"
  255.       Height          =   2175
  256.       Index           =   3
  257.       Left            =   5520
  258.       TabIndex        =   2
  259.       Top             =   2160
  260.       Width           =   2775
  261.       Begin Label Label14 
  262.          Alignment       =   2  'Center
  263.          BackColor       =   &H00C0C0C0&
  264.          Caption         =   "That's it!"
  265.          FontBold        =   -1  'True
  266.          FontItalic      =   0   'False
  267.          FontName        =   "MS Sans Serif"
  268.          FontSize        =   18
  269.          FontStrikethru  =   0   'False
  270.          FontUnderline   =   0   'False
  271.          Height          =   495
  272.          Left            =   240
  273.          TabIndex        =   43
  274.          Top             =   1560
  275.          Width           =   4335
  276.       End
  277.       Begin Label Label13 
  278.          BackColor       =   &H00C0C0C0&
  279.          Caption         =   "Start the program with the DefineFolders function."
  280.          Height          =   255
  281.          Left            =   240
  282.          TabIndex        =   42
  283.          Top             =   600
  284.          Width           =   4335
  285.       End
  286.    End
  287.    Begin Frame Frm 
  288.       Caption         =   "Step 2"
  289.       Height          =   2055
  290.       Index           =   2
  291.       Left            =   5640
  292.       TabIndex        =   0
  293.       Top             =   1920
  294.       Width           =   2415
  295.       Begin Frame Frame4 
  296.          BackColor       =   &H00808080&
  297.          Caption         =   "Brag"
  298.          FontBold        =   0   'False
  299.          FontItalic      =   0   'False
  300.          FontName        =   "MS Sans Serif"
  301.          FontSize        =   8.25
  302.          FontStrikethru  =   0   'False
  303.          FontUnderline   =   0   'False
  304.          Height          =   1575
  305.          Left            =   2400
  306.          TabIndex        =   30
  307.          Top             =   1320
  308.          Width           =   1935
  309.       End
  310.       Begin Label Label12 
  311.          BackColor       =   &H00C0C0C0&
  312.          Caption         =   "Font"
  313.          ForeColor       =   &H000000FF&
  314.          Height          =   255
  315.          Index           =   3
  316.          Left            =   240
  317.          TabIndex        =   35
  318.          Top             =   1200
  319.          Width           =   1815
  320.       End
  321.       Begin Label Label12 
  322.          BackColor       =   &H00C0C0C0&
  323.          Caption         =   "Location"
  324.          ForeColor       =   &H000000FF&
  325.          Height          =   255
  326.          Index           =   2
  327.          Left            =   240
  328.          TabIndex        =   34
  329.          Top             =   1440
  330.          Width           =   1815
  331.       End
  332.       Begin Label Label12 
  333.          BackColor       =   &H00C0C0C0&
  334.          Caption         =   "Size"
  335.          ForeColor       =   &H000000FF&
  336.          Height          =   255
  337.          Index           =   1
  338.          Left            =   240
  339.          TabIndex        =   33
  340.          Top             =   1680
  341.          Width           =   855
  342.       End
  343.       Begin Label Label12 
  344.          BackColor       =   &H00C0C0C0&
  345.          Caption         =   "Background color"
  346.          ForeColor       =   &H000000FF&
  347.          Height          =   255
  348.          Index           =   0
  349.          Left            =   240
  350.          TabIndex        =   32
  351.          Top             =   960
  352.          Width           =   1815
  353.       End
  354.       Begin Label Label11 
  355.          BackColor       =   &H00C0C0C0&
  356.          Caption         =   "Set the desired folder properties on the first frame only, including:"
  357.          Height          =   495
  358.          Left            =   120
  359.          TabIndex        =   31
  360.          Top             =   480
  361.          Width           =   4575
  362.       End
  363.    End
  364.    Begin Frame Frm 
  365.       Caption         =   "Misc1"
  366.       Height          =   1485
  367.       Index           =   4
  368.       Left            =   5640
  369.       TabIndex        =   5
  370.       Top             =   4080
  371.       Width           =   2805
  372.       Begin CommandButton Command1 
  373.          Caption         =   "&Goto tab #"
  374.          Height          =   375
  375.          Left            =   240
  376.          TabIndex        =   8
  377.          Top             =   2520
  378.          Width           =   1215
  379.       End
  380.       Begin TextBox Text2 
  381.          Height          =   315
  382.          Left            =   1680
  383.          TabIndex        =   7
  384.          Text            =   "0"
  385.          Top             =   2520
  386.          Width           =   285
  387.       End
  388.       Begin Label Label7 
  389.          BackColor       =   &H00C0C0C0&
  390.          BorderStyle     =   1  'Fixed Single
  391.          Caption         =   "GotoFolder"
  392.          FontBold        =   0   'False
  393.          FontItalic      =   0   'False
  394.          FontName        =   "Courier New"
  395.          FontSize        =   9.75
  396.          FontStrikethru  =   0   'False
  397.          FontUnderline   =   0   'False
  398.          Height          =   255
  399.          Left            =   120
  400.          TabIndex        =   21
  401.          Top             =   1680
  402.          Width           =   1335
  403.       End
  404.       Begin Label Label5 
  405.          BackColor       =   &H00C0C0C0&
  406.          BorderStyle     =   1  'Fixed Single
  407.          Caption         =   "TightenForm"
  408.          FontBold        =   0   'False
  409.          FontItalic      =   0   'False
  410.          FontName        =   "Courier New"
  411.          FontSize        =   9.75
  412.          FontStrikethru  =   0   'False
  413.          FontUnderline   =   0   'False
  414.          Height          =   255
  415.          Left            =   120
  416.          TabIndex        =   19
  417.          Top             =   840
  418.          Width           =   1455
  419.       End
  420.       Begin Label Label8 
  421.          BackColor       =   &H00C0C0C0&
  422.          Caption         =   "Allows instant jumping to the selected folder (try it):"
  423.          Height          =   495
  424.          Left            =   120
  425.          TabIndex        =   22
  426.          Top             =   1920
  427.          Width           =   4335
  428.       End
  429.       Begin Label Label6 
  430.          BackColor       =   &H00C0C0C0&
  431.          Caption         =   "This moves the folder to the top left of the window, and adjusts the windows to the tightest size."
  432.          Height          =   495
  433.          Left            =   120
  434.          TabIndex        =   20
  435.          Top             =   1080
  436.          Width           =   4575
  437.       End
  438.       Begin Label Label4 
  439.          BackColor       =   &H00C0C0C0&
  440.          Caption         =   "Some of the other functions available are:"
  441.          Height          =   255
  442.          Left            =   120
  443.          TabIndex        =   18
  444.          Top             =   480
  445.          Width           =   4575
  446.       End
  447.    End
  448.    Begin Frame Frm 
  449.       BackColor       =   &H00C0C0C0&
  450.       Caption         =   "Brag"
  451.       FontBold        =   0   'False
  452.       FontItalic      =   0   'False
  453.       FontName        =   "Arial"
  454.       FontSize        =   9.75
  455.       FontStrikethru  =   0   'False
  456.       FontUnderline   =   0   'False
  457.       ForeColor       =   &H00000000&
  458.       Height          =   3135
  459.       Index           =   0
  460.       Left            =   120
  461.       TabIndex        =   4
  462.       Top             =   120
  463.       Width           =   4815
  464.       Begin Label Label2 
  465.          BackColor       =   &H00C0C0C0&
  466.          BorderStyle     =   1  'Fixed Single
  467.          Caption         =   "If KeyCode = &&H22 Then NextFolder"
  468.          FontBold        =   0   'False
  469.          FontItalic      =   0   'False
  470.          FontName        =   "Courier New"
  471.          FontSize        =   9.75
  472.          FontStrikethru  =   0   'False
  473.          FontUnderline   =   0   'False
  474.          Height          =   255
  475.          Index           =   2
  476.          Left            =   120
  477.          TabIndex        =   16
  478.          Top             =   2520
  479.          Width           =   4575
  480.       End
  481.       Begin Label Label3 
  482.          BackColor       =   &H00C0C0C0&
  483.          BackStyle       =   0  'Transparent
  484.          Caption         =   "Other misc. lines handle some of the show-off stuff."
  485.          Height          =   255
  486.          Left            =   120
  487.          TabIndex        =   10
  488.          Top             =   2880
  489.          Width           =   4575
  490.       End
  491.       Begin Label Label2 
  492.          BackColor       =   &H00C0C0C0&
  493.          BorderStyle     =   1  'Fixed Single
  494.          Caption         =   "If KeyCode = &&H21 Then PrevFolder"
  495.          FontBold        =   0   'False
  496.          FontItalic      =   0   'False
  497.          FontName        =   "Courier New"
  498.          FontSize        =   9.75
  499.          FontStrikethru  =   0   'False
  500.          FontUnderline   =   0   'False
  501.          Height          =   255
  502.          Index           =   3
  503.          Left            =   120
  504.          TabIndex        =   17
  505.          Top             =   2280
  506.          Width           =   4575
  507.       End
  508.       Begin Label Label1 
  509.          BackColor       =   &H00C0C0C0&
  510.          Caption         =   "Two lines handle the PGUP/PGDN functions."
  511.          Height          =   255
  512.          Index           =   3
  513.          Left            =   120
  514.          TabIndex        =   15
  515.          Top             =   2040
  516.          Width           =   4575
  517.       End
  518.       Begin Label Label2 
  519.          BackColor       =   &H00C0C0C0&
  520.          BorderStyle     =   1  'Fixed Single
  521.          Caption         =   "FolderClick Button, X, Y"
  522.          FontBold        =   0   'False
  523.          FontItalic      =   0   'False
  524.          FontName        =   "Courier New"
  525.          FontSize        =   9.75
  526.          FontStrikethru  =   0   'False
  527.          FontUnderline   =   0   'False
  528.          Height          =   255
  529.          Index           =   1
  530.          Left            =   120
  531.          TabIndex        =   14
  532.          Top             =   1680
  533.          Width           =   4575
  534.       End
  535.       Begin Label Label2 
  536.          BackColor       =   &H00C0C0C0&
  537.          BorderStyle     =   1  'Fixed Single
  538.          Caption         =   "Success=DefineFolders(4,Frm(0),FTabs)"
  539.          FontBold        =   0   'False
  540.          FontItalic      =   0   'False
  541.          FontName        =   "Courier New"
  542.          FontSize        =   9.75
  543.          FontStrikethru  =   0   'False
  544.          FontUnderline   =   0   'False
  545.          Height          =   255
  546.          Index           =   0
  547.          Left            =   120
  548.          TabIndex        =   13
  549.          Top             =   1080
  550.          Width           =   4575
  551.       End
  552.       Begin Label Label1 
  553.          BackColor       =   &H00C0C0C0&
  554.          Caption         =   "One line handles the clicking on the tabs."
  555.          Height          =   255
  556.          Index           =   2
  557.          Left            =   120
  558.          TabIndex        =   12
  559.          Top             =   1440
  560.          Width           =   4575
  561.       End
  562.       Begin Label Label1 
  563.          BackColor       =   &H00C0C0C0&
  564.          Caption         =   "One line created the folders. "
  565.          Height          =   255
  566.          Index           =   1
  567.          Left            =   120
  568.          TabIndex        =   11
  569.          Top             =   840
  570.          Width           =   4575
  571.       End
  572.       Begin Label Label1 
  573.          BackColor       =   &H00C0C0C0&
  574.          Caption         =   "These folders were added to this form with only a few lines of code."
  575.          Height          =   375
  576.          Index           =   0
  577.          Left            =   120
  578.          TabIndex        =   9
  579.          Top             =   360
  580.          Width           =   4575
  581.       End
  582.    End
  583.    Begin PictureBox FTabs 
  584.       Height          =   1095
  585.       Left            =   3360
  586.       ScaleHeight     =   1065
  587.       ScaleWidth      =   2625
  588.       TabIndex        =   1
  589.       Top             =   240
  590.       Width           =   2655
  591.    End
  592. End
  593. Option Explicit
  594.  
  595. Sub Command1_Click ()
  596.   GotoFolder (CInt(Text2.Text))
  597. End Sub
  598.  
  599. Sub Command2_Click ()
  600.   End
  601. End Sub
  602.  
  603. Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
  604.   
  605.   If KeyCode = &H21 Then PrevFolder
  606.   If KeyCode = &H22 Then NextFolder
  607.  
  608. End Sub
  609.  
  610. Sub Form_Load ()
  611. Dim Success As Integer
  612.  
  613.   Success = DefineFolders(4, Frm(0), FTabs)
  614.   TightenForm
  615.  
  616. End Sub
  617.  
  618. Sub FTabs_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  619.   FolderClick Button, X, Y
  620. End Sub
  621.  
  622.