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