home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 2730
- ClientLeft = 6705
- ClientTop = 4920
- ClientWidth = 3885
- Height = 3135
- Left = 6645
- LinkTopic = "Form1"
- ScaleHeight = 2730
- ScaleWidth = 3885
- Top = 4575
- Width = 4005
- Begin VB.Timer Timer1
- Left = 120
- Top = 120
- End
- Begin VB.PictureBox Picture1
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 9.75
- underline = 0 'False
- italic = -1 'True
- strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 360
- ScaleHeight = 435
- ScaleWidth = 1155
- TabIndex = 2
- Top = 120
- Width = 1215
- End
- Begin VB.CommandButton Command2
- Caption = "Command2"
- Height = 495
- Left = 1560
- TabIndex = 1
- Top = 1680
- Width = 1215
- End
- Begin VB.CommandButton Command1
- Caption = "Command1"
- Height = 495
- Left = 240
- TabIndex = 0
- Top = 1680
- Width = 1215
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Declare Function SetCapture Lib "user32" _
- (ByVal hwnd As Long) As Long
- Private Declare Function ReleaseCapture Lib "user32" () As Long
- Private Sub Command1_Click()
- Timer1.Enabled = False
- ReleaseCapture
- Picture1.Visible = False
- End Sub
- Private Sub Command1_MouseMove(Button As Integer, _
- Shift As Integer, x As Single, y As Single)
- If x > Command1.Width Or x < 0 Or y > Command1.Height Or y < 0 Then
- Timer1.Enabled = False
- ReleaseCapture
- Picture1.Visible = False
- Else
- If Not Picture1.Visible Then
- Timer1.Enabled = True
- SetCapture Command1.hwnd
- End If
- End If
- End Sub
- Private Sub Form_Load()
- Picture1.BackColor = Form1.BackColor
- Picture1.Visible = False
- Timer1.Interval = 250
- Timer1.Enabled = False
- End Sub
- Private Sub Timer1_Timer()
- Dim font As New ROTATEFONT
- Dim hlpText As String
- hlpText = "Help me!"
- Picture1.Width = Picture1.TextWidth(hlpText) + 100
- Picture1.Height = Picture1.TextHeight(hlpText) + 100
- Picture1.TOP = Command1.TOP + Command1.Height + 20
- Picture1.Left = Command1.Left + (Command1.Width / 2)
- Picture1.Visible = True
- Picture1.Cls
- font.setPointSize 14
- font.dispText Picture1.hDC, hlpText, 2, 2
- Timer1.Enabled = False
- End Sub
-