home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BackColor = &H00C0C0C0&
- Caption = "MComboBox Demo"
- ClientHeight = 1716
- ClientLeft = 876
- ClientTop = 2100
- ClientWidth = 6336
- Height = 2460
- Left = 828
- LinkTopic = "Form1"
- ScaleHeight = 1716
- ScaleWidth = 6336
- Top = 1404
- Width = 6432
- Begin CommandButton Command2
- Caption = "&Resort"
- Height = 348
- Left = 3360
- TabIndex = 5
- Top = 576
- Width = 1356
- End
- Begin MComboBox MCombo2
- AddItemHeight = 0
- Alignment = 1 'Left
- BorderStyle = 0 'Normal
- ComboBoxStyle = 0 'Fixed
- DefPicture = FORM1.FRX:0000
- DrawRegions = 1
- FallColor = &H00808080&
- FindDirection = 0 'Forward
- FindResult = 0 'Update ListIndex
- Height = 576
- HiliteBackColor = &H00000000&
- HiliteForeColor = &H00000000&
- ImageRegion = 0
- ImageType = 2 'Aligned Bitmap
- ItemDefHeight = 500
- Left = 144
- LinesInList = 6
- MaskingColor = &H00C0C0C0&
- OwnerDraw = 0 'False
- RiseColor = &H00FFFFFF&
- SortColumn = 0
- Sorted = 0 'False
- StringCompare = 0 'Case Sensitive
- TabIndex = 4
- Top = 1008
- Version = "01.00"
- Width = 2844
- End
- Begin CommandButton Command1
- Caption = "&InString"
- Height = 348
- Left = 3360
- TabIndex = 1
- Top = 144
- Width = 1356
- End
- Begin MComboBox MCombo1
- AddItemHeight = 0
- Alignment = 1 'Left
- BackColor = &H00C0C0C0&
- BorderStyle = 2 'Inset
- ComboBoxStyle = 0 'Fixed
- DefPicture = FORM1.FRX:011A
- DragIcon = FORM1.FRX:0234
- DrawRegions = 3
- FallColor = &H00808080&
- FindDirection = 0 'Forward
- FindResult = 0 'Update ListIndex
- ForeColor = &H00000000&
- Height = 420
- HiliteBackColor = &H00000000&
- HiliteForeColor = &H00FFFFFF&
- ImageRegion = 1
- ImageType = 1 'Bitmap
- ItemDefHeight = 350
- Left = 144
- LinesInList = 6
- MaskingColor = &H00C0C0C0&
- OwnerDraw = 0 'False
- RiseColor = &H00FFFFFF&
- SortColumn = 1
- Sorted = -1 'True
- StringCompare = 0 'Case Sensitive
- TabIndex = 0
- Top = 288
- Version = "01.00"
- Width = 2892
- End
- Begin Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Aligned Bitmap Combo Box"
- Height = 204
- Left = 144
- TabIndex = 3
- Top = 768
- Width = 2844
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Normal w/Color, Font, Bitmaps"
- Height = 204
- Left = 144
- TabIndex = 2
- Top = 48
- Width = 2892
- End
- Begin Image Image1
- Height = 240
- Left = 6000
- Picture = FORM1.FRX:0536
- Top = 1344
- Width = 180
- End
- Begin Menu mnuCombo
- Caption = "&ComboBox"
- Begin Menu mnuText
- Caption = "&Text"
- End
- Begin Menu mnuListCount
- Caption = "&List Count"
- End
- Begin Menu mnuListIndex
- Caption = "List &Index"
- End
- Begin Menu mnuNormal
- Caption = "&Normal"
- End
- Begin Menu mnuBitmap2
- Caption = "&Bitmap"
- End
- End
- Begin Menu mnuBitmap
- Caption = "&Bitmap"
- Begin Menu mnuLeft
- Caption = "&Left"
- End
- Begin Menu mnuTop
- Caption = "&Top"
- End
- Begin Menu mnuRight
- Caption = "&Right"
- End
- Begin Menu mnuBottom
- Caption = "&Bottom"
- End
- End
- Begin Menu mnuMisc
- Caption = "&Misc"
- Begin Menu mnuItemData
- Caption = "&Item Data"
- End
- Begin Menu mnuNewIndex
- Caption = "&New Index"
- End
- Begin Menu mnuList
- Caption = "&List"
- End
- Begin Menu mnuActiveRegion
- Caption = "&ActiveRegion"
- End
- Begin Menu mnuListRegion
- Caption = "List&Region"
- End
- Begin Menu mnuTextRegion
- Caption = "&TextRegion"
- End
- Begin Menu mnuRemoveItem
- Caption = "&Remove Item"
- End
- End
- Sub Command1_Click ()
- MCombo1.InString = "Test String Two"
- End Sub
- Sub Command2_Click ()
- MCombo1.SortColumn = 2
- MCombo1.Resort = 1
- End Sub
- Sub Form_Load ()
- MCombo1.ItemLength(1) = 250
- MCombo1.ItemLength(2) = 1700
- MCombo1.ItemLength(3) = 250
- MCombo1.AddItem "Test String One" + Chr$(9) + "A"
- MCombo1.AddItem "TEST STRING ONE" + Chr$(9) + "B"
- MCombo1.AddItem "Test String Two" + Chr$(9) + "C"
- MCombo1.AddItem "Test String Three" + Chr$(9) + "D"
- MCombo1.AddItem "Test String Four" + Chr$(9) + "E"
- MCombo1.AddItem "Test String Five" + Chr$(9) + "F"
- MCombo1.AddItem "Test String Six" + Chr$(9) + "G"
- For I = 0 To MCombo1.ListCount - 1
- MCombo1.ItemData(I) = (I + 1) * 100
- Next I
- MCombo1.ItemFontName(3) = "Courier"
- MCombo1.ItemFontBold(3) = False
- MCombo1.ItemFontSize(3) = 15
- MCombo1.ItemPicture(1) = Image1.Picture
- MCombo1.ItemForeColor(2) = RGB(255, 0, 0)
- MCombo1.ItemBkColor(2) = RGB(192, 192, 192)
- MCombo1.ItemHiliteForeColor(2) = RGB(192, 192, 192)
- MCombo1.ItemHiliteBackColor(2) = RGB(255, 0, 0)
- MCombo1.ListIndex = 0
- MCombo2.AddItem "Bitmap String One"
- MCombo2.AddItem "Bitmap String Two"
- MCombo2.AddItem "Bitmap String Three"
- MCombo2.AddItem "Bitmap String Four"
- MCombo2.AddItem "Bitmap String Five"
- MCombo2.AddItem "Bitmap String Six"
- MCombo2.ListIndex = 0
- End Sub
- Sub MCombo1_DblClick ()
- MsgBox "DoubleClick"
- End Sub
- Sub MCombo1_SelChange ()
- Debug.Print "SelChange: " + MCombo1.Text
- End Sub
- Sub mnuActiveRegion_Click ()
- MCombo1.ActiveRegion = 1
- MCombo1.ListRegion(5) = "Change"
- MCombo1.TextRegion = "Change"
- End Sub
- Sub mnuBitmap_Click ()
- MCombo1.DrawRegions = 3
- MCombo1.ItemLength(1) = 250
- MCombo1.ItemLength(2) = 1700
- MCombo1.ItemLength(3) = 250
- MCombo1.ImageType = 1
- MCombo1.Refresh
- End Sub
- Sub mnuBottom_Click ()
- MCombo2.Alignment = 4
- MCombo2.Refresh
- End Sub
- Sub mnuItemData_Click ()
- For I = 0 To MCombo1.ListCount - 1
- Debug.Print "ItemData ("; Trim$(Str$(I)); "):" + Str$(MCombo1.ItemData(I))
- Next I
- End Sub
- Sub mnuLeft_Click ()
- MCombo2.Alignment = 1
- MCombo2.Refresh
- End Sub
- Sub mnuList_Click ()
- For I = 0 To MCombo1.ListCount - 1
- Debug.Print MCombo1.List(I)
- Next I
- End Sub
- Sub mnuListCount_Click ()
- MsgBox "MCombo1.ListCount =" + Str$(MCombo1.ListCount)
- End Sub
- Sub mnuListIndex_Click ()
- MsgBox "MCombo1.ListIndex =" + Str$(MCombo1.ListIndex)
- End Sub
- Sub mnuListRegion_Click ()
- MCombo1.ListRegion(0) = "Change II"
- End Sub
- Sub mnuNewIndex_Click ()
- MCombo2.AddItem "Adding String"
- MsgBox "MCombo2.NewIndex =" + Str$(MCombo2.NewIndex)
- End Sub
- Sub mnuNormal_Click ()
- MCombo1.DrawRegions = 2
- MCombo1.ItemLength(1) = 1700
- MCombo1.ItemLength(2) = 250
- MCombo1.ImageType = 0
- MCombo1.Refresh
- End Sub
- Sub mnuRemoveItem_Click ()
- MCombo1.RemoveItem 6
- End Sub
- Sub mnuRight_Click ()
- MCombo2.Alignment = 3
- MCombo2.Refresh
- End Sub
- Sub mnuText_Click ()
- MsgBox "Combo1.Text = " + MCombo1.Text
- End Sub
- Sub mnuTextRegion_Click ()
- MCombo1.TextRegion = "Change II"
- End Sub
- Sub mnuTop_Click ()
- MCombo2.Alignment = 2
- MCombo2.Refresh
- End Sub
-