home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_BAS / MLIST.ZIP / FORM1.FRM < prev    next >
Text File  |  1994-02-06  |  21KB  |  873 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Multi-Column Demo"
  5.    ClientHeight    =   4404
  6.    ClientLeft      =   456
  7.    ClientTop       =   1800
  8.    ClientWidth     =   8592
  9.    FontBold        =   0   'False
  10.    FontItalic      =   -1  'True
  11.    FontName        =   "MS Sans Serif"
  12.    FontSize        =   12
  13.    FontStrikethru  =   0   'False
  14.    FontUnderline   =   0   'False
  15.    Height          =   5148
  16.    Left            =   408
  17.    LinkTopic       =   "Form1"
  18.    ScaleHeight     =   4404
  19.    ScaleWidth      =   8592
  20.    Top             =   1104
  21.    Width           =   8688
  22.    Begin MListBox MList4 
  23.       Alignment       =   0  'None
  24.       AllowFocusRect  =   -1  'True
  25.       BackColor       =   &H00C0C0C0&
  26.       BorderStyle     =   1  'Raised
  27.       CheckStyle      =   0  'Cross Style
  28.       DefPicture      =   FORM1.FRX:0000
  29.       DrawRegions     =   1
  30.       EnableVirtualMsgs=   0   'False
  31.       ExtendedSelect  =   0   'False
  32.       FallColor       =   &H00808080&
  33.       FindDirection   =   0  'Forward
  34.       GridColor       =   &H00000000&
  35.       GridStyle       =   0  'Solid
  36.       Height          =   1524
  37.       HiliteBackColor =   &H00000000&
  38.       HiliteForeColor =   &H00000000&
  39.       HorizontalGrids =   0   'False
  40.       ImageRegion     =   0
  41.       ImageType       =   3  'Aligned Bitmap
  42.       ItemHeight      =   300
  43.       ItemWidth       =   1500
  44.       Left            =   4944
  45.       MaskingColor    =   &H00C0C0C0&
  46.       MultiColumn     =   -1  'True
  47.       MultiSelect     =   0   'False
  48.       RiseColor       =   &H00FFFFFF&
  49.       Sorted          =   0   'False
  50.       TabIndex        =   7
  51.       Top             =   2592
  52.       Version         =   "04.20"
  53.       VerticalGrids   =   0   'False
  54.       VirtualMsgZone  =   0
  55.       Width           =   3420
  56.    End
  57.    Begin MListBox MList3 
  58.       Alignment       =   1  'Left
  59.       AllowFocusRect  =   -1  'True
  60.       BackColor       =   &H00C0C0C0&
  61.       BorderStyle     =   2  'Inset
  62.       CheckStyle      =   0  'Cross Style
  63.       DefPicture      =   FORM1.FRX:011A
  64.       DrawRegions     =   1
  65.       EnableVirtualMsgs=   0   'False
  66.       ExtendedSelect  =   0   'False
  67.       FallColor       =   &H00808080&
  68.       FindDirection   =   0  'Forward
  69.       FontBold        =   0   'False
  70.       FontItalic      =   0   'False
  71.       FontName        =   "MS Sans Serif"
  72.       FontSize        =   9.6
  73.       FontStrikethru  =   0   'False
  74.       FontUnderline   =   0   'False
  75.       GridColor       =   &H00000000&
  76.       GridStyle       =   0  'Solid
  77.       Height          =   1536
  78.       HiliteBackColor =   &H00000000&
  79.       HiliteForeColor =   &H00FFFFFF&
  80.       HorizontalGrids =   0   'False
  81.       ImageRegion     =   0
  82.       ImageType       =   3  'Aligned Bitmap
  83.       ItemHeight      =   500
  84.       ItemWidth       =   780
  85.       Left            =   4944
  86.       MaskingColor    =   &H00C0C0C0&
  87.       MultiColumn     =   0   'False
  88.       MultiSelect     =   0   'False
  89.       RiseColor       =   &H00FFFFFF&
  90.       Sorted          =   0   'False
  91.       TabIndex        =   4
  92.       Top             =   480
  93.       Version         =   "04.20"
  94.       VerticalGrids   =   0   'False
  95.       VirtualMsgZone  =   0
  96.       Width           =   3420
  97.    End
  98.    Begin MListBox MList2 
  99.       Alignment       =   0  'None
  100.       AllowFocusRect  =   -1  'True
  101.       BackColor       =   &H00FFFF00&
  102.       BorderStyle     =   0  'Normal
  103.       CheckStyle      =   1  'Check Mark
  104.       DefPicture      =   FORM1.FRX:0234
  105.       DrawRegions     =   4
  106.       EnableVirtualMsgs=   -1  'True
  107.       ExtendedSelect  =   0   'False
  108.       FallColor       =   &H00808080&
  109.       FindDirection   =   0  'Forward
  110.       FontBold        =   0   'False
  111.       FontItalic      =   -1  'True
  112.       FontName        =   "MS Sans Serif"
  113.       FontSize        =   9.6
  114.       FontStrikethru  =   0   'False
  115.       FontUnderline   =   0   'False
  116.       ForeColor       =   &H00004080&
  117.       GridColor       =   &H00000000&
  118.       GridStyle       =   0  'Solid
  119.       Height          =   1524
  120.       HiliteBackColor =   &H00000000&
  121.       HiliteForeColor =   &H00000000&
  122.       HorizontalGrids =   0   'False
  123.       ImageRegion     =   1
  124.       ImageType       =   0  'None
  125.       ItemHeight      =   300
  126.       ItemWidth       =   780
  127.       Left            =   48
  128.       MaskingColor    =   &H00C0C0C0&
  129.       MultiColumn     =   0   'False
  130.       MultiSelect     =   0   'False
  131.       RiseColor       =   &H00FFFFFF&
  132.       Sorted          =   0   'False
  133.       TabIndex        =   0
  134.       Top             =   2592
  135.       Version         =   "04.20"
  136.       VerticalGrids   =   0   'False
  137.       VirtualMsgZone  =   10
  138.       Width           =   4668
  139.    End
  140.    Begin MListBox MList1 
  141.       Alignment       =   0  'None
  142.       AllowFocusRect  =   -1  'True
  143.       BorderStyle     =   0  'Normal
  144.       CheckStyle      =   0  'Cross Style
  145.       DrawRegions     =   3
  146.       EnableVirtualMsgs=   0   'False
  147.       ExtendedSelect  =   -1  'True
  148.       FallColor       =   &H00808080&
  149.       FindDirection   =   0  'Forward
  150.       GridColor       =   &H00C0C0C0&
  151.       GridStyle       =   0  'Solid
  152.       Height          =   1752
  153.       HiliteBackColor =   &H00000000&
  154.       HiliteForeColor =   &H00000000&
  155.       HorizontalGrids =   -1  'True
  156.       ImageRegion     =   0
  157.       ImageType       =   0  'None
  158.       ItemHeight      =   195
  159.       ItemWidth       =   780
  160.       Left            =   48
  161.       MaskingColor    =   &H00FFFFFF&
  162.       MultiColumn     =   0   'False
  163.       MultiSelect     =   -1  'True
  164.       RiseColor       =   &H00FFFFFF&
  165.       Sorted          =   -1  'True
  166.       TabIndex        =   1
  167.       Top             =   432
  168.       Version         =   "04.20"
  169.       VerticalGrids   =   -1  'True
  170.       VirtualMsgZone  =   0
  171.       Width           =   4668
  172.    End
  173.    Begin Label Label4 
  174.       BorderStyle     =   1  'Fixed Single
  175.       Caption         =   "Multi-Column Style Bitmapped List Box"
  176.       Height          =   252
  177.       Left            =   4944
  178.       TabIndex        =   6
  179.       Top             =   2304
  180.       Width           =   3420
  181.    End
  182.    Begin Label Label3 
  183.       BorderStyle     =   1  'Fixed Single
  184.       Caption         =   "Bitmapped List Box"
  185.       Height          =   252
  186.       Left            =   4944
  187.       TabIndex        =   5
  188.       Top             =   144
  189.       Width           =   3420
  190.    End
  191.    Begin Image Image1 
  192.       Height          =   240
  193.       Left            =   96
  194.       Picture         =   FORM1.FRX:034E
  195.       Top             =   4176
  196.       Visible         =   0   'False
  197.       Width           =   180
  198.    End
  199.    Begin Label Label2 
  200.       BorderStyle     =   1  'Fixed Single
  201.       Caption         =   "Normal List Box - Color, Font, Bitmaps, CheckBoxes"
  202.       Height          =   252
  203.       Left            =   48
  204.       TabIndex        =   3
  205.       Top             =   2304
  206.       Width           =   4668
  207.    End
  208.    Begin Label Label1 
  209.       BorderStyle     =   1  'Fixed Single
  210.       Caption         =   "Multi-Select Sorted List Box"
  211.       Height          =   252
  212.       Left            =   48
  213.       TabIndex        =   2
  214.       Top             =   144
  215.       Width           =   4668
  216.    End
  217.    Begin Menu mnuMultiSelect 
  218.       Caption         =   "&Multi-Select"
  219.       Begin Menu mnuSelected 
  220.          Caption         =   "&Selected"
  221.       End
  222.       Begin Menu mnuMListCount 
  223.          Caption         =   "&ListCount"
  224.       End
  225.       Begin Menu mnuSelCount 
  226.          Caption         =   "Sel&Count"
  227.       End
  228.       Begin Menu mnuMListIndex 
  229.          Caption         =   "List&Index"
  230.       End
  231.       Begin Menu mnuRange 
  232.          Caption         =   "Select/&Deselect Range"
  233.       End
  234.       Begin Menu mnuFocus 
  235.          Caption         =   "&Focus"
  236.       End
  237.    End
  238.    Begin Menu mnuNormal 
  239.       Caption         =   "&Normal"
  240.       Begin Menu mnuText 
  241.          Caption         =   "&Text"
  242.       End
  243.       Begin Menu mnuListCount 
  244.          Caption         =   "&ListCount"
  245.       End
  246.       Begin Menu mnuListIndex 
  247.          Caption         =   "List&Index"
  248.       End
  249.       Begin Menu mnuRegular 
  250.          Caption         =   "&Regular"
  251.       End
  252.       Begin Menu mnuBitmap 
  253.          Caption         =   "&Bitmap"
  254.       End
  255.       Begin Menu mnuCheckBox 
  256.          Caption         =   "&CheckBox"
  257.       End
  258.       Begin Menu mnuCheckRange 
  259.          Caption         =   "Check/&Uncheck Range"
  260.       End
  261.    End
  262.    Begin Menu mnuBitmapped 
  263.       Caption         =   "&Bitmapped"
  264.       Begin Menu mnuLeft 
  265.          Caption         =   "&Left"
  266.       End
  267.       Begin Menu mnuTop 
  268.          Caption         =   "&Top"
  269.       End
  270.       Begin Menu mnuRight 
  271.          Caption         =   "&Right"
  272.       End
  273.       Begin Menu mnuBottom 
  274.          Caption         =   "&Bottom"
  275.       End
  276.    End
  277.    Begin Menu mnuMisc 
  278.       Caption         =   "M&isc"
  279.       Begin Menu mnuItemData 
  280.          Caption         =   "&ItemData"
  281.       End
  282.       Begin Menu mnuTopIndex 
  283.          Caption         =   "&TopIndex"
  284.       End
  285.       Begin Menu mnuNewIndex 
  286.          Caption         =   "&NewIndex"
  287.       End
  288.       Begin Menu mnuList 
  289.          Caption         =   "&List"
  290.       End
  291.       Begin Menu mnuActiveRegion 
  292.          Caption         =   "&ActiveRegion"
  293.       End
  294.       Begin Menu mnuListRegion 
  295.          Caption         =   "L&istRegion"
  296.       End
  297.       Begin Menu mnuChecked 
  298.          Caption         =   "Checked"
  299.       End
  300.       Begin Menu mnuCheckItem2 
  301.          Caption         =   "Check Item 2"
  302.       End
  303.       Begin Menu mnuUncheckTwo 
  304.          Caption         =   "Uncheck Item Two"
  305.       End
  306.       Begin Menu mnuTest 
  307.          Caption         =   "Test Horz. Scroll Bar"
  308.       End
  309.       Begin Menu mnuRemoveItem 
  310.          Caption         =   "&Remove Item"
  311.       End
  312.       Begin Menu mnuMove 
  313.          Caption         =   "&Move"
  314.       End
  315.    End
  316. End
  317. Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
  318. Const LB_SETCOLUMNWIDTH = &H400 + 22
  319.  
  320. Sub Command1_Click ()
  321.  
  322.   Debug.Print "MList1 Count:" + MList1.ListCount
  323.  
  324. End Sub
  325.  
  326. Sub Command2_Click ()
  327.  
  328.   Debug.Print "MList1 SelCount: " + MList1.SelCount
  329.  
  330. End Sub
  331.  
  332. Sub Command4_Click ()
  333.  
  334.   Debug.Print "MList2 Count: " + MList2.ListCount
  335.  
  336. End Sub
  337.  
  338. Sub Command5_Click ()
  339.  
  340.   Debug.Print "MList2 Selected Text: " + MList2.Text
  341.  
  342. End Sub
  343.  
  344. Sub Command7_Click ()
  345.  
  346.   MList2.TopIndex = 3
  347.  
  348. End Sub
  349.  
  350. Sub Command8_Click ()
  351.  
  352.   Debug.Print "MList2.TopIndex = "; MList2.TopIndex
  353.  
  354. End Sub
  355.  
  356. Sub Form_Load ()
  357.  
  358.   Const DT_RIGHT = 2
  359.   Const DT_VCENTER = 4
  360.   Const DT_SINGLELINE = 32
  361.  
  362. ' Columns are separated by the Tab character
  363. ' We could set the number of columns ourselves by setting MList1.DrawRegions = ####
  364.   MList1.ItemLength(1) = 750
  365.   MList1.ItemLength(2) = 4000
  366.  
  367.   MList1.AddItem "Item1" + Chr$(9) + "Information One"
  368.   MList1.AddItem "Item2" + Chr$(9) + "Information Two"
  369.   MList1.AddItem "Item3" + Chr$(9) + "Information Three"
  370.   MList1.AddItem "Item4" + Chr$(9) + "Information Four"
  371.   MList1.AddItem "Item1" + Chr$(9) + "Information One"
  372.   MList1.AddItem "Item2" + Chr$(9) + "Information Two"
  373.   MList1.AddItem "Item3" + Chr$(9) + "Information Three"
  374.   MList1.AddItem "Item4" + Chr$(9) + "Information Four"
  375.  
  376. ' Print the default flags for item 1
  377.   Debug.Print "Item1 DrawFlags: " + MList1.DrawFlags(1)
  378.  
  379. ' When you set or change DrawRegions, the default flags are DT_LEFT + DT_VCENTER + DT_SINGLELINE
  380. ' You can set the flags to any legal value used by the Windows API call DrawText
  381. ' Change the dollar column to be right justified instead
  382.   MList2.DrawFlags(3) = DT_RIGHT + DT_VCENTER + DT_SINGLELINE
  383.  
  384.   Dim I As Integer
  385.  
  386.   For I = 0 To 4
  387.     MList2.AddItem "Item1" + Chr$(9) + "Information One" + Chr$(9) + "$45.00"
  388.     MList2.AddItem "Item2" + Chr$(9) + "Information Two" + Chr$(9) + "$36.69"
  389.     MList2.AddItem "Item3" + Chr$(9) + "Information Three" + Chr$(9) + "$2234.00"
  390.     MList2.AddItem "Item4" + Chr$(9) + "Information Four" + Chr$(9) + "$4.00"
  391.     MList2.AddItem "Item5" + Chr$(9) + "Information Five" + Chr$(9) + "$0.25"
  392.   Next I
  393.  
  394.   MList2.ItemLength(1) = 1000
  395.   MList2.ItemLength(2) = 1700
  396.   MList2.ItemLength(3) = 1300
  397.  
  398.   MList2.ItemForeColor(1) = RGB(255, 255, 255)
  399.   MList2.ItemBkColor(1) = RGB(0, 0, 0)
  400.  
  401.   MList2.ItemHiliteForeColor(1) = RGB(255, 0, 0)
  402.   MList2.ItemHiliteBackColor(1) = RGB(0, 0, 255)
  403.   MList2.HiliteBackColor = RGB(192, 192, 192)
  404.   MList2.HiliteForeColor = RGB(0, 0, 0)
  405.  
  406.   MList2.ItemData(0) = 199
  407.   MList2.ItemData(1) = 200
  408.   MList2.ItemData(2) = 201
  409.   MList2.ItemData(3) = 202
  410.   MList2.ItemData(4) = 203
  411.   MList2.ItemData(5) = 204
  412.   MList2.ItemData(6) = 205
  413.   MList2.ItemData(7) = 206
  414.   MList2.ItemData(8) = 207
  415.   MList2.ItemData(9) = 208
  416.   MList2.ItemData(10) = 209
  417.   MList2.ItemData(11) = 210
  418.   MList2.ItemData(12) = 211
  419.   MList2.ItemData(13) = 212
  420.   MList2.ItemData(14) = 213
  421.  
  422. ' Print the default flags for item 1
  423.   Debug.Print "Item3 DrawFlags: " + MList2.DrawFlags(3)
  424.   Debug.Print "ItemLength(2): "; MList2.ItemLength(2)
  425.  
  426.   MList3.AddItem "Bitmap string one"
  427.   MList3.AddItem "Bitmap string two"
  428.   MList3.AddItem "Bitmap string three"
  429.   MList3.AddItem "Bitmap string four"
  430.   MList3.AddItem "Bitmap string five"
  431.  
  432.   MList3.ItemPicture(1) = Image1.Picture
  433.  
  434.   Dim X As Integer
  435.  
  436.   For X = 1 To 20
  437.     MList4.AddItem "DOC" + Trim$(Str$(X)) + ".DOC"
  438.   Next X
  439.  
  440.   MList4.ItemPicture(4) = Image1.Picture
  441.  
  442.   ' X = SendMessage(MList4.hWnd, LB_SETCOLUMNWIDTH, 100, 0)
  443.  
  444. End Sub
  445.  
  446. Sub MList1_Click ()
  447.  
  448. '  MsgBox "Multi-Select List Box Click", 0, "MList1"
  449.  
  450. End Sub
  451.  
  452. Sub MList1_DblClick ()
  453.  
  454. '  MsgBox "Multi-Select List Box Double Click", 0, "MList1"
  455.  
  456. End Sub
  457.  
  458. Sub MList2_DblClick ()
  459.  
  460.   If MList2.ImageType = 1 Then
  461.     
  462.     If MList2.ItemPicture(MList2.ListIndex) <> Image1.Picture Then
  463.       MList2.ItemPicture(MList2.ListIndex) = Image1.Picture
  464.     Else
  465.       MList2.ItemPicture(MList2.ListIndex) = MList2.DefPicture
  466.     End If
  467.  
  468.   End If
  469. End Sub
  470.  
  471. Sub MList2_KeyPress (KeyAscii As Integer)
  472.  
  473.   If MList2.ImageType = 1 Then
  474.     
  475.     If MList2.ItemPicture(MList2.ListIndex) <> Image1.Picture Then
  476.       MList2.ItemPicture(MList2.ListIndex) = Image1.Picture
  477.     Else
  478.       MList2.ItemPicture(MList2.ListIndex) = MList2.DefPicture
  479.     End If
  480.   
  481.   Else
  482.     
  483.     If KeyAscii = 32 Then
  484.       MList2.Checked(MList2.ListIndex) = Not MList2.Checked(MList2.ListIndex)
  485.     End If
  486.   
  487.   End If
  488. End Sub
  489.  
  490. Sub MList2_SelChange ()
  491.  
  492.   Debug.Print "SelChange on line "; MList2.ListIndex
  493.  
  494. End Sub
  495.  
  496. Sub MList2_SelCheck (Index As Integer, CheckState As Integer)
  497.  
  498.   Dim aString As String
  499.  
  500.   If CheckState Then
  501.     aString = " On"
  502.   Else
  503.     aString = " Off"
  504.   End If
  505.  
  506.   Debug.Print "Line "; Index; " is"; aString
  507.  
  508. End Sub
  509.  
  510. Sub MList2_VirtualMessage (Message As Integer)
  511.  
  512.   Dim aString As String
  513.  
  514.   Select Case Message
  515.     Case 1
  516.       aString = "Add At Bottom"
  517.     Case 2
  518.       aString = "Add At Top"
  519.     Case 3
  520.       aString = "Home"
  521.     Case 4
  522.       aString = "End"
  523.   End Select
  524.  
  525.   Debug.Print "Scroll Message: "; aString
  526.  
  527. End Sub
  528.  
  529. Sub mnuActiveRegion_Click ()
  530.  
  531.   MList2.ActiveRegion = 2
  532.  
  533.   If MList2.ListIndex <> -1 Then
  534.  
  535.     Dim aString As String
  536.  
  537.     aString = "MList2.TextRegion = " + MList2.TextRegion
  538.     MsgBox aString, 0, "MList2"
  539.  
  540.     MList2.TextRegion = "Replace"
  541.     MList2.ActiveRegion = 3
  542.     MList2.TextRegion = "$1.00"
  543.  
  544.   End If
  545.  
  546.   aString = "MList2.ListRegion(3) = " + MList2.ListRegion(3)
  547.   MsgBox aString, 0, "MList2"
  548.  
  549.   MList2.ListRegion(3) = "Replace"
  550.  
  551.   MList1.ActiveRegion = 1
  552.  
  553.   If MList1.ListIndex <> -1 Then
  554.  
  555.     aString = "MList1.TextRegion = " + MList1.TextRegion
  556.     MsgBox aString, 0, "MList1"
  557.  
  558.     MList1.TextRegion = "Replace"
  559.  
  560.   End If
  561.  
  562. End Sub
  563.  
  564. Sub mnuBitmap_Click ()
  565.  
  566.   MList2.ItemLength(1) = 300
  567.   MList2.ItemLength(2) = 1000
  568.   MList2.ItemLength(3) = 1700
  569.   MList2.ItemLength(4) = 1300
  570.  
  571.   MList2.ItemPicture(1) = Image1.Picture
  572.  
  573.   If MList2.ImageType <> 1 Then
  574.     MList2.ImageType = 1
  575.     MList2.Refresh
  576.     MList2.ItemBkColor(1) = MList2.BackColor
  577.     MList2.ItemForeColor(1) = MList2.ForeColor
  578.   End If
  579.  
  580. End Sub
  581.  
  582. Sub mnuBottom_Click ()
  583.  
  584.   MList3.Alignment = 4
  585.   MList3.Refresh
  586.  
  587. End Sub
  588.  
  589. Sub mnuCheckBox_Click ()
  590.  
  591.   MList2.ItemLength(1) = 300
  592.   MList2.ItemLength(2) = 1000
  593.   MList2.ItemLength(3) = 1700
  594.   MList2.ItemLength(4) = 1300
  595.  
  596.   If MList2.ImageType <> 2 Then
  597.     MList2.ImageType = 2
  598.     MList2.Refresh
  599.     MList2.ItemBkColor(1) = MList2.BackColor
  600.     MList2.ItemForeColor(1) = MList2.ForeColor
  601.   End If
  602.  
  603. End Sub
  604.  
  605. Sub mnuChecked_Click ()
  606.  
  607.   MList2.Checked(1) = True
  608.  
  609.   Dim X%
  610.  
  611.   For X% = 0 To MList2.ListCount - 1
  612.  
  613.     If MList2.Checked(X%) Then
  614.       Debug.Print "MList2.Checked("; X%; ") = Checked"
  615.     Else
  616.       Debug.Print "MList2.Checked("; X%; ") = Unchecked"
  617.     End If
  618.  
  619.   Next X%
  620.  
  621. End Sub
  622.  
  623. Sub mnuCheckItem2_Click ()
  624.  
  625.   If MList2.ImageType = 2 Then
  626.     MList2.Checked(2) = True
  627.   End If
  628.  
  629. End Sub
  630.  
  631. Sub mnuCheckRange_Click ()
  632.  
  633.   If MList2.ImageType = 2 Then
  634.  
  635.     MList2.RangeStart = 0
  636.     MList2.RangeEnd = 3
  637.  
  638.     If MList2.Checked(0) Then
  639.       MList2.RangeChecked = False
  640.     Else
  641.       MList2.RangeChecked = True
  642.     End If
  643.   End If
  644.  
  645. End Sub
  646.  
  647. Sub mnuFocus_Click ()
  648.  
  649.   MList1.SetFocus
  650.  
  651. End Sub
  652.  
  653. Sub mnuItemData_Click ()
  654.  
  655.   Dim Count As Integer
  656.   Dim X As Integer
  657.   Dim aString As String
  658.  
  659.   Count = MList2.ListCount
  660.  
  661.   For X = 0 To Count - 1
  662.     Debug.Print "ItemData" + Str$(X) + ": " + Str$(MList2.ItemData(X))
  663.   Next
  664.  
  665. End Sub
  666.  
  667. Sub mnuLeft_Click ()
  668.  
  669.   MList3.Alignment = 1
  670.   MList3.Refresh
  671.  
  672. End Sub
  673.  
  674. Sub mnuList_Click ()
  675.  
  676.   For I = 0 To MList2.ListCount - 1
  677.     Debug.Print I; " - "; MList2.List(I)
  678.   Next I
  679.  
  680.   MList2.List(2) = "Rep" + Chr$(9) + "Replacement" + Chr$(9) + "$100.00"
  681.  
  682. End Sub
  683.  
  684. Sub mnuListCount_Click ()
  685.  
  686.   Dim aString As String
  687.  
  688.   aString = "MList2.ListCount = " + Str$(MList2.ListCount)
  689.   MsgBox aString, 0, "MList2"
  690.  
  691. End Sub
  692.  
  693. Sub mnuListIndex_Click ()
  694.  
  695.   Dim aString As String
  696.  
  697.   aString = "MList2.ListIndex = " + Str$(MList2.ListIndex)
  698.   MsgBox aString, 0, "MList2"
  699.   MList2.ListIndex = 2
  700.  
  701. End Sub
  702.  
  703. Sub mnuListRegion_Click ()
  704.  
  705.   MList1.ListIndex = 4
  706.   MList1.ActiveRegion = 1
  707.   MList1.ListRegion(4) = "List"
  708.  
  709.   MList1.ActiveRegion = 2
  710.   MList1.TextRegion = "Change by menu"
  711.  
  712. End Sub
  713.  
  714. Sub mnuMListCount_Click ()
  715.  
  716.   Dim aString As String
  717.  
  718.   aString = "MList1.ListCount = " + Str$(MList1.ListCount)
  719.   MsgBox aString, 0, "MList1"
  720.  
  721. End Sub
  722.  
  723. Sub mnuMListIndex_Click ()
  724.  
  725.   Dim aString As String
  726.  
  727.   aString = "MList1.ListIndex = " + Str$(MList1.ListIndex)
  728.   MsgBox aString, 0, "MList1"
  729.  
  730.   MList1.ListIndex = 2
  731.  
  732. End Sub
  733.  
  734. Sub mnuMove_Click ()
  735.  
  736.   MList1.Move 0, 0
  737.  
  738. End Sub
  739.  
  740. Sub mnuMSText_Click ()
  741.  
  742.   MsgBox MList1.Text, 0, "Text-MList1"
  743.  
  744. End Sub
  745.  
  746. Sub mnuNewIndex_Click ()
  747.  
  748.   MList1.AddItem "Item21" + Chr$(9) + "Information TwoOne"
  749.  
  750.   Dim aString As String
  751.  
  752.   aString = "MList1.NewIndex = " + Str$(MList1.NewIndex)
  753.   MsgBox aString, 0, "MList1"
  754.  
  755. End Sub
  756.  
  757. Sub mnuRange_Click ()
  758.  
  759.   MList1.RangeStart = 0
  760.   MList1.RangeEnd = 3
  761.  
  762.   If MList1.Selected(1) Then
  763.     MList1.RangeSelected = False
  764.   Else
  765.     MList1.RangeSelected = True
  766.   End If
  767.  
  768. End Sub
  769.  
  770. Sub mnuRegular_Click ()
  771.  
  772.   MList2.ItemLength(1) = 1000
  773.   MList2.ItemLength(2) = 1700
  774.   MList2.ItemLength(3) = 1300
  775.  
  776.   If MList2.ImageType Then
  777.     MList2.ImageType = 0
  778.     MList2.Refresh
  779.     MList2.ItemForeColor(1) = RGB(255, 255, 255)
  780.     MList2.ItemBkColor(1) = RGB(0, 0, 0)
  781.   End If
  782.  
  783. End Sub
  784.  
  785. Sub mnuRemoveItem_Click ()
  786.  
  787.   MList2.RemoveItem 2
  788.  
  789. End Sub
  790.  
  791. Sub mnuRight_Click ()
  792.  
  793.   MList3.Alignment = 3
  794.   MList3.Refresh
  795.  
  796. End Sub
  797.  
  798. Sub mnuSelCount_Click ()
  799.  
  800.   Dim aString As String
  801.  
  802.   aString = "MList1.SelCount = " + Str$(MList1.SelCount)
  803.   MsgBox aString, 0, "MList1"
  804.  
  805. End Sub
  806.  
  807. Sub mnuSelected_Click ()
  808.  
  809.   Dim Count As Integer
  810.   Dim X As Integer
  811.   Dim aString As String
  812.  
  813.   Count = MList1.ListCount
  814.  
  815.   If MList1.SelCount Then
  816.     For X = 0 To Count - 1
  817.  
  818.       If MList1.Selected(X) Then
  819.         aString = "True"
  820.       Else
  821.         aString = "False"
  822.       End If
  823.  
  824.       Debug.Print "Item" + Str$(X) + ": " + aString
  825.     Next
  826.   End If
  827.  
  828. End Sub
  829.  
  830. Sub mnuTest_Click ()
  831.  
  832.   MList2.ImageType = 0
  833.   MList2.ItemLength(1) = 1000
  834.   MList2.ItemLength(2) = 1000
  835.   MList2.ItemLength(3) = 1700
  836.   MList2.ItemLength(4) = 1300
  837.  
  838.   MList2.SetHzScroll = True
  839. End Sub
  840.  
  841. Sub mnuText_Click ()
  842.  
  843.   MsgBox MList2.Text, 0, "MList2"
  844.  
  845. End Sub
  846.  
  847. Sub mnuTop_Click ()
  848.  
  849.   MList3.Alignment = 2
  850.   MList3.Refresh
  851.  
  852. End Sub
  853.  
  854. Sub mnuTopIndex_Click ()
  855.  
  856.   MList2.TopIndex = 6
  857.  
  858.   Dim aString As String
  859.  
  860.   aString = "MList2.TopIndex = " + Str$(MList2.TopIndex)
  861.   MsgBox aString, 0, "MList2"
  862.  
  863. End Sub
  864.  
  865. Sub mnuUncheckTwo_Click ()
  866.  
  867.   If MList2.ImageType = 2 Then
  868.     MList2.Checked(2) = False
  869.   End If
  870.  
  871. End Sub
  872.  
  873.