home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form fProperties
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "MicroHelp VBTools 5 - MhTip Example"
- ClientHeight = 3936
- ClientLeft = 2640
- ClientTop = 4140
- ClientWidth = 5832
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 7.8
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 4404
- Left = 2580
- LinkTopic = "Form1"
- ScaleHeight = 3936
- ScaleWidth = 5832
- Top = 3732
- Width = 5952
- Begin VB.TextBox txtProperties
- Appearance = 0 'Flat
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 7.8
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 3075
- Left = 0
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 0
- Top = 0
- Width = 4695
- End
- Attribute VB_Name = "fProperties"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Dim s_NEWLINE As String
- Private Sub Form_Load()
- Dim sCode As String
- s_NEWLINE = Chr$(13) & Chr$(10)
- s_TAB = Chr$(9)
- ' Display code to include in your app.
- sCode = sCode & s_TAB & "' Copy this code to your project's Form_Load"
- sCode = sCode & s_NEWLINE & s_TAB & "' to recreate the current MhTip appearance."
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("AutoSize", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("AutoSizeToText", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("Alignment", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("VAlignment", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("BorderStyle", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("FontName", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("FontSize", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("FontBold", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("TipChildren", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("MultiLine", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("TipStyle", fMain!MhTip1)
- sCode = sCode & s_NEWLINE & s_TAB & PropValue("FillColor", fMain!MhTip1)
- ' Put Code in text box.
- txtProperties.Text = sCode
- ' center form to screen
- Move Abs(Screen.Width - Width) \ 2, Abs(Screen.Height - Height) \ 2
- End Sub
- Private Sub Form_Resize()
- ' Resize text box to form.
- txtProperties.Width = fProperties.ScaleWidth
- txtProperties.Height = fProperties.ScaleHeight
- End Sub
- Private Function PropValue(sProp As String, MhTip1 As MhTip) As String
- Dim sCode As String
- ' Return code that will set the specified property.
- sCode = "MhTip1." & sProp & " = "
- Select Case sProp
- Case "AutoSize"
- sCode = sCode & Format$(MhTip1.AutoSize)
- Case "AutoSizeToText"
- sCode = sCode & Format$(MhTip1.AutosizeToText)
- Case "Alignment"
- sCode = sCode & Format$(MhTip1.Alignment)
- Case "VAlignment"
- sCode = sCode & Format$(MhTip1.VAlignment)
- Case "BorderStyle"
- sCode = sCode & Format$(MhTip1.BorderStyle)
- Case "FontName"
- sCode = sCode & """" & MhTip1.FontName & """"
- Case "FontSize"
- sCode = sCode & Format$(MhTip1.FontSize)
- Case "FontBold"
- sCode = sCode & Format$(MhTip1.FontBold)
- Case "TipChildren"
- sCode = sCode & Format$(MhTip1.TipChildren)
- Case "MultiLine"
- sCode = sCode & Format$(MhTip1.MultiLine)
- Case "TipStyle"
- sCode = sCode & Format$(MhTip1.TipStyle)
- Case "FillColor"
- sCode = sCode & "&H" & Format$(Hex(MhTip1.FillColor)) & "H"
- End Select
- PropValue = sCode
- End Function
-