home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / design / mcmbox / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-02-27  |  8.6 KB  |  289 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "MComboBox Demo"
  5.    ClientHeight    =   1710
  6.    ClientLeft      =   870
  7.    ClientTop       =   2100
  8.    ClientWidth     =   6330
  9.    Height          =   2640
  10.    Left            =   810
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   1710
  13.    ScaleWidth      =   6330
  14.    Top             =   1230
  15.    Width           =   6450
  16.    Begin CommandButton Command2 
  17.       Caption         =   "&Resort"
  18.       Height          =   348
  19.       Left            =   3360
  20.       TabIndex        =   5
  21.       Top             =   576
  22.       Width           =   1356
  23.    End
  24.    Begin MComboBox MCombo2 
  25.       AddItemHeight   =   0
  26.       Alignment       =   1  'Left
  27.       BorderStyle     =   0  'Normal
  28.       ComboBoxStyle   =   0  'Fixed
  29.       DefPicture      =   FORM1.FRX:0000
  30.       DrawRegions     =   1
  31.       FallColor       =   &H00808080&
  32.       FindCompare     =   0  'Case Sensitive
  33.       FindDirection   =   0  'Forward
  34.       FindResult      =   0  'Update ListIndex
  35.       Height          =   576
  36.       HiliteBackColor =   &H00000000&
  37.       HiliteForeColor =   &H00000000&
  38.       ImageRegion     =   0
  39.       ImageType       =   2  'Aligned Bitmap
  40.       ItemDefHeight   =   500
  41.       Left            =   144
  42.       LinesInList     =   6
  43.       MaskingColor    =   &H00C0C0C0&
  44.       OwnerDraw       =   0   'False
  45.       RiseColor       =   &H00FFFFFF&
  46.       SortColumn      =   0
  47.       Sorted          =   0   'False
  48.       StringCompare   =   0  'Case Sensitive
  49.       TabIndex        =   4
  50.       Top             =   1008
  51.       Version         =   "01.00"
  52.       Width           =   2844
  53.    End
  54.    Begin CommandButton Command1 
  55.       Caption         =   "&InString"
  56.       Height          =   348
  57.       Left            =   3360
  58.       TabIndex        =   1
  59.       Top             =   144
  60.       Width           =   1356
  61.    End
  62.    Begin MComboBox MCombo1 
  63.       AddItemHeight   =   0
  64.       Alignment       =   1  'Left
  65.       BackColor       =   &H00C0C0C0&
  66.       BorderStyle     =   2  'Inset
  67.       ComboBoxStyle   =   0  'Fixed
  68.       DefPicture      =   FORM1.FRX:011A
  69.       DragIcon        =   FORM1.FRX:0234
  70.       DrawRegions     =   3
  71.       FallColor       =   &H00808080&
  72.       FindCompare     =   0  'Case Sensitive
  73.       FindDirection   =   0  'Forward
  74.       FindResult      =   0  'Update ListIndex
  75.       ForeColor       =   &H00000000&
  76.       Height          =   420
  77.       HiliteBackColor =   &H00000000&
  78.       HiliteForeColor =   &H00FFFFFF&
  79.       ImageRegion     =   1
  80.       ImageType       =   1  'Bitmap
  81.       ItemDefHeight   =   350
  82.       Left            =   144
  83.       LinesInList     =   6
  84.       MaskingColor    =   &H00C0C0C0&
  85.       OwnerDraw       =   0   'False
  86.       RiseColor       =   &H00FFFFFF&
  87.       SortColumn      =   1
  88.       Sorted          =   -1  'True
  89.       StringCompare   =   0  'Case Sensitive
  90.       TabIndex        =   0
  91.       Top             =   288
  92.       Version         =   "01.00"
  93.       Width           =   2892
  94.    End
  95.    Begin Label Label2 
  96.       BorderStyle     =   1  'Fixed Single
  97.       Caption         =   "Aligned Bitmap Combo Box"
  98.       Height          =   204
  99.       Left            =   144
  100.       TabIndex        =   3
  101.       Top             =   768
  102.       Width           =   2844
  103.    End
  104.    Begin Label Label1 
  105.       BorderStyle     =   1  'Fixed Single
  106.       Caption         =   "Normal w/Color, Font, Bitmaps"
  107.       Height          =   204
  108.       Left            =   144
  109.       TabIndex        =   2
  110.       Top             =   48
  111.       Width           =   2892
  112.    End
  113.    Begin Image Image1 
  114.       Height          =   300
  115.       Left            =   6000
  116.       Picture         =   FORM1.FRX:0536
  117.       Top             =   1350
  118.       Width           =   225
  119.    End
  120.    Begin Menu mnuCombo 
  121.       Caption         =   "&ComboBox"
  122.       Begin Menu mnuText 
  123.          Caption         =   "&Text"
  124.       End
  125.       Begin Menu mnuListCount 
  126.          Caption         =   "&List Count"
  127.       End
  128.       Begin Menu mnuListIndex 
  129.          Caption         =   "List &Index"
  130.       End
  131.       Begin Menu mnuNormal 
  132.          Caption         =   "&Normal"
  133.       End
  134.       Begin Menu mnuBitmap2 
  135.          Caption         =   "&Bitmap"
  136.       End
  137.    End
  138.    Begin Menu mnuBitmap 
  139.       Caption         =   "&Bitmap"
  140.       Begin Menu mnuLeft 
  141.          Caption         =   "&Left"
  142.       End
  143.       Begin Menu mnuTop 
  144.          Caption         =   "&Top"
  145.       End
  146.       Begin Menu mnuRight 
  147.          Caption         =   "&Right"
  148.       End
  149.       Begin Menu mnuBottom 
  150.          Caption         =   "&Bottom"
  151.       End
  152.    End
  153.    Begin Menu mnuMisc 
  154.       Caption         =   "&Misc"
  155.       Begin Menu mnuItemData 
  156.          Caption         =   "&Item Data"
  157.       End
  158.       Begin Menu mnuNewIndex 
  159.          Caption         =   "&New Index"
  160.       End
  161.       Begin Menu mnuList 
  162.          Caption         =   "&List"
  163.       End
  164.       Begin Menu mnuActiveRegion 
  165.          Caption         =   "&ActiveRegion"
  166.       End
  167.       Begin Menu mnuListRegion 
  168.          Caption         =   "List&Region"
  169.       End
  170.       Begin Menu mnuTextRegion 
  171.          Caption         =   "&TextRegion"
  172.       End
  173.       Begin Menu mnuRemoveItem 
  174.          Caption         =   "&Remove Item"
  175.       End
  176.    End
  177. Sub Command1_Click ()
  178.   MCombo1.InString = "Test String Two"
  179. End Sub
  180. Sub Command2_Click ()
  181.   MCombo1.SortColumn = 2
  182.   MCombo1.Resort = 1
  183. End Sub
  184. Sub Form_Load ()
  185.   MCombo1.ItemLength(1) = 250
  186.   MCombo1.ItemLength(2) = 1700
  187.   MCombo1.ItemLength(3) = 250
  188.   MCombo1.AddItem "Test String One" + Chr$(9) + "A"
  189.   MCombo1.AddItem "TEST STRING ONE" + Chr$(9) + "B"
  190.   MCombo1.AddItem "Test String Two" + Chr$(9) + "C"
  191.   MCombo1.AddItem "Test String Three" + Chr$(9) + "D"
  192.   MCombo1.AddItem "Test String Four" + Chr$(9) + "E"
  193.   MCombo1.AddItem "Test String Five" + Chr$(9) + "F"
  194.   MCombo1.AddItem "Test String Six" + Chr$(9) + "G"
  195.   For I = 0 To MCombo1.ListCount - 1
  196.     MCombo1.ItemData(I) = (I + 1) * 100
  197.   Next I
  198.   MCombo1.ItemFontName(3) = "Courier"
  199.   MCombo1.ItemFontBold(3) = False
  200.   MCombo1.ItemFontSize(3) = 15
  201.   MCombo1.ItemPicture(1) = Image1.Picture
  202.   MCombo1.ItemForeColor(2) = RGB(255, 0, 0)
  203.   MCombo1.ItemBkColor(2) = RGB(192, 192, 192)
  204.   MCombo1.ItemHiliteForeColor(2) = RGB(192, 192, 192)
  205.   MCombo1.ItemHiliteBackColor(2) = RGB(255, 0, 0)
  206.   MCombo1.ListIndex = 0
  207.   MCombo2.AddItem "Bitmap String One"
  208.   MCombo2.AddItem "Bitmap String Two"
  209.   MCombo2.AddItem "Bitmap String Three"
  210.   MCombo2.AddItem "Bitmap String Four"
  211.   MCombo2.AddItem "Bitmap String Five"
  212.   MCombo2.AddItem "Bitmap String Six"
  213.   MCombo2.ListIndex = 0
  214. End Sub
  215. Sub MCombo1_DblClick ()
  216.   MsgBox "DoubleClick"
  217. End Sub
  218. Sub MCombo1_SelChange ()
  219.   Debug.Print "SelChange: " + MCombo1.Text
  220. End Sub
  221. Sub mnuActiveRegion_Click ()
  222.   MCombo1.ActiveRegion = 1
  223.   MCombo1.ListRegion(5) = "Change"
  224.   MCombo1.TextRegion = "Change"
  225. End Sub
  226. Sub mnuBitmap_Click ()
  227.   MCombo1.DrawRegions = 3
  228.   MCombo1.ItemLength(1) = 250
  229.   MCombo1.ItemLength(2) = 1700
  230.   MCombo1.ItemLength(3) = 250
  231.   MCombo1.ImageType = 1
  232.   MCombo1.Refresh
  233. End Sub
  234. Sub mnuBottom_Click ()
  235.   MCombo2.Alignment = 4
  236.   MCombo2.Refresh
  237. End Sub
  238. Sub mnuItemData_Click ()
  239.   For I = 0 To MCombo1.ListCount - 1
  240.     Debug.Print "ItemData ("; Trim$(Str$(I)); "):" + Str$(MCombo1.ItemData(I))
  241.   Next I
  242. End Sub
  243. Sub mnuLeft_Click ()
  244.   MCombo2.Alignment = 1
  245.   MCombo2.Refresh
  246. End Sub
  247. Sub mnuList_Click ()
  248.   For I = 0 To MCombo1.ListCount - 1
  249.     Debug.Print MCombo1.List(I)
  250.   Next I
  251. End Sub
  252. Sub mnuListCount_Click ()
  253.   MsgBox "MCombo1.ListCount =" + Str$(MCombo1.ListCount)
  254. End Sub
  255. Sub mnuListIndex_Click ()
  256.   MsgBox "MCombo1.ListIndex =" + Str$(MCombo1.ListIndex)
  257. End Sub
  258. Sub mnuListRegion_Click ()
  259.   MCombo1.ListRegion(0) = "Change II"
  260. End Sub
  261. Sub mnuNewIndex_Click ()
  262.   MCombo2.AddItem "Adding String"
  263.   MsgBox "MCombo2.NewIndex =" + Str$(MCombo2.NewIndex)
  264. End Sub
  265. Sub mnuNormal_Click ()
  266.   MCombo1.DrawRegions = 2
  267.   MCombo1.ItemLength(1) = 1700
  268.   MCombo1.ItemLength(2) = 250
  269.   MCombo1.ImageType = 0
  270.   MCombo1.Refresh
  271. End Sub
  272. Sub mnuRemoveItem_Click ()
  273.   MCombo1.RemoveItem 6
  274. End Sub
  275. Sub mnuRight_Click ()
  276.   MCombo2.Alignment = 3
  277.   MCombo2.Refresh
  278. End Sub
  279. Sub mnuText_Click ()
  280.   MsgBox "Combo1.Text = " + MCombo1.Text
  281. End Sub
  282. Sub mnuTextRegion_Click ()
  283.   MCombo1.TextRegion = "Change II"
  284. End Sub
  285. Sub mnuTop_Click ()
  286.   MCombo2.Alignment = 2
  287.   MCombo2.Refresh
  288. End Sub
  289.