home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / vbasic / Data / Utils / iface13m.exe / %MAINDIR% / PowerButton.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-04-18  |  25.0 KB  |  777 lines

  1. VERSION 5.00
  2. Object = "{FBC672E3-F04D-11D2-AFA5-E82C878FD532}#5.8#0"; "AS-IFCE1.OCX"
  3. Begin VB.Form frmPowerButtonDemonstration 
  4.    BackColor       =   &H80000016&
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "PowerButton / ToolButton version 4 Demonstration"
  7.    ClientHeight    =   5325
  8.    ClientLeft      =   450
  9.    ClientTop       =   585
  10.    ClientWidth     =   7935
  11.    Icon            =   "PowerButton.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   355
  16.    ScaleMode       =   3  'Pixel
  17.    ScaleWidth      =   529
  18.    ShowInTaskbar   =   0   'False
  19.    StartUpPosition =   2  'CenterScreen
  20.    Begin VB.CommandButton cmdProperties 
  21.       Caption         =   "Font..."
  22.       BeginProperty Font 
  23.          Name            =   "Tahoma"
  24.          Size            =   8.25
  25.          Charset         =   0
  26.          Weight          =   400
  27.          Underline       =   0   'False
  28.          Italic          =   0   'False
  29.          Strikethrough   =   0   'False
  30.       EndProperty
  31.       Height          =   375
  32.       Index           =   1
  33.       Left            =   5400
  34.       TabIndex        =   29
  35.       Top             =   2520
  36.       Width           =   1185
  37.    End
  38.    Begin VB.CommandButton cmdProperties 
  39.       Caption         =   "Colours..."
  40.       BeginProperty Font 
  41.          Name            =   "Tahoma"
  42.          Size            =   8.25
  43.          Charset         =   0
  44.          Weight          =   400
  45.          Underline       =   0   'False
  46.          Italic          =   0   'False
  47.          Strikethrough   =   0   'False
  48.       EndProperty
  49.       Height          =   375
  50.       Index           =   0
  51.       Left            =   4185
  52.       TabIndex        =   28
  53.       Top             =   2520
  54.       Width           =   1185
  55.    End
  56.    Begin AriadIFceCompTest.EventList lstEvents 
  57.       Height          =   1500
  58.       Left            =   3420
  59.       TabIndex        =   24
  60.       Top             =   3105
  61.       Width           =   4380
  62.       _ExtentX        =   7726
  63.       _ExtentY        =   2646
  64.    End
  65.    Begin VB.TextBox txtCaption 
  66.       BeginProperty Font 
  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.       Height          =   600
  76.       Left            =   4185
  77.       MultiLine       =   -1  'True
  78.       ScrollBars      =   2  'Vertical
  79.       TabIndex        =   12
  80.       Text            =   "PowerButton.frx":0E42
  81.       Top             =   315
  82.       Width           =   2220
  83.    End
  84.    Begin VB.ComboBox cboAlignment 
  85.       BeginProperty Font 
  86.          Name            =   "Tahoma"
  87.          Size            =   8.25
  88.          Charset         =   0
  89.          Weight          =   400
  90.          Underline       =   0   'False
  91.          Italic          =   0   'False
  92.          Strikethrough   =   0   'False
  93.       EndProperty
  94.       Height          =   315
  95.       Index           =   0
  96.       ItemData        =   "PowerButton.frx":0E5D
  97.       Left            =   4185
  98.       List            =   "PowerButton.frx":0E7C
  99.       Style           =   2  'Dropdown List
  100.       TabIndex        =   18
  101.       Top             =   1305
  102.       Width           =   2220
  103.    End
  104.    Begin VB.ComboBox cboAlignment 
  105.       BeginProperty Font 
  106.          Name            =   "Tahoma"
  107.          Size            =   8.25
  108.          Charset         =   0
  109.          Weight          =   400
  110.          Underline       =   0   'False
  111.          Italic          =   0   'False
  112.          Strikethrough   =   0   'False
  113.       EndProperty
  114.       Height          =   315
  115.       Index           =   1
  116.       ItemData        =   "PowerButton.frx":0F2B
  117.       Left            =   4185
  118.       List            =   "PowerButton.frx":0F38
  119.       Style           =   2  'Dropdown List
  120.       TabIndex        =   20
  121.       Top             =   1980
  122.       Width           =   2220
  123.    End
  124.    Begin VB.TextBox txtNum 
  125.       BeginProperty Font 
  126.          Name            =   "Tahoma"
  127.          Size            =   8.25
  128.          Charset         =   0
  129.          Weight          =   400
  130.          Underline       =   0   'False
  131.          Italic          =   0   'False
  132.          Strikethrough   =   0   'False
  133.       EndProperty
  134.       Height          =   285
  135.       Index           =   0
  136.       Left            =   6570
  137.       TabIndex        =   14
  138.       Text            =   "0"
  139.       Top             =   315
  140.       Width           =   1230
  141.    End
  142.    Begin VB.TextBox txtNum 
  143.       BeginProperty Font 
  144.          Name            =   "Tahoma"
  145.          Size            =   8.25
  146.          Charset         =   0
  147.          Weight          =   400
  148.          Underline       =   0   'False
  149.          Italic          =   0   'False
  150.          Strikethrough   =   0   'False
  151.       EndProperty
  152.       Height          =   285
  153.       Index           =   1
  154.       Left            =   6570
  155.       TabIndex        =   16
  156.       Text            =   "0"
  157.       Top             =   945
  158.       Width           =   1230
  159.    End
  160.    Begin VB.ComboBox cboBorderStyle 
  161.       BeginProperty Font 
  162.          Name            =   "Tahoma"
  163.          Size            =   8.25
  164.          Charset         =   0
  165.          Weight          =   400
  166.          Underline       =   0   'False
  167.          Italic          =   0   'False
  168.          Strikethrough   =   0   'False
  169.       EndProperty
  170.       Height          =   315
  171.       ItemData        =   "PowerButton.frx":0F69
  172.       Left            =   90
  173.       List            =   "PowerButton.frx":0F7F
  174.       Style           =   2  'Dropdown List
  175.       TabIndex        =   1
  176.       Top             =   315
  177.       Width           =   1860
  178.    End
  179.    Begin VB.ComboBox cboFocus 
  180.       BeginProperty Font 
  181.          Name            =   "Tahoma"
  182.          Size            =   8.25
  183.          Charset         =   0
  184.          Weight          =   400
  185.          Underline       =   0   'False
  186.          Italic          =   0   'False
  187.          Strikethrough   =   0   'False
  188.       EndProperty
  189.       Height          =   315
  190.       ItemData        =   "PowerButton.frx":0FE6
  191.       Left            =   2160
  192.       List            =   "PowerButton.frx":0FF3
  193.       Style           =   2  'Dropdown List
  194.       TabIndex        =   3
  195.       Top             =   315
  196.       Width           =   1860
  197.    End
  198.    Begin VB.CheckBox chkDefault 
  199.       Caption         =   "Defa&ult"
  200.       BeginProperty Font 
  201.          Name            =   "Tahoma"
  202.          Size            =   8.25
  203.          Charset         =   0
  204.          Weight          =   400
  205.          Underline       =   0   'False
  206.          Italic          =   0   'False
  207.          Strikethrough   =   0   'False
  208.       EndProperty
  209.       Height          =   240
  210.       Left            =   90
  211.       TabIndex        =   4
  212.       Top             =   810
  213.       Width           =   1635
  214.    End
  215.    Begin VB.CheckBox chkEnabled 
  216.       Caption         =   "&Enabled"
  217.       BeginProperty Font 
  218.          Name            =   "Tahoma"
  219.          Size            =   8.25
  220.          Charset         =   0
  221.          Weight          =   400
  222.          Underline       =   0   'False
  223.          Italic          =   0   'False
  224.          Strikethrough   =   0   'False
  225.       EndProperty
  226.       Height          =   240
  227.       Left            =   90
  228.       TabIndex        =   5
  229.       Top             =   1125
  230.       Value           =   1  'Checked
  231.       Width           =   1635
  232.    End
  233.    Begin VB.CheckBox chkChecked 
  234.       Caption         =   "C&hecked"
  235.       BeginProperty Font 
  236.          Name            =   "Tahoma"
  237.          Size            =   8.25
  238.          Charset         =   0
  239.          Weight          =   400
  240.          Underline       =   0   'False
  241.          Italic          =   0   'False
  242.          Strikethrough   =   0   'False
  243.       EndProperty
  244.       Height          =   240
  245.       Left            =   90
  246.       TabIndex        =   6
  247.       Top             =   1440
  248.       Width           =   1635
  249.    End
  250.    Begin VB.CheckBox chkForceUp 
  251.       Caption         =   "Force&Up"
  252.       BeginProperty Font 
  253.          Name            =   "Tahoma"
  254.          Size            =   8.25
  255.          Charset         =   0
  256.          Weight          =   400
  257.          Underline       =   0   'False
  258.          Italic          =   0   'False
  259.          Strikethrough   =   0   'False
  260.       EndProperty
  261.       Height          =   240
  262.       Left            =   2160
  263.       TabIndex        =   9
  264.       Top             =   1080
  265.       Width           =   1635
  266.    End
  267.    Begin VB.CheckBox chkForceDown 
  268.       Caption         =   "Force&Down"
  269.       BeginProperty Font 
  270.          Name            =   "Tahoma"
  271.          Size            =   8.25
  272.          Charset         =   0
  273.          Weight          =   400
  274.          Underline       =   0   'False
  275.          Italic          =   0   'False
  276.          Strikethrough   =   0   'False
  277.       EndProperty
  278.       Height          =   240
  279.       Left            =   2160
  280.       TabIndex        =   10
  281.       Top             =   1395
  282.       Width           =   1635
  283.    End
  284.    Begin VB.CheckBox chkHot 
  285.       Caption         =   "&HotTracking"
  286.       BeginProperty Font 
  287.          Name            =   "Tahoma"
  288.          Size            =   8.25
  289.          Charset         =   0
  290.          Weight          =   400
  291.          Underline       =   0   'False
  292.          Italic          =   0   'False
  293.          Strikethrough   =   0   'False
  294.       EndProperty
  295.       Height          =   240
  296.       Left            =   90
  297.       TabIndex        =   7
  298.       Top             =   1755
  299.       Value           =   1  'Checked
  300.       Width           =   1635
  301.    End
  302.    Begin VB.CheckBox chkFlat 
  303.       Caption         =   "Flat Butt&ons"
  304.       BeginProperty Font 
  305.          Name            =   "Tahoma"
  306.          Size            =   8.25
  307.          Charset         =   0
  308.          Weight          =   400
  309.          Underline       =   0   'False
  310.          Italic          =   0   'False
  311.          Strikethrough   =   0   'False
  312.       EndProperty
  313.       Height          =   240
  314.       Left            =   90
  315.       TabIndex        =   8
  316.       Top             =   2115
  317.       Width           =   1635
  318.    End
  319.    Begin VB.ComboBox cboMode 
  320.       BeginProperty Font 
  321.          Name            =   "Tahoma"
  322.          Size            =   8.25
  323.          Charset         =   0
  324.          Weight          =   400
  325.          Underline       =   0   'False
  326.          Italic          =   0   'False
  327.          Strikethrough   =   0   'False
  328.       EndProperty
  329.       Height          =   315
  330.       ItemData        =   "PowerButton.frx":102F
  331.       Left            =   90
  332.       List            =   "PowerButton.frx":1042
  333.       Style           =   2  'Dropdown List
  334.       TabIndex        =   22
  335.       Top             =   2700
  336.       Width           =   2220
  337.    End
  338.    Begin AIFCmp1.asxPowerButton btnDemo 
  339.       Height          =   1500
  340.       Left            =   90
  341.       TabIndex        =   23
  342.       Top             =   3105
  343.       Width           =   1500
  344.       _ExtentX        =   2646
  345.       _ExtentY        =   2646
  346.       Picture         =   "PowerButton.frx":10B2
  347.       PictureDown     =   "PowerButton.frx":13CC
  348.       PictureOver     =   "PowerButton.frx":16E6
  349.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  350.          Name            =   "Tahoma"
  351.          Size            =   8.25
  352.          Charset         =   0
  353.          Weight          =   400
  354.          Underline       =   0   'False
  355.          Italic          =   0   'False
  356.          Strikethrough   =   0   'False
  357.       EndProperty
  358.       PictureAlignment=   1
  359.       HotTracking     =   -1  'True
  360.       HotTrackingColor=   -2147483639
  361.       Mode            =   3
  362.       DropDownWidth   =   24
  363.    End
  364.    Begin AIFCmp1.asxToolButton tbtnDemo 
  365.       Height          =   1500
  366.       Left            =   1710
  367.       Top             =   3105
  368.       Width           =   1500
  369.       _ExtentX        =   2646
  370.       _ExtentY        =   2646
  371.       Picture         =   "PowerButton.frx":1A00
  372.       PictureDown     =   "PowerButton.frx":1D1A
  373.       PictureOver     =   "PowerButton.frx":2034
  374.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  375.          Name            =   "Tahoma"
  376.          Size            =   8.25
  377.          Charset         =   0
  378.          Weight          =   400
  379.          Underline       =   0   'False
  380.          Italic          =   0   'False
  381.          Strikethrough   =   0   'False
  382.       EndProperty
  383.       PictureAlignment=   1
  384.       HotTracking     =   -1  'True
  385.       HotTrackingColor=   -2147483639
  386.       Mode            =   3
  387.       DropDownWidth   =   24
  388.    End
  389.    Begin AIFCmp1.asxLineHeaderEx asxLineHeaderEx1 
  390.       Height          =   30
  391.       Left            =   90
  392.       TabIndex        =   25
  393.       Top             =   4680
  394.       Width           =   7710
  395.       _ExtentX        =   13600
  396.       _ExtentY        =   53
  397.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  398.          Name            =   "Tahoma"
  399.          Size            =   8.25
  400.          Charset         =   0
  401.          Weight          =   400
  402.          Underline       =   0   'False
  403.          Italic          =   0   'False
  404.          Strikethrough   =   0   'False
  405.       EndProperty
  406.       Caption         =   ""
  407.       TextColor       =   0
  408.    End
  409.    Begin AIFCmp1.asxPowerButton btnAction 
  410.       Cancel          =   -1  'True
  411.       Default         =   -1  'True
  412.       Height          =   420
  413.       Index           =   2
  414.       Left            =   6570
  415.       TabIndex        =   27
  416.       Top             =   4770
  417.       Width           =   1230
  418.       _ExtentX        =   2170
  419.       _ExtentY        =   741
  420.       Picture         =   "PowerButton.frx":234E
  421.       Caption         =   "C&lose"
  422.       CaptionOffsetX  =   8
  423.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  424.          Name            =   "Tahoma"
  425.          Size            =   8.25
  426.          Charset         =   0
  427.          Weight          =   400
  428.          Underline       =   0   'False
  429.          Italic          =   0   'False
  430.          Strikethrough   =   0   'False
  431.       EndProperty
  432.       PictureAlignment=   3
  433.    End
  434.    Begin AIFCmp1.asxPowerButton btnAction 
  435.       Height          =   420
  436.       Index           =   1
  437.       Left            =   5310
  438.       TabIndex        =   26
  439.       Top             =   4770
  440.       Width           =   1230
  441.       _ExtentX        =   2170
  442.       _ExtentY        =   741
  443.       Picture         =   "PowerButton.frx":24A8
  444.       Caption         =   "&About..."
  445.       CaptionOffsetX  =   8
  446.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  447.          Name            =   "Tahoma"
  448.          Size            =   8.25
  449.          Charset         =   0
  450.          Weight          =   400
  451.          Underline       =   0   'False
  452.          Italic          =   0   'False
  453.          Strikethrough   =   0   'False
  454.       EndProperty
  455.       PictureAlignment=   3
  456.    End
  457.    Begin VB.Label lbLhdr 
  458.       AutoSize        =   -1  'True
  459.       Caption         =   "&Caption:"
  460.       BeginProperty Font 
  461.          Name            =   "Tahoma"
  462.          Size            =   8.25
  463.          Charset         =   0
  464.          Weight          =   400
  465.          Underline       =   0   'False
  466.          Italic          =   0   'False
  467.          Strikethrough   =   0   'False
  468.       EndProperty
  469.       Height          =   195
  470.       Index           =   2
  471.       Left            =   4185
  472.       TabIndex        =   11
  473.       Top             =   90
  474.       Width           =   615
  475.    End
  476.    Begin VB.Label lbLhdr 
  477.       AutoSize        =   -1  'True
  478.       Caption         =   "Caption&Alignment:"
  479.       BeginProperty Font 
  480.          Name            =   "Tahoma"
  481.          Size            =   8.25
  482.          Charset         =   0
  483.          Weight          =   400
  484.          Underline       =   0   'False
  485.          Italic          =   0   'False
  486.          Strikethrough   =   0   'False
  487.       EndProperty
  488.       Height          =   195
  489.       Index           =   3
  490.       Left            =   4185
  491.       TabIndex        =   17
  492.       Top             =   1080
  493.       Width           =   1320
  494.    End
  495.    Begin VB.Label lbLhdr 
  496.       AutoSize        =   -1  'True
  497.       Caption         =   "Caption&TextAlignment:"
  498.       BeginProperty Font 
  499.          Name            =   "Tahoma"
  500.          Size            =   8.25
  501.          Charset         =   0
  502.          Weight          =   400
  503.          Underline       =   0   'False
  504.          Italic          =   0   'False
  505.          Strikethrough   =   0   'False
  506.       EndProperty
  507.       Height          =   195
  508.       Index           =   4
  509.       Left            =   4185
  510.       TabIndex        =   19
  511.       Top             =   1755
  512.       Width           =   1650
  513.    End
  514.    Begin VB.Label lbLhdr 
  515.       AutoSize        =   -1  'True
  516.       Caption         =   "CaptionOffsetX:"
  517.       BeginProperty Font 
  518.          Name            =   "Tahoma"
  519.          Size            =   8.25
  520.          Charset         =   0
  521.          Weight          =   400
  522.          Underline       =   0   'False
  523.          Italic          =   0   'False
  524.          Strikethrough   =   0   'False
  525.       EndProperty
  526.       Height          =   195
  527.       Index           =   6
  528.       Left            =   6570
  529.       TabIndex        =   13
  530.       Top             =   90
  531.       Width           =   1170
  532.    End
  533.    Begin VB.Label lbLhdr 
  534.       AutoSize        =   -1  'True
  535.       Caption         =   "CaptionOffsetY:"
  536.       BeginProperty Font 
  537.          Name            =   "Tahoma"
  538.          Size            =   8.25
  539.          Charset         =   0
  540.          Weight          =   400
  541.          Underline       =   0   'False
  542.          Italic          =   0   'False
  543.          Strikethrough   =   0   'False
  544.       EndProperty
  545.       Height          =   195
  546.       Index           =   7
  547.       Left            =   6570
  548.       TabIndex        =   15
  549.       Top             =   720
  550.       Width           =   1170
  551.    End
  552.    Begin VB.Label lbLhdr 
  553.       AutoSize        =   -1  'True
  554.       Caption         =   "&BorderStyle:"
  555.       BeginProperty Font 
  556.          Name            =   "Tahoma"
  557.          Size            =   8.25
  558.          Charset         =   0
  559.          Weight          =   400
  560.          Underline       =   0   'False
  561.          Italic          =   0   'False
  562.          Strikethrough   =   0   'False
  563.       EndProperty
  564.       Height          =   195
  565.       Index           =   0
  566.       Left            =   90
  567.       TabIndex        =   0
  568.       Top             =   90
  569.       Width           =   900
  570.    End
  571.    Begin VB.Label lbLhdr 
  572.       AutoSize        =   -1  'True
  573.       Caption         =   "&FocusStyle:"
  574.       BeginProperty Font 
  575.          Name            =   "Tahoma"
  576.          Size            =   8.25
  577.          Charset         =   0
  578.          Weight          =   400
  579.          Underline       =   0   'False
  580.          Italic          =   0   'False
  581.          Strikethrough   =   0   'False
  582.       EndProperty
  583.       Height          =   195
  584.       Index           =   1
  585.       Left            =   2160
  586.       TabIndex        =   2
  587.       Top             =   90
  588.       Width           =   840
  589.    End
  590.    Begin VB.Label lbLhdr 
  591.       AutoSize        =   -1  'True
  592.       Caption         =   "&Mode:"
  593.       BeginProperty Font 
  594.          Name            =   "Tahoma"
  595.          Size            =   8.25
  596.          Charset         =   0
  597.          Weight          =   400
  598.          Underline       =   0   'False
  599.          Italic          =   0   'False
  600.          Strikethrough   =   0   'False
  601.       EndProperty
  602.       Height          =   195
  603.       Index           =   5
  604.       Left            =   90
  605.       TabIndex        =   21
  606.       Top             =   2475
  607.       Width           =   450
  608.    End
  609.    Begin VB.Menu mnuPopup 
  610.       Caption         =   ""
  611.       Visible         =   0   'False
  612.       Begin VB.Menu mnuPopupSub 
  613.          Caption         =   "Sample DropDown Menu Item &1"
  614.          Index           =   0
  615.       End
  616.       Begin VB.Menu mnuPopupSub 
  617.          Caption         =   "Sample DropDown Menu Item &2"
  618.          Index           =   1
  619.       End
  620.       Begin VB.Menu mnuPopupSub 
  621.          Caption         =   "Sample DropDown Menu Item &3"
  622.          Index           =   2
  623.       End
  624.       Begin VB.Menu mnuPopupSub 
  625.          Caption         =   "Sample DropDown Menu Item &4"
  626.          Index           =   3
  627.       End
  628.       Begin VB.Menu mnuPopupSub 
  629.          Caption         =   "Sample DropDown Menu Item &5"
  630.          Index           =   4
  631.       End
  632.    End
  633. Attribute VB_Name = "frmPowerButtonDemonstration"
  634. Attribute VB_GlobalNameSpace = False
  635. Attribute VB_Creatable = False
  636. Attribute VB_PredeclaredId = True
  637. Attribute VB_Exposed = False
  638. Option Explicit
  639. DefInt A-Z
  640. Private Sub btnAction_Click(Index As Integer)
  641.  Select Case Index
  642.   Case 1: btnDemo.About
  643.   Case 2: Unload Me
  644.  End Select
  645. End Sub
  646. Private Sub btnDemo_Checked(ByVal IsChecked As Boolean)
  647.  lstEvents.Add "Checked(" & IsChecked & ")"
  648. End Sub
  649. Private Sub btnDemo_Click()
  650.  lstEvents.Add "Click"
  651. End Sub
  652. Private Sub btnDemo_Clicked(ByVal IsClicked As Boolean)
  653.  lstEvents.Add "Clicked(" & IsClicked & ")"
  654. End Sub
  655. Private Sub btnDemo_DblClick()
  656.  lstEvents.Add "DblClick"
  657. End Sub
  658. Private Sub btnDemo_DropDownClicked()
  659.  lstEvents.Add "DropDownClicked"
  660. End Sub
  661. Private Sub btnDemo_GotFocus()
  662.  lstEvents.Add "GotFocus"
  663. End Sub
  664. Private Sub btnDemo_KeyDown(KeyCode As Integer, Shift As Integer)
  665.  lstEvents.Add "KeyDown(" & KeyCode & "," & Shift & ")"
  666. End Sub
  667. Private Sub btnDemo_KeyPress(KeyAscii As Integer)
  668.  lstEvents.Add "KeyPress(" & KeyAscii & ")"
  669. End Sub
  670. Private Sub btnDemo_KeyUp(KeyCode As Integer, Shift As Integer)
  671.  lstEvents.Add "KeyUp(" & KeyCode & "," & Shift & ")"
  672. End Sub
  673. Private Sub btnDemo_LostFocus()
  674.  lstEvents.Add "LostFocus"
  675. End Sub
  676. Private Sub btnDemo_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  677.  lstEvents.Add "MouseDown(" & Button & "," & Shift & "," & X & "," & Y & ")"
  678. End Sub
  679. Private Sub btnDemo_MouseEnter()
  680.  lstEvents.Add "MouseEnter"
  681. End Sub
  682. Private Sub btnDemo_MouseLeave()
  683.  lstEvents.Add "MouseLeave"
  684. End Sub
  685. Private Sub btnDemo_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  686. ' lstEvents.add "MouseMove(" & Button & "," & Shift & "," & X & "," & Y & ")"
  687. End Sub
  688. Private Sub btnDemo_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  689.  lstEvents.Add "MouseUp(" & Button & "," & Shift & "," & X & "," & Y & ")"
  690. End Sub
  691. Private Sub btnDemo_RightClick()
  692.  lstEvents.Add "RightClick"
  693. End Sub
  694. Private Sub cboAlignment_Click(Index As Integer)
  695.  Select Case Index
  696.   Case 0
  697.    btnDemo.CaptionAlignment = cboAlignment(0).ListIndex
  698.    tbtnDemo.CaptionAlignment = cboAlignment(0).ListIndex
  699.   Case 1
  700.    btnDemo.CaptionTextAlignment = cboAlignment(1).ListIndex
  701.    tbtnDemo.CaptionTextAlignment = cboAlignment(1).ListIndex
  702.  End Select
  703. End Sub
  704. Private Sub cboBorderStyle_Click()
  705.  btnDemo.BorderStyle = cboBorderStyle.ListIndex
  706.  tbtnDemo.BorderStyle = cboBorderStyle.ListIndex
  707. End Sub
  708. Private Sub cboFocus_Click()
  709.  btnDemo.FocusStyle = cboFocus.ListIndex
  710. End Sub
  711. Private Sub cboMode_Click()
  712.  btnDemo.Mode = cboMode.ListIndex
  713.  tbtnDemo.Mode = cboMode.ListIndex
  714. End Sub
  715. Private Sub chkChecked_Click()
  716.  btnDemo.Checked = chkChecked
  717.  tbtnDemo.Checked = chkChecked
  718. End Sub
  719. Private Sub chkDefault_Click()
  720.  btnDemo.Default = chkDefault
  721. End Sub
  722. Private Sub chkEnabled_Click()
  723.  btnDemo.Enabled = chkEnabled
  724.  tbtnDemo.Enabled = chkEnabled
  725. End Sub
  726. Private Sub chkFlat_Click()
  727.  btnDemo.Appearance = IIf(chkFlat, ifcaFlat, ifcaStandard)
  728.  tbtnDemo.Appearance = IIf(chkFlat, ifcaFlat, ifcaStandard)
  729. End Sub
  730. Private Sub chkForceDown_Click()
  731.  btnDemo.ForceDown = chkForceDown
  732.  tbtnDemo.ForceDown = chkForceDown
  733. End Sub
  734. Private Sub chkForceUp_Click()
  735.  btnDemo.ForceUp = chkForceUp
  736.  tbtnDemo.ForceUp = chkForceUp
  737. End Sub
  738. Private Sub chkHot_Click()
  739.  btnDemo.HotTracking = chkHot
  740.  tbtnDemo.HotTracking = chkHot
  741. End Sub
  742. Private Sub cmdProperties_Click(Index As Integer)
  743.  Select Case Index
  744.   Case 0: PropPage.ShowPicker hWnd, "Object Colour", btnDemo, ppickColor
  745.   Case 1: PropPage.ShowPicker hWnd, "Object Font", btnDemo, ppickFont
  746.  End Select
  747. End Sub
  748. Private Sub Form_Load()
  749.  cboBorderStyle.ListIndex = pbbsWindows95
  750.  cboFocus.ListIndex = aifsAroundButton
  751.  txtCaption = "PowerButton" & vbCrLf & "version 4.0"
  752.  txtCaption_Change
  753.  cboAlignment(0).ListIndex = aiaCenterCenter
  754.  cboAlignment(1).ListIndex = ifsaCenter
  755.  cboMode.ListIndex = pbbmNormal
  756.  Set btnDemo.DropDownParent = Me
  757.  Set btnDemo.DropDownMenu = mnuPopup
  758.  Set tbtnDemo.DropDownMenu = mnuPopup
  759.  Set tbtnDemo.DropDownParent = Me
  760. End Sub
  761. Private Sub txtCaption_Change()
  762.  btnDemo.Caption = txtCaption
  763.  tbtnDemo.Caption = txtCaption
  764. End Sub
  765. Private Sub txtNum_Change(Index As Integer)
  766.  Dim V
  767.  V = Val(txtNum(Index))
  768.  Select Case Index
  769.   Case 0
  770.    btnDemo.CaptionOffsetX = V
  771.    tbtnDemo.CaptionOffsetX = V
  772.   Case 1
  773.    btnDemo.CaptionOffsetY = V
  774.    tbtnDemo.CaptionOffsetY = V
  775.  End Select
  776. End Sub
  777.