home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 4.00 Begin VB.Form fMain Caption = "MicroHelp VBTools 5 - Mh3dOption Example" ClientHeight = 4275 ClientLeft = 1725 ClientTop = 2160 ClientWidth = 8640 Height = 4680 Left = 1665 LinkTopic = "Form1" LockControls = -1 'True ScaleHeight = 4275 ScaleWidth = 8640 Top = 1815 Width = 8760 Begin VB.PictureBox picWallPaper Height = 600 Left = 4950 Picture = "mhgopt_a.frx":0000 ScaleHeight = 540 ScaleWidth = 675 TabIndex = 16 Top = 2970 Visible = 0 'False Width = 735 End Begin VB.CommandButton cmdAction Caption = "E&xit" Height = 510 Left = 6885 TabIndex = 6 Top = 3600 Width = 1590 End Begin VB.Frame frmOption Caption = "frmOption(1)" Height = 1800 Index = 1 Left = 4950 TabIndex = 5 Top = 135 Width = 3525 Begin VB.Data datDataBinding Caption = "tblMHGOPT" Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 90 Options = 0 ReadOnly = 0 'False RecordsetType = 1 'Dynaset RecordSource = "" Top = 1365 Width = 3345 End Begin VB.Label lblRecord Alignment = 1 'Right Justify Caption = "lblRecord" BeginProperty Font name = "Courier New" charset = 0 weight = 400 size = 8.25 underline = 0 'False italic = 0 'False strikethrough = 0 'False EndProperty Height = 195 Left = 90 TabIndex = 17 Top = 1140 Width = 3300 End Begin Mh3doptLib.Mh3dOption optDataStyle DataSource = "datDataBinding" Height = 375 Index = 0 Left = 225 TabIndex = 9 Top = 675 Width = 2175 _Version = 65536 _ExtentX = 3836 _ExtentY = 661 _StockProps = 79 Caption = "optDataStyle(0)" TintColor = 16711935 AutoSize = -1 'True BoxSize = 13 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 PictureChecked = "mhgopt_a.frx":0596 PicturePressed = "mhgopt_a.frx":05B2 PictureUnChecked= "mhgopt_a.frx":05CE PictureGrayed = "mhgopt_a.frx":05EA ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Picture = "mhgopt_a.frx":0606 DataText = "" End Begin VB.Label lblDataStyle Caption = "lblDataStyle(0)" DataSource = "datDataBinding" Height = 195 Index = 0 Left = 2430 TabIndex = 7 Top = 765 Width = 915 End Begin VB.Label lblValue Caption = "Value:" Height = 195 Left = 2430 TabIndex = 8 Top = 315 Width = 555 End Begin VB.Line linCheck X1 = 225 X2 = 3285 Y1 = 585 Y2 = 585 End End Begin VB.Frame frmOption Caption = "frmOption(0)" Height = 3975 Index = 0 Left = 135 TabIndex = 0 Top = 135 Width = 4695 Begin VB.OptionButton optWallPaper Caption = "optWallPaper(2)" Height = 285 Index = 2 Left = 3150 TabIndex = 15 Top = 1125 Width = 1275 End Begin VB.OptionButton optWallPaper Caption = "optWallPaper(1)" Height = 285 Index = 1 Left = 1800 TabIndex = 14 Top = 1125 Width = 1275 End Begin VB.OptionButton optWallPaper Caption = "optWallPaper(0)" Height = 285 Index = 0 Left = 450 TabIndex = 13 Top = 1125 Value = -1 'True Width = 1275 End Begin VB.OptionButton optFontStyle Caption = "optFontStyle(4)" Enabled = 0 'False Height = 420 Index = 4 Left = 2520 TabIndex = 4 Top = 3330 Width = 1680 End Begin VB.OptionButton optFontStyle Caption = "optFontStyle(3)" Enabled = 0 'False Height = 240 Index = 3 Left = 2520 TabIndex = 3 Top = 3060 Width = 1725 End Begin VB.OptionButton optFontStyle Caption = "optFontStyle(2)" Enabled = 0 'False Height = 420 Index = 2 Left = 720 TabIndex = 2 Top = 3330 Width = 1680 End Begin VB.OptionButton optFontStyle Caption = "optFontStyle(1)" Enabled = 0 'False Height = 240 Index = 1 Left = 720 TabIndex = 1 Top = 3060 Width = 1455 End Begin Mh3doptLib.Mh3dOption optGraphics Height = 750 Index = 2 Left = 225 TabIndex = 12 Top = 2250 Width = 4260 _Version = 65536 _ExtentX = 7514 _ExtentY = 1323 _StockProps = 79 Caption = "optGraphics(2)" TintColor = 16711935 BoxSize = 17 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 Multiline = -1 'True PictureChecked = "mhgopt_a.frx":0622 PicturePressed = "mhgopt_a.frx":063E PictureUnChecked= "mhgopt_a.frx":065A PictureGrayed = "mhgopt_a.frx":0676 ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Picture = "mhgopt_a.frx":0692 Group = 1 DataText = "" End Begin Mh3doptLib.Mh3dOption optGraphics Height = 750 Index = 1 Left = 225 TabIndex = 11 Top = 1440 Width = 4260 _Version = 65536 _ExtentX = 7514 _ExtentY = 1323 _StockProps = 79 Caption = "optGraphics(1)" TintColor = 16711935 BoxSize = 17 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 Multiline = -1 'True PictureChecked = "mhgopt_a.frx":06AE PicturePressed = "mhgopt_a.frx":06CA PictureUnChecked= "mhgopt_a.frx":06E6 PictureGrayed = "mhgopt_a.frx":0702 ShadowColor = -2147483632 TextColor = -2147483630 WallPaper = 1 Picture = "mhgopt_a.frx":071E Group = 1 DataText = "" End Begin Mh3doptLib.Mh3dOption optGraphics Height = 750 Index = 0 Left = 225 TabIndex = 10 Top = 315 Width = 4260 _Version = 65536 _ExtentX = 7514 _ExtentY = 1323 _StockProps = 79 Caption = "optGraphics(0)" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} name = "MS Sans Serif" charset = 0 weight = 700 size = 8.25 underline = 0 'False italic = 0 'False strikethrough = 0 'False EndProperty TintColor = 16711935 BoxSize = 17 BorderColor = -2147483642 FillColor = -2147483633 FontTransparent = -1 'True LightColor = -2147483628 Multiline = -1 'True PictureChecked = "mhgopt_a.frx":073A PicturePressed = "mhgopt_a.frx":0756 PictureUnChecked= "mhgopt_a.frx":0772 PictureGrayed = "mhgopt_a.frx":078E ShadowColor = -2147483632 TextColor = -2147483630 Picture = "mhgopt_a.frx":07AA Value = -1 Group = 1 DataText = "" End End Attribute VB_Name = "fMain" Attribute VB_Creatable = False Attribute VB_Exposed = False Option Explicit Const iWallPaper = 0 Const iMultiLine = 1 Const iFontStyle = 2 Private Sub optGraphics_Click(Index As Integer) Dim iCount As Integer Dim sCaption As String ' Reset option values. For iCount = 0 To 2 optGraphics(iCount).Value = 0 Next iCount optGraphics(Index).Value = 1 ' Clear out wallpaper image and disable options. If Index <> iWallPaper Then optGraphics(iWallPaper).Picture = LoadPicture("") optGraphics(iWallPaper).FontBold = False optWallPaper(0).Enabled = False optWallPaper(1).Enabled = False optWallPaper(2).Enabled = False End If ' Reset to not multiline. If Index <> iMultiLine Then optGraphics(iMultiLine).MultiLine = False optGraphics(iMultiLine).Caption = "Often, single-line captions just aren't long enough." End If ' Use standard font style. If Index <> iFontStyle Then For iCount = 1 To 4 optFontStyle(iCount).Enabled = False optFontStyle(iCount).Value = False Next iCount optGraphics(iFontStyle).FontStyle = 0 End If Select Case Index ' Enable/disable wallpaper. ' and set the initial value. Case iWallPaper optGraphics(iWallPaper).FontBold = True optWallPaper(0).Enabled = True optWallPaper(1).Enabled = True optWallPaper(2).Enabled = True optGraphics(iWallPaper).Picture = picWallPaper.Picture optGraphics(iWallPaper).WallPaper = 0 optWallPaper(0).Value = True ' Enable/disable .MultiLine property ' and display different caption. Case iMultiLine optGraphics(iMultiLine).MultiLine = True 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." optGraphics(iMultiLine).Caption = sCaption ' Enable/disable .FontStyle option buttons. ' Use .FontStyle = 0 when disabled. Case iFontStyle For iCount = 1 To 4 optFontStyle(iCount).Enabled = True Next iCount optFontStyle(1).Value = True End Select End Sub Private Sub cmdAction_Click() Unload Me End Sub Private Sub Form_Load() Dim sDBFullPath As String ' Get location of VBTOOLS 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 = "tblMHGOPT" ' Set properties for option buttons. lblRecord.DataField = "sRecord" optDataStyle(0).DataField = "fDataStyle0" lblDataStyle(0).DataField = "fDataStyle0" ' Set .Caption for each control. frmOption(0).Caption = "Graphics Options" optGraphics(0).Caption = "Change the appearance of the option button by setting the .Picture property. This allows you to display an image in the background." optGraphics(0).Picture = picWallPaper.Picture optGraphics(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." optGraphics(2).Caption = "Text can be displayed in different &styles: normal, raised, or lowered (with two levels of shading for raised and lowered)." optWallPaper(0).Caption = "0 - StrBlt" optWallPaper(1).Caption = "1 - BitBlt" optWallPaper(2).Caption = "2 - Replicate" 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" optDataStyle(0).Caption = "Boolean" lblDataStyle(0).Caption = "" ' 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 optGraphics(iFontStyle).FontStyle = Index End Sub Private Sub optWallPaper_Click(Index As Integer) ' Change the wallpaper property accordingly. optGraphics(0).WallPaper = Index End Sub