home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / mcm_box / form1.frm next >
Text File  |  1994-05-31  |  9KB  |  362 lines

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