home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BackColor = &H00C0C0C0&
- Caption = "DBTTip v1.3 Demo"
- ClientHeight = 3330
- ClientLeft = 1650
- ClientTop = 1935
- ClientWidth = 5835
- ClipControls = 0 'False
- Height = 3735
- Left = 1590
- LinkTopic = "Form1"
- ScaleHeight = 3330
- ScaleWidth = 5835
- Top = 1590
- Width = 5955
- Begin Frame Frame1
- BackColor = &H00C0C0C0&
- Caption = "Invisible tool tips"
- Height = 1095
- Left = 240
- TabIndex = 7
- Top = 2040
- Width = 5415
- Begin CommandButton Command4
- BackColor = &H00C0C0C0&
- Caption = "Button 3"
- Enabled = 0 'False
- Height = 375
- Index = 2
- Left = 3600
- TabIndex = 10
- Tag = "DBTTip99:Over ""Button 3"". Note that it's disabled!"
- Top = 300
- Width = 1335
- End
- Begin CommandButton Command4
- BackColor = &H00C0C0C0&
- Caption = "Button 2"
- Height = 375
- Index = 1
- Left = 2040
- TabIndex = 9
- Tag = "DBTTip99:Over ""Button 2"""
- Top = 300
- Width = 1335
- End
- Begin CommandButton Command4
- BackColor = &H00C0C0C0&
- Caption = "Button 1"
- Height = 375
- Index = 0
- Left = 360
- TabIndex = 8
- Tag = "DBTTip99:Over ""Button 1"""
- Top = 300
- Width = 1335
- End
- Begin Label lblInv
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = " Not above any of these buttons!"
- Height = 255
- Left = 360
- TabIndex = 11
- Tag = "DBTTip:Here you'll see when the mouse if above any of these buttons"
- Top = 720
- Width = 4575
- End
- End
- Begin DBTTip DBTTip1
- Alignment = 2 'Center
- Aspect = 25
- Delay = 750
- FontBold = 0 'False
- FontItalic = -1 'True
- FontName = "Arial"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 1092
- HotSpotX = 50
- HotSpotY = 0
- Index = 1
- Left = 1320
- MouseOffX = 0
- MouseOffY = 25
- Picture = FORM1.FRX:0000
- PopupMode = 1 'Manual
- Sensivity = 5
- TextBottom = 90
- TextLeft = 10
- TextRight = 90
- TextTop = 10
- Top = 3060
- TractorBeam = 0
- Width = 2232
- End
- Begin CommandButton Command3
- BackColor = &H00C0C0C0&
- Caption = "Help"
- Height = 372
- Left = 1860
- TabIndex = 4
- Tag = "DBTTip:Get some info on DBTTip"
- Top = 1320
- Width = 1212
- End
- Begin PictureBox Picture1
- BackColor = &H00800000&
- ClipControls = 0 'False
- DrawStyle = 3 'Dash-Dot
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H0000FFFF&
- Height = 1212
- Left = 3180
- ScaleHeight = 1185
- ScaleWidth = 2445
- TabIndex = 6
- Top = 600
- Width = 2472
- End
- Begin ComboBox Combo1
- Height = 288
- Left = 3180
- Style = 2 'Dropdown List
- TabIndex = 5
- Tag = "DBTTip1:A drop down list box"
- Top = 180
- Width = 2472
- End
- Begin CheckBox Check1
- BackColor = &H00C0C0C0&
- Caption = "Tractor beam"
- Height = 252
- Left = 240
- TabIndex = 3
- Top = 1380
- Width = 1512
- End
- Begin TextBox Text1
- Height = 312
- Left = 240
- TabIndex = 2
- Top = 900
- Width = 2112
- End
- Begin CommandButton Command2
- BackColor = &H00C0C0C0&
- Caption = "Button 2 "
- Height = 552
- Index = 0
- Left = 1320
- TabIndex = 1
- Tag = "DBTTip:This is command button number 2"
- Top = 180
- Width = 1152
- End
- Begin CommandButton Command1
- BackColor = &H00C0C0C0&
- Caption = "Button 1"
- Height = 552
- Left = 180
- TabIndex = 0
- Tag = "DBTTip:This is command button number 1"
- Top = 180
- Width = 1152
- End
- Begin DBTTip DBTTip1
- Alignment = 2 'Center
- Aspect = 25
- Delay = 750
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 1092
- HotSpotX = 100
- HotSpotY = 100
- Index = 0
- Left = 3900
- MouseOffX = -3
- MouseOffY = -3
- Picture = FORM1.FRX:025A
- PopupMode = 0 'Automatic
- Sensivity = 5
- TextBottom = 70
- TextLeft = 5
- TextRight = 95
- TextTop = 10
- Top = 3060
- TractorBeam = 0
- Width = 2232
- End
- Begin Image Image1
- Height = 480
- Left = 2580
- Picture = FORM1.FRX:061A
- Tag = "DBTTip:This is an image control containing a little beautiful icon!"
- Top = 720
- Width = 480
- End
- Option Explicit
- Dim strPicturePos As String
- Sub Check1_Click ()
- If Check1.Value Then
- DBTTip1(0).TractorBeam = 10
- Else
- DBTTip1(0).TractorBeam = 0
- End If
- End Sub
- Sub Command3_Click ()
- Dim S As String
- S = "DBTTip brings configurable tool tips to VB - without the need to write "
- S = S + "a single code line (as the the command buttons in this "
- S = S + "demo show)! With just a few lines of code, it's possible "
- S = S + "to determine exactly where the tip shall pop up (shown by "
- S = S + "the drop down list box), and to specify different behavior "
- S = S + "within a single control (shown by the picture box). DBTTip operates "
- S = S + "application-wide. It's therefore not necessary to put a DBTTip "
- S = S + "in more that one form. "
- S = S + "For a complete description, please refer to the document "
- S = S + """DBTTIP.WRI.""" + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10)
- S = S + "A new feature of DBTTip v1.1 is the possibility to use different "
- S = S + "shapes for different controls, again, without the need to write "
- S = S + "any code. This feature is also demonstrated by the drop down "
- S = S + "list box." + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10)
- S = S + "A new feature of DBTTip v1.2 is the possibility to take advantage "
- S = S + "of DBTTip's tracking mechanism, without having to show a ""bubble"". "
- S = S + "This feature is demonstrated by the group at the bottom of the form."
- S = S + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10)
- S = S + "DBTTip was written by Dan Bystr
- m." + Chr$(13) + Chr$(10)
- S = S + "e-mail: ""dan.bystrom@visual-design.se"""
- MsgBox S, 0, "About DBTTip"
- End Sub
- Sub Command4_MouseMove (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Not DBTTip1(0).IsVisible Then DBTTip1(0).IsVisible = True
- End Sub
- Sub DBTTip1_PopDown (Index As Integer)
- If DBTTip1(0).UseIndex = 99 Then
- lblInv = ""
- End If
- End Sub
- Sub DBTTip1_Popup (Index As Integer, CtlName As String, CtlIndex As Integer, hWnd As Integer, strText As String, X As Single, Y As Single)
- If hWnd = Combo1.hWnd Then
- DBTTip1(0).ExtraOffX = (Combo1.Width \ 2 - X) \ Screen.TwipsPerPixelX
- DBTTip1(0).ExtraOffY = -Y \ Screen.TwipsPerPixelY
- Exit Sub
- End If
- If hWnd = Text1.hWnd Then
- strText = "A text input field containing """ & Text1 & """"
- Exit Sub
- End If
- If hWnd = Check1.hWnd Then
- If Check1.Value Then
- strText = "Click to turn off tractor beam mode"
- Else
- strText = "Click to make the tip follow the mouse"
- End If
- Exit Sub
- End If
- If DBTTip1(0).UseIndex = 99 Then
- lblInv = " " + strText
- End If
- End Sub
- Sub Picture1_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim P As Single
- strPicturePos = "X:" & Right$(" " & X, 4) & " / Y:" & Right$(" " & Y, 4)
- Picture1.Refresh
- P = (X * 4) / Picture1.Width
- Select Case Int(P)
- Case 0:
- Picture1.Tag = "DBTTip:The left part of a picture control"
- Case 3:
- Picture1.Tag = "DBTTip:The right part of a picture control"
- Case Else
- Picture1.Tag = ""
- DBTTip1(0).IsVisible = False
- End Select
- End Sub
- Sub Picture1_Paint ()
- Picture1.Line (Picture1.Width \ 4, 0)-Step(0, Picture1.Width)
- Picture1.Line (3 * Picture1.Width \ 4, 0)-Step(0, Picture1.Width)
- Picture1.CurrentX = (Picture1.Width - Picture1.TextWidth(strPicturePos)) \ 2
- Picture1.CurrentY = (Picture1.Height - Picture1.TextHeight(strPicturePos)) \ 2
- Picture1.Print strPicturePos
- End Sub
- Sub Text1_Change ()
- DBTTip1(0).IsVisible = False
- End Sub
-