home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 4.00 Begin VB.Form fMain Caption = "MicroHelp VBTools 5 - Mh3dCheck Example (OCX32)" ClientHeight = 4275 ClientLeft = 1500 ClientTop = 2370 ClientWidth = 8640 Height = 4680 Left = 1440 LinkTopic = "Form1" LockControls = -1 'True ScaleHeight = 4275 ScaleWidth = 8640 Top = 2025 Width = 8760 Begin VB.CommandButton cmdAction Caption = "E&xit" Height = 510 Left = 6885 TabIndex = 14 Top = 3600 Width = 1590 End Begin VB.Frame frmCheck Caption = "frmCheck(1)" Height = 2625 Index = 1 Left = 4950 TabIndex = 11 Top = 135 Width = 3525 Begin VB.Data datDataBinding Caption = "tblMHGCHK" Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 90 Options = 0 ReadOnly = 0 'False RecordsetType = 1 'Dynaset RecordSource = "" Top = 2250 Width = 3345 End Begin MhgchkLib.Mh3dCheck chkDataStyle DataSource = "datDataBinding" Height = 375 Index = 2 Left = 225 TabIndex = 15 Top = 1200 Width = 2250 _Version = 65536 _ExtentX = 3958 _ExtentY = 656 _StockProps = 79 Caption = "chkDataStyle(2)" BackColor = -2147483643 TintColor = 16711935 AutoSize = -1 'True BoxSize = 13 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 PictureChecked = "Mhgchk_a.frx":0000 PicturePressed = "Mhgchk_a.frx":001C PictureUnchecked= "Mhgchk_a.frx":0038 PictureGrayed = "Mhgchk_a.frx":0054 ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Picture = "Mhgchk_a.frx":0070 DataChecked = "" DataUnchecked = "" DataGrayed = "" End Begin MhgchkLib.Mh3dCheck chkDataStyle DataSource = "datDataBinding" Height = 372 Index = 0 Left = 228 TabIndex = 16 Top = 672 Width = 2244 _Version = 65536 _ExtentX = 3958 _ExtentY = 656 _StockProps = 79 Caption = "chkDataStyle(0)" BackColor = -2147483643 TintColor = 16711935 AutoSize = -1 'True BoxSize = 13 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 PictureChecked = "Mhgchk_a.frx":008C PicturePressed = "Mhgchk_a.frx":00A8 PictureUnchecked= "Mhgchk_a.frx":00C4 PictureGrayed = "Mhgchk_a.frx":00E0 ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Picture = "Mhgchk_a.frx":00FC DataChecked = "" DataUnchecked = "" DataGrayed = "" End Begin VB.Label lblDataStyle Caption = "lblDataStyle(2)" DataSource = "datDataBinding" Height = 195 Index = 2 Left = 2520 TabIndex = 17 Top = 1200 Width = 840 End Begin VB.Label lblDataStyle Caption = "lblDataStyle(0)" DataSource = "datDataBinding" Height = 192 Index = 0 Left = 2556 TabIndex = 18 Top = 756 Width = 840 End Begin VB.Label lblValue Caption = "Value:" Height = 195 Left = 2430 TabIndex = 19 Top = 315 Width = 555 End Begin VB.Line linCheck X1 = 225 X2 = 3285 Y1 = 585 Y2 = 585 End End Begin VB.Frame frmCheck Caption = "frmCheck(0)" Height = 3975 Index = 0 Left = 135 TabIndex = 0 Top = 135 Width = 4695 Begin VB.OptionButton optFontStyle Caption = "optFontStyle(4)" Enabled = 0 'False Height = 420 Index = 4 Left = 2520 TabIndex = 10 Top = 3330 Width = 1680 End Begin VB.OptionButton optFontStyle Caption = "optFontStyle(3)" Enabled = 0 'False Height = 240 Index = 3 Left = 2520 TabIndex = 9 Top = 3060 Width = 1725 End Begin VB.OptionButton optFontStyle Caption = "optFontStyle(2)" Enabled = 0 'False Height = 420 Index = 2 Left = 720 TabIndex = 8 Top = 3330 Width = 1680 End Begin VB.OptionButton optFontStyle Caption = "optFontStyle(1)" Enabled = 0 'False Height = 240 Index = 1 Left = 720 TabIndex = 7 Top = 3060 Width = 1455 End Begin MhgchkLib.Mh3dCheck chkGraphics Height = 735 Index = 2 Left = 270 TabIndex = 6 Top = 2295 Width = 4245 _Version = 65536 _ExtentX = 7488 _ExtentY = 1296 _StockProps = 79 Caption = "chkGraphics(2)" BackColor = -2147483643 TintColor = 16711935 AutoSize = -1 'True BoxSize = 20 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 Multiline = -1 'True PictureChecked = "Mhgchk_a.frx":0118 PicturePressed = "Mhgchk_a.frx":029A PictureUnchecked= "Mhgchk_a.frx":041C PictureGrayed = "Mhgchk_a.frx":059E ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Picture = "Mhgchk_a.frx":05BA DataChecked = "" DataUnchecked = "" DataGrayed = "" End Begin MhgchkLib.Mh3dCheck chkGraphics Height = 735 Index = 0 Left = 270 TabIndex = 1 Top = 360 Width = 4245 _Version = 65536 _ExtentX = 7488 _ExtentY = 1296 _StockProps = 79 Caption = "chkGraphics(0)" BackColor = -2147483643 TintColor = 16711935 AutoSize = -1 'True BoxSize = 20 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 Multiline = -1 'True PictureChecked = "Mhgchk_a.frx":05D6 PicturePressed = "Mhgchk_a.frx":0758 PictureUnchecked= "Mhgchk_a.frx":08DA PictureGrayed = "Mhgchk_a.frx":0A5C ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Picture = "Mhgchk_a.frx":0A78 DataChecked = "" DataUnchecked = "" DataGrayed = "" End Begin MhgchkLib.Mh3dCheck chkStooge Height = 390 Index = 0 Left = 720 TabIndex = 2 Top = 1125 Width = 885 _Version = 65536 _ExtentX = 1561 _ExtentY = 688 _StockProps = 79 Caption = "chkStooge(0)" BackColor = -2147483643 Enabled = 0 'False TintColor = 16711935 BoxSize = 17 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 PictureChecked = "Mhgchk_a.frx":0A94 PicturePressed = "Mhgchk_a.frx":103A PictureUnchecked= "Mhgchk_a.frx":15E0 PictureGrayed = "Mhgchk_a.frx":1B86 ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Value = 2 Picture = "Mhgchk_a.frx":212C DataChecked = "" DataUnchecked = "" DataGrayed = "" End Begin MhgchkLib.Mh3dCheck chkStooge Height = 390 Index = 1 Left = 1665 TabIndex = 3 Top = 1125 Width = 885 _Version = 65536 _ExtentX = 1561 _ExtentY = 688 _StockProps = 79 Caption = "chkStooge(1)" BackColor = -2147483643 Enabled = 0 'False TintColor = 16711935 BoxSize = 17 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 PictureChecked = "Mhgchk_a.frx":2148 PicturePressed = "Mhgchk_a.frx":26EE PictureUnchecked= "Mhgchk_a.frx":2C94 PictureGrayed = "Mhgchk_a.frx":323A ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Value = 2 Picture = "Mhgchk_a.frx":37E0 DataChecked = "" DataUnchecked = "" DataGrayed = "" End Begin MhgchkLib.Mh3dCheck chkStooge Height = 390 Index = 2 Left = 2610 TabIndex = 4 Top = 1125 Width = 885 _Version = 65536 _ExtentX = 1561 _ExtentY = 688 _StockProps = 79 Caption = "chkStooge(2)" BackColor = -2147483643 Enabled = 0 'False TintColor = 16711935 BoxSize = 17 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 PictureChecked = "Mhgchk_a.frx":37FC PicturePressed = "Mhgchk_a.frx":3DA2 PictureUnchecked= "Mhgchk_a.frx":4348 PictureGrayed = "Mhgchk_a.frx":48EE ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Value = 2 Picture = "Mhgchk_a.frx":4E94 DataChecked = "" DataUnchecked = "" DataGrayed = "" End Begin MhgchkLib.Mh3dCheck chkGraphics Height = 735 Index = 1 Left = 270 TabIndex = 5 Top = 1575 Width = 4245 _Version = 65536 _ExtentX = 7488 _ExtentY = 1296 _StockProps = 79 Caption = "chkGraphics(1)" BackColor = -2147483643 TintColor = 16711935 AutoSize = -1 'True BoxSize = 20 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 Multiline = -1 'True PictureChecked = "Mhgchk_a.frx":4EB0 PicturePressed = "Mhgchk_a.frx":5032 PictureUnchecked= "Mhgchk_a.frx":51B4 PictureGrayed = "Mhgchk_a.frx":5336 ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Picture = "Mhgchk_a.frx":5352 DataChecked = "" DataUnchecked = "" DataGrayed = "" End End Begin MhgchkLib.Mh3dCheck chkMark Height = 510 Left = 4950 TabIndex = 13 Top = 2925 Width = 1455 _Version = 65536 _ExtentX = 2566 _ExtentY = 900 _StockProps = 79 Caption = "chkMark" BackColor = -2147483643 TintColor = 16711935 AutoSize = -1 'True BoxSize = 13 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 Multiline = -1 'True PictureChecked = "Mhgchk_a.frx":536E PicturePressed = "Mhgchk_a.frx":538A PictureUnchecked= "Mhgchk_a.frx":53A6 PictureGrayed = "Mhgchk_a.frx":53C2 ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Picture = "Mhgchk_a.frx":53DE DataChecked = "" DataUnchecked = "" DataGrayed = "" End Begin MhgchkLib.Mh3dCheck chkID Height = 735 Left = 5220 TabIndex = 12 Top = 3465 Width = 870 _Version = 65536 _ExtentX = 1535 _ExtentY = 1296 _StockProps = 79 BackColor = -2147483643 Enabled = 0 'False TintColor = 16711935 AutoSize = -1 'True BoxSize = 50 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 Multiline = -1 'True PictureChecked = "Mhgchk_a.frx":53FA PicturePressed = "Mhgchk_a.frx":58EC PictureUnchecked= "Mhgchk_a.frx":5DDE PictureGrayed = "Mhgchk_a.frx":62D0 ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Value = 2 Picture = "Mhgchk_a.frx":67C2 DataChecked = "" DataUnchecked = "" DataGrayed = "" End Attribute VB_Name = "fMain" Attribute VB_Creatable = False Attribute VB_Exposed = False Option Explicit Const iStooge = 0 Const iMultiLine = 1 Const iFontStyle = 2 Private Sub chkGraphics_Click(Index As Integer) Dim iCount As Integer Dim sCaption As String Select Case Index ' Enable/disable .MultiLine property ' and display different caption. Case iMultiLine chkGraphics(iMultiLine).MultiLine = Not chkGraphics(iMultiLine).MultiLine If chkGraphics(iMultiLine).MultiLine Then sCaption = "When offering important selections, " sCaption = sCaption & "you may want to include more text " sCaption = sCaption & "than can fit on a single line. " sCaption = sCaption & "Use the .MultiLine property to accomplish this." Else sCaption = "Often, single-line captions just aren't long enough." End If chkGraphics(iMultiLine).Caption = sCaption ' Enable/disable 3 Stooges check boxes ' and set the initial value. Case iStooge For iCount = 0 To 2 chkStooge(iCount).Enabled = (chkGraphics(iStooge).Value = 1) chkStooge(iCount).Value = IIf(chkStooge(iCount).Enabled, 0, 2) Next iCount ' Enable/disable .FontStyle option buttons. ' Use .FontStyle = 0 when disabled. Case iFontStyle For iCount = 1 To 4 optFontStyle(iCount).Enabled = (chkGraphics(iFontStyle).Value = 1) optFontStyle(iCount).Value = False Next iCount If chkGraphics(iFontStyle).Value = 1 Then optFontStyle(1).Value = True Else chkGraphics(iFontStyle).FontStyle = 0 End If End Select End Sub Private Sub chkMark_Click() ' Enable/disable ID check boxes ' and set the initial value. chkID.Enabled = (chkMark.Value = 1) chkID.Value = IIf(chkID.Enabled, 0, 2) End Sub Private Sub cmdAction_Click() Unload Me End Sub Private Sub Form_Load() Dim sDBFullPath As String ' Get location of TOOLS database. sDBFullPath = App.Path If Right(sDBFullPath, 1) <> "\" Then sDBFullPath = sDBFullPath & "\" sDBFullPath = sDBFullPath & "..\tools.mdb" ' if the file is not in the default location then have the user supply the path If InStr(LCase$(Dir$(sDBFullPath)), "tools.mdb") = 0 Then sDBFullPath = InputBox("Enter the path for the file TOOLS.MDB:", "MicroHelp OLETools 5", sDBFullPath) ' Set properties for data control. datDataBinding.DatabaseName = sDBFullPath datDataBinding.RecordSource = "tblMHGCHK" ' Set properties for check boxes. chkDataStyle(0).DataField = "fDataStyle0" chkDataStyle(0).DataStyle = 1 ' text chkDataStyle(2).DataField = "bytDataStyle2" lblDataStyle(0).DataField = "fDataStyle0" lblDataStyle(2).DataField = "bytDataStyle2" ' Set .Caption for each control. frmCheck(0).Caption = "Graphics Options" frmCheck(1).Caption = "Data Binding Options" chkGraphics(0).Caption = "Change the appearance of the check box by setting the various .&Picture* properties. You can change the Checked, Unchecked, Pressed, and Grayed images:" chkGraphics(1).Caption = "When offering important selections, you may want to include more text than can fit on a single line. Use the .MultiLine property to accomplish this." chkGraphics(2).Caption = "Text can be displayed in different &styles: normal, raised, or lowered (with two levels of shading for raised and lowered)." optFontStyle(1).Caption = "1 - Raised" optFontStyle(2).Caption = "2 - Raised with More Shading" optFontStyle(3).Caption = "3 - Lowered" optFontStyle(4).Caption = "4 - Lowered with More Shading" chkStooge(0).Caption = "&Moe" chkStooge(1).Caption = "&Larry" chkStooge(2).Caption = "&Curly" chkDataStyle(0).Caption = "(Boolean)" chkDataStyle(2).Caption = "(Numeric)" chkMark.Caption = "Leave your mark here:" ' center form to screen Move Abs(Screen.Width - Width) \ 2, Abs(Screen.Height - Height) \ 2 End Sub Private Sub optFontStyle_Click(Index As Integer) ' Change .FontStyle property of the checkbox. If optFontStyle(Index).Value Then chkGraphics(iFontStyle).FontStyle = Index End Sub