home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / ownrdclb / test.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-06-28  |  21.9 KB  |  654 lines

  1. VERSION 5.00
  2. Object = "{72D18DD4-0DA7-11D2-8E21-00B404C10000}#2.1#0"; "ODCboLst.ocx"
  3. Begin VB.Form frmTest 
  4.    Caption         =   "Owner Draw Combo Box Tester"
  5.    ClientHeight    =   8475
  6.    ClientLeft      =   3765
  7.    ClientTop       =   2130
  8.    ClientWidth     =   7740
  9.    BeginProperty Font 
  10.       Name            =   "Tahoma"
  11.       Size            =   8.25
  12.       Charset         =   0
  13.       Weight          =   400
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    Icon            =   "Test.frx":0000
  19.    LinkTopic       =   "Form1"
  20.    ScaleHeight     =   8475
  21.    ScaleWidth      =   7740
  22.    Begin ODCboLst.OwnerDrawComboList cboFonts 
  23.       Height          =   360
  24.       Left            =   120
  25.       TabIndex        =   6
  26.       Top             =   4020
  27.       Width           =   3015
  28.       _ExtentX        =   5318
  29.       _ExtentY        =   635
  30.       Sorted          =   -1  'True
  31.       ExtendedUI      =   -1  'True
  32.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  33.          Name            =   "Tahoma"
  34.          Size            =   8.25
  35.          Charset         =   0
  36.          Weight          =   400
  37.          Underline       =   0   'False
  38.          Italic          =   0   'False
  39.          Strikethrough   =   0   'False
  40.       EndProperty
  41.       ForeColor       =   -2147483630
  42.       ClientDraw      =   7
  43.       Style           =   0
  44.    End
  45.    Begin VB.CommandButton Command1 
  46.       Caption         =   "Command1"
  47.       Height          =   435
  48.       Left            =   5940
  49.       TabIndex        =   14
  50.       Top             =   5940
  51.       Width           =   1095
  52.    End
  53.    Begin VB.Timer tmrFocus 
  54.       Interval        =   250
  55.       Left            =   3600
  56.       Top             =   3120
  57.    End
  58.    Begin ODCboLst.OwnerDrawComboList lstMultiSelect 
  59.       Height          =   1815
  60.       Left            =   4800
  61.       TabIndex        =   12
  62.       Top             =   3960
  63.       Width           =   2835
  64.       _ExtentX        =   5001
  65.       _ExtentY        =   3201
  66.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  67.          Name            =   "Tahoma"
  68.          Size            =   8.25
  69.          Charset         =   0
  70.          Weight          =   400
  71.          Underline       =   0   'False
  72.          Italic          =   0   'False
  73.          Strikethrough   =   0   'False
  74.       EndProperty
  75.       ForeColor       =   -2147483630
  76.       Style           =   6
  77.    End
  78.    Begin ODCboLst.OwnerDrawComboList cboCursors 
  79.       Height          =   360
  80.       Left            =   4740
  81.       TabIndex        =   10
  82.       Top             =   2640
  83.       Width           =   2895
  84.       _ExtentX        =   5106
  85.       _ExtentY        =   635
  86.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  87.          Name            =   "Tahoma"
  88.          Size            =   8.25
  89.          Charset         =   0
  90.          Weight          =   400
  91.          Underline       =   0   'False
  92.          Italic          =   0   'False
  93.          Strikethrough   =   0   'False
  94.       EndProperty
  95.       ForeColor       =   -2147483630
  96.       Style           =   0
  97.    End
  98.    Begin ODCboLst.OwnerDrawComboList lstSysColours 
  99.       Height          =   1995
  100.       Left            =   4740
  101.       TabIndex        =   9
  102.       Top             =   300
  103.       Width           =   2955
  104.       _ExtentX        =   5212
  105.       _ExtentY        =   3519
  106.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  107.          Name            =   "Tahoma"
  108.          Size            =   8.25
  109.          Charset         =   0
  110.          Weight          =   400
  111.          Underline       =   0   'False
  112.          Italic          =   0   'False
  113.          Strikethrough   =   0   'False
  114.       EndProperty
  115.       ForeColor       =   -2147483630
  116.       ClientDraw      =   5
  117.       Style           =   4
  118.    End
  119.    Begin ODCboLst.OwnerDrawComboList cboSysColor 
  120.       Height          =   360
  121.       Left            =   120
  122.       TabIndex        =   0
  123.       Top             =   360
  124.       Width           =   1875
  125.       _ExtentX        =   3307
  126.       _ExtentY        =   635
  127.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  128.          Name            =   "Tahoma"
  129.          Size            =   8.25
  130.          Charset         =   0
  131.          Weight          =   400
  132.          Underline       =   0   'False
  133.          Italic          =   0   'False
  134.          Strikethrough   =   0   'False
  135.       EndProperty
  136.       ForeColor       =   -2147483630
  137.       ClientDraw      =   5
  138.    End
  139.    Begin ODCboLst.OwnerDrawComboList cboColorPicker 
  140.       Height          =   360
  141.       Left            =   120
  142.       TabIndex        =   3
  143.       Top             =   1800
  144.       Width           =   1995
  145.       _ExtentX        =   3519
  146.       _ExtentY        =   635
  147.       ExtendedUI      =   -1  'True
  148.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  149.          Name            =   "Tahoma"
  150.          Size            =   8.25
  151.          Charset         =   0
  152.          Weight          =   400
  153.          Underline       =   0   'False
  154.          Italic          =   0   'False
  155.          Strikethrough   =   0   'False
  156.       EndProperty
  157.       ForeColor       =   -2147483630
  158.       ClientDraw      =   3
  159.    End
  160.    Begin ODCboLst.OwnerDrawComboList cboStyles 
  161.       Height          =   360
  162.       Left            =   120
  163.       TabIndex        =   5
  164.       Top             =   3180
  165.       Width           =   3015
  166.       _ExtentX        =   5318
  167.       _ExtentY        =   635
  168.       ExtendedUI      =   -1  'True
  169.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  170.          Name            =   "Tahoma"
  171.          Size            =   8.25
  172.          Charset         =   0
  173.          Weight          =   400
  174.          Underline       =   0   'False
  175.          Italic          =   0   'False
  176.          Strikethrough   =   0   'False
  177.       EndProperty
  178.       ForeColor       =   -2147483630
  179.       ClientDraw      =   6
  180.       Style           =   0
  181.    End
  182.    Begin ODCboLst.OwnerDrawComboList lstCheck 
  183.       Height          =   1335
  184.       Left            =   180
  185.       TabIndex        =   7
  186.       Top             =   4860
  187.       Width           =   4155
  188.       _ExtentX        =   7329
  189.       _ExtentY        =   2355
  190.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  191.          Name            =   "Tahoma"
  192.          Size            =   8.25
  193.          Charset         =   0
  194.          Weight          =   400
  195.          Underline       =   0   'False
  196.          Italic          =   0   'False
  197.          Strikethrough   =   0   'False
  198.       EndProperty
  199.       ForeColor       =   -2147483630
  200.       Style           =   7
  201.    End
  202.    Begin ODCboLst.OwnerDrawComboList lstMultiCol 
  203.       Height          =   1875
  204.       Left            =   180
  205.       TabIndex        =   8
  206.       Top             =   6540
  207.       Width           =   7455
  208.       _ExtentX        =   13150
  209.       _ExtentY        =   3307
  210.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  211.          Name            =   "MS Sans Serif"
  212.          Size            =   8.25
  213.          Charset         =   0
  214.          Weight          =   400
  215.          Underline       =   0   'False
  216.          Italic          =   0   'False
  217.          Strikethrough   =   0   'False
  218.       EndProperty
  219.       Style           =   4
  220.    End
  221.    Begin VB.CheckBox chkEnabled 
  222.       Caption         =   "&Enabled"
  223.       Enabled         =   0   'False
  224.       Height          =   195
  225.       Left            =   4800
  226.       TabIndex        =   13
  227.       Top             =   5880
  228.       Width           =   2835
  229.    End
  230.    Begin VB.CheckBox chkShowNames 
  231.       Caption         =   "&Show Names"
  232.       Height          =   255
  233.       Left            =   120
  234.       TabIndex        =   4
  235.       Top             =   2400
  236.       Value           =   1  'Checked
  237.       Width           =   1995
  238.    End
  239.    Begin VB.PictureBox picColorSample 
  240.       BeginProperty Font 
  241.          Name            =   "MS Sans Serif"
  242.          Size            =   8.25
  243.          Charset         =   0
  244.          Weight          =   400
  245.          Underline       =   0   'False
  246.          Italic          =   0   'False
  247.          Strikethrough   =   0   'False
  248.       EndProperty
  249.       Height          =   855
  250.       Left            =   2160
  251.       ScaleHeight     =   795
  252.       ScaleWidth      =   915
  253.       TabIndex        =   20
  254.       TabStop         =   0   'False
  255.       Top             =   1800
  256.       Width           =   975
  257.    End
  258.    Begin VB.CheckBox chkVisible 
  259.       Caption         =   "Selection &Invisible"
  260.       Height          =   195
  261.       Left            =   120
  262.       TabIndex        =   2
  263.       Top             =   1080
  264.       Value           =   1  'Checked
  265.       Width           =   1935
  266.    End
  267.    Begin VB.CommandButton cmdLoad 
  268.       Caption         =   "&Load..."
  269.       Height          =   375
  270.       Left            =   4800
  271.       TabIndex        =   11
  272.       Top             =   3180
  273.       Width           =   1035
  274.    End
  275.    Begin VB.CommandButton cmdShow 
  276.       Caption         =   "v"
  277.       Height          =   375
  278.       Left            =   3240
  279.       TabIndex        =   1
  280.       Top             =   420
  281.       Width           =   375
  282.    End
  283.    Begin VB.PictureBox picSample 
  284.       BeginProperty Font 
  285.          Name            =   "MS Sans Serif"
  286.          Size            =   8.25
  287.          Charset         =   0
  288.          Weight          =   400
  289.          Underline       =   0   'False
  290.          Italic          =   0   'False
  291.          Strikethrough   =   0   'False
  292.       EndProperty
  293.       Height          =   855
  294.       Left            =   2160
  295.       ScaleHeight     =   795
  296.       ScaleWidth      =   915
  297.       TabIndex        =   15
  298.       TabStop         =   0   'False
  299.       Top             =   420
  300.       Width           =   975
  301.    End
  302.    Begin VB.Label lblFocus 
  303.       Caption         =   "Label7"
  304.       Height          =   315
  305.       Left            =   3480
  306.       TabIndex        =   26
  307.       Top             =   3600
  308.       Width           =   1035
  309.    End
  310.    Begin VB.Label Label6 
  311.       Caption         =   "Multi Column List Box:"
  312.       Height          =   195
  313.       Left            =   180
  314.       TabIndex        =   25
  315.       Top             =   6300
  316.       Width           =   7395
  317.    End
  318.    Begin VB.Label lblCheck 
  319.       Caption         =   "Checked List Box:"
  320.       Height          =   195
  321.       Left            =   180
  322.       TabIndex        =   24
  323.       Top             =   4620
  324.       Width           =   3135
  325.    End
  326.    Begin VB.Label Label5 
  327.       Caption         =   "Font Chooser Combo:"
  328.       Height          =   195
  329.       Left            =   180
  330.       TabIndex        =   23
  331.       Top             =   3780
  332.       Width           =   3015
  333.    End
  334.    Begin VB.Label Label4 
  335.       Caption         =   "As a Multi Select List Box:"
  336.       Height          =   195
  337.       Left            =   4800
  338.       TabIndex        =   22
  339.       Top             =   3660
  340.       Width           =   2775
  341.    End
  342.    Begin VB.Label lblDefault 
  343.       Caption         =   "Default Draw Using Imagelist"
  344.       Height          =   255
  345.       Left            =   4800
  346.       TabIndex        =   21
  347.       Top             =   2400
  348.       Width           =   2775
  349.    End
  350.    Begin VB.Label Label3 
  351.       Caption         =   "Colour Picker Combo:"
  352.       Height          =   195
  353.       Left            =   120
  354.       TabIndex        =   19
  355.       Top             =   1560
  356.       Width           =   3075
  357.    End
  358.    Begin VB.Label Label2 
  359.       Caption         =   "Sys Colour Picker as a List Box:"
  360.       Height          =   195
  361.       Left            =   4740
  362.       TabIndex        =   18
  363.       Top             =   60
  364.       Width           =   2775
  365.    End
  366.    Begin VB.Label Label1 
  367.       Caption         =   "Paragraph Style Chooser Combo:"
  368.       Height          =   195
  369.       Left            =   180
  370.       TabIndex        =   17
  371.       Top             =   3000
  372.       Width           =   3015
  373.    End
  374.    Begin VB.Label lblSysCol 
  375.       Caption         =   "Sys Colour Picker as a ComboBox:"
  376.       Height          =   195
  377.       Left            =   120
  378.       TabIndex        =   16
  379.       Top             =   120
  380.       Width           =   3075
  381.    End
  382. Attribute VB_Name = "frmTest"
  383. Attribute VB_GlobalNameSpace = False
  384. Attribute VB_Creatable = False
  385. Attribute VB_PredeclaredId = True
  386. Attribute VB_Exposed = False
  387. Option Explicit
  388. Private Sub AddStyles()
  389.     Dim sFnt As New StdFont, lHeight As Long
  390.     lHeight = 32
  391.     With cboStyles
  392.         sFnt.Name = "Arial"
  393.         sFnt.Size = 14
  394.         sFnt.Bold = True
  395.         sFnt.Italic = False
  396.         Set Me.Font = sFnt
  397.         .AddItemAndData "Heading 1", , 8, , , sFnt.Size, , lHeight, , eixVCentre, sFnt
  398.         sFnt.Name = "Arial"
  399.         sFnt.Size = 12
  400.         sFnt.Bold = False
  401.         sFnt.Italic = True
  402.         Set Me.Font = sFnt
  403.         .AddItemAndData "Heading 2", , 8, , , sFnt.Size, , lHeight, , eixVCentre, sFnt
  404.         sFnt.Name = "Arial"
  405.         sFnt.Size = 10
  406.         sFnt.Bold = True
  407.         sFnt.Italic = False
  408.         Set Me.Font = sFnt
  409.         .AddItemAndData "Heading 3", , 8, , , sFnt.Size, , lHeight, , eixVCentre, sFnt
  410.         sFnt.Name = "Times New Roman"
  411.         sFnt.Size = 10
  412.         sFnt.Bold = False
  413.         sFnt.Italic = False
  414.         Set Me.Font = sFnt
  415.         .AddItemAndData "Normal", , 8, , , sFnt.Size, , lHeight, , eixVCentre, sFnt
  416.         .AddItemAndData "Centred", , 8, , , sFnt.Size, , lHeight, eixCentre, eixVCentre, sFnt
  417.         sFnt.Name = "Courier New"
  418.         sFnt.Size = 8
  419.         sFnt.Bold = False
  420.         sFnt.Italic = False
  421.         Set Me.Font = sFnt
  422.         .AddItemAndData "Code", , 8, , , sFnt.Size, , lHeight, , eixVCentre, sFnt
  423.         sFnt.Name = "Arial"
  424.         sFnt.Size = 10
  425.         sFnt.Bold = False
  426.         sFnt.Italic = False
  427.         sFnt.Underline = True
  428.         Set Me.Font = sFnt
  429.         .AddItemAndData "Followed Hyperlink", , 8, &H800080, , sFnt.Size, , lHeight, , eixVCentre, sFnt
  430.         .AddItemAndData "Hyperlink", , 8, &HFF0000, , sFnt.Size, , lHeight, , eixVCentre, sFnt
  431.         .DropDownWidth = 220
  432.         .DoAutoComplete = True
  433.         .AutoCompleteListItemsOnly = True
  434.     End With
  435. End Sub
  436. Private Sub cboColorPicker_Click()
  437.     picColorSample.BackColor = cboColorPicker.ItemBackColor(cboColorPicker.ListIndex)
  438. End Sub
  439. Private Sub cboCursors_Change()
  440.    Debug.Print "cboCursors_Change"
  441. End Sub
  442. Private Sub cboCursors_Click()
  443.    Debug.Print "cboCursors_Click"
  444. End Sub
  445. Private Sub cboCursors_GotFocus()
  446.     Debug.Print "cboCursors:LostFocus"
  447. End Sub
  448. Private Sub cboCursors_KeyDown(KeyCode As Integer, Shift As Integer)
  449.     Debug.Print "cboCursors_KeyDown", KeyCode, Shift
  450. End Sub
  451. Private Sub cboCursors_KeyPress(KeyAscii As Integer)
  452.     Debug.Print "cboCursors_KeyPRess", KeyAscii
  453.     Dim sC As String
  454.     sC = Chr$(KeyAscii)
  455.     KeyAscii = Asc(UCase$(sC))
  456. End Sub
  457. Private Sub cboCursors_LostFocus()
  458.     Debug.Print "cboCursors:LostFocus"
  459. End Sub
  460. Private Sub cboCursors_ODGotFocus()
  461.     Debug.Print "cboCursors:ODGotFocus"
  462. End Sub
  463. Private Sub cboCursors_ODLostFocus()
  464.     Debug.Print "cboCursors:ODLostFocus"
  465. End Sub
  466. Private Sub cboSysColor_Click()
  467.     picSample.BackColor = cboSysColor.ItemBackColor(cboSysColor.ListIndex)
  468. End Sub
  469. Private Sub cboSysColor_CloseUp()
  470.     If (chkVisible.Value = 1) Then
  471.         cmdShow.SetFocus
  472.     End If
  473. End Sub
  474. Private Sub chkEnabled_Click()
  475.     cboCursors.Enabled = -1 * chkEnabled.Value
  476.     lstMultiSelect.Enabled = -1 * chkEnabled.Value
  477. End Sub
  478. Private Sub chkShowNames_Click()
  479.     If (chkShowNames.Value = 1) Then
  480.         cboColorPicker.ClientDraw = ecdColourPickerWithNames
  481.     Else
  482.         cboColorPicker.ClientDraw = ecdColourPickerNoNames
  483.     End If
  484. End Sub
  485. Private Sub chkVisible_Click()
  486.     cboSysColor.Visible = (chkVisible - 1) * -1
  487. End Sub
  488. Private Sub cmdLoad_Click()
  489. Dim sFile As String
  490. Dim iCount As Integer
  491. Dim iImgCount As Integer
  492. Dim i As Long
  493. Dim sLC As String
  494.     If cboCursors.Tag = "" Then
  495.         cboCursors.ImageList = cboCursors.InternalImageList.hIml
  496.         iImgCount = cboCursors.InternalImageList.ImageCount
  497.         sFile = Dir(App.Path & "\Images\*.*")
  498.         Do While sFile <> ""
  499.             iCount = iCount + 1
  500.             cboCursors.InternalImageList.AddFromFile App.Path & "\Images\" & sFile, IMAGE_ICON
  501.             iImgCount = iImgCount + 1
  502.             If (iCount = 1) Then
  503.                 cboCursors.AddItemAndData UCase$(Left$(sFile, 1)), , 2
  504.                 iCount = iCount + 1
  505.             Else
  506.                 If (UCase$(Left$(sFile, 1)) <> sLC) Then
  507.                     cboCursors.ItemUnderLine(iCount - 2) = True
  508.                     cboCursors.AddItemAndData UCase$(Left$(sFile, 1)), , 2
  509.                     iCount = iCount + 1
  510.                 End If
  511.             End If
  512.             sLC = UCase$(Left$(sFile, 1))
  513.             cboCursors.AddItemAndData sFile, (iImgCount - 1), 8, , , iCount, , 20
  514.             sFile = Dir
  515.         Loop
  516.         If (iCount > 0) Then
  517.             chkEnabled.Enabled = True
  518.             chkEnabled.Value = 1
  519.             cboCursors.ListIndex = 0
  520.             cmdLoad.Enabled = False
  521.             lstMultiSelect.ImageList = cboCursors.InternalImageList.hIml
  522.             For i = 0 To cboCursors.ListCount - 1
  523.                 lstMultiSelect.AddItemAndData cboCursors.List(i), cboCursors.ItemIcon(i), cboCursors.ItemIndent(i), , , cboCursors.ItemData(i), , cboCursors.itemHeight(i) - 2
  524.             Next i
  525.         Else
  526.             MsgBox "No images found in the path: " & App.Path & "\Images\*.*", vbInformation
  527.         End If
  528.         cboCursors.Tag = "LOADED"
  529.         cboCursors.DoAutoComplete = True
  530.         cboCursors.AutoCompleteItemsAreSorted = True
  531.         cboCursors.AutoCompleteListItemsOnly = True
  532.     End If
  533. End Sub
  534. Private Sub cmdShow_Click()
  535. Dim x As Long, y As Long
  536.     x = cmdShow.Left \ Screen.TwipsPerPixelX
  537.     y = 1 + (cmdShow.Top + cmdShow.Height) \ Screen.TwipsPerPixelY
  538.     cboSysColor.ShowDropDownAtPosition x, y
  539. End Sub
  540. Private Sub Command1_Click()
  541.     lstMultiCol.SetFocus
  542. End Sub
  543. Private Sub Form_Load()
  544.     cboSysColor.DropDownWidth = (cboSysColor.Width * 2) \ Screen.TwipsPerPixelX
  545.     ' Set up the colour picker combo:
  546.     With cboColorPicker
  547.         .AddItemAndData "Black", , , , vbBlack
  548.         .AddItemAndData "Dark Red", , , , &H80&
  549.         .AddItemAndData "Dark Green", , , , &H8000&
  550.         .AddItemAndData "Ochre", , , , &H8080&
  551.         .AddItemAndData "Dark Blue", , , , &H800000
  552.         .AddItemAndData "Purple", , , , &H800080
  553.         .AddItemAndData "Turquoise", , , , &H808000
  554.         .AddItemAndData "Silver", , , , &HC0C0C0
  555.         .AddItemAndData "Gray", , , , &H808080
  556.         .AddItemAndData "Red", , , , vbRed
  557.         .AddItemAndData "Green", , , , vbGreen
  558.         .AddItemAndData "Yellow", , , , vbYellow
  559.         .AddItemAndData "Blue", , , , vbBlue
  560.         .AddItemAndData "Magenta", , , , vbMagenta
  561.         .AddItemAndData "Cyan", , , , vbCyan
  562.         .AddItemAndData "White", , , , vbWhite
  563.         .ListIndex = 0
  564.     End With
  565.     ' Select the first font:
  566.     If (cboFonts.ListCount = 0) Then
  567.         cboFonts.AddItem "No fonts available"
  568.         cboFonts.Enabled = False
  569.     Else
  570.         cboFonts.DoAutoComplete = True
  571.         cboFonts.AutoCompleteItemsAreSorted = True
  572.         cboFonts.AutoCompleteListItemsOnly = True
  573.     End If
  574.     cboFonts.ListIndex = 0
  575.     ' Set up available styles:
  576.     AddStyles
  577.     ' Add some items to the checked list box:
  578.     With lstCheck
  579.         .AddItem "File Menu Items"
  580.         .AddItemAndData "Open", , 16
  581.         .AddItemAndData "Save", , 16
  582.         .AddItemAndData "Exit", , 16
  583.     End With
  584.     ' Set up the multi-column list box:
  585.     Dim lW As Long, i As Long
  586.     With lstMultiCol
  587.         .Columns = 4
  588.         lW = lstMultiCol.Width \ Screen.TwipsPerPixelX * 8
  589.         .ColWidth(1) = lW * 3
  590.         .ColWidth(2) = lW
  591.         .ColWidth(3) = 2 * lW
  592.         .ColWidth(4) = 2 * lW
  593.         .ImageList = .InternalImageList.hIml
  594.         For i = 1 To 10
  595.             .AddItemAndData ("Quite a reasonably long item for column 1, row" & i & vbTab & "Col2" & i & vbTab & Format$(Now, "hh:mm:ss") & vbTab & i), Rnd * 7
  596.         Next i
  597.         .FullRowSelect = True
  598.     End With
  599. End Sub
  600. Private Sub lstCheck_Click()
  601.    Debug.Print "Check_Click"
  602. End Sub
  603. Private Sub lstCheck_KeyPress(KeyAscii As Integer)
  604. Dim lI As Long
  605.     If (KeyAscii = 13) Then
  606.         lI = lstCheck.ListIndex
  607.         If (lI > -1) Then
  608.             'lstCheck.Selected(lI) = Not (lstCheck.Selected(lI))
  609.         End If
  610.     End If
  611. End Sub
  612. Private Sub lstMultiCol_Click()
  613.     Debug.Print "MultiCol_Click" & lstMultiCol.List(lstMultiCol.ListIndex)
  614. End Sub
  615. Private Sub lstSysColours_Change()
  616.    Debug.Print "Colour:Change"
  617. End Sub
  618. Private Sub lstSysColours_Click()
  619.    Debug.Print "Colour:Click"
  620. End Sub
  621. Private Sub lstSysColours_KeyDown(KeyCode As Integer, Shift As Integer)
  622.    Debug.Print "Colour:KeyDown", KeyCode, Shift
  623. End Sub
  624. Private Sub lstSysColours_KeyPress(KeyAscii As Integer)
  625.    Debug.Print "Colour:KeyPress", KeyAscii
  626. End Sub
  627. Private Sub lstSysColours_KeyUp(KeyCode As Integer, Shift As Integer)
  628.    Debug.Print "Colour:KeyUp"
  629. End Sub
  630. Private Sub lstMultiCol_FocusChange(bForward As Boolean)
  631.     'ParseFocusChange lstMultiCol.TabIndex, Not (bForward)
  632.     If (bForward) Then
  633.         Command1.SetFocus
  634.     Else
  635.         lstCheck.SetFocus
  636.     End If
  637. End Sub
  638. Private Sub lstMultiCol_KeyDown(KeyCode As Integer, Shift As Integer)
  639.     Debug.Print "MultiCol:KEYDOWN", KeyCode, Shift
  640. End Sub
  641. Private Sub lstMultiSelect_KeyDown(KeyCode As Integer, Shift As Integer)
  642.     Debug.Print KeyCode, Shift
  643. End Sub
  644. Private Sub picSample_Click()
  645.     Set cboStyles.Font = Me.Font
  646. End Sub
  647. Private Sub tmrFocus_Timer()
  648.     If Not (Me.ActiveControl Is Nothing) Then
  649.         lblFocus.Caption = Me.ActiveControl.Name
  650.     Else
  651.         lblFocus.Caption = "<none>"
  652.     End If
  653. End Sub
  654.