home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
code
/
design
/
c_ballon
/
tooltips.frm
< prev
next >
Wrap
Text File
|
1995-02-27
|
5KB
|
155 lines
VERSION 2.00
Begin Form Form1
BackColor = &H00C0C0C0&
BorderStyle = 1 'Nicht Σnderbar, einfach
Caption = "Demo fⁿr Tooltips"
ClientHeight = 960
ClientLeft = 1635
ClientTop = 2415
ClientWidth = 2865
Height = 1365
Icon = TOOLTIPS.FRX:0000
Left = 1575
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 960
ScaleWidth = 2865
Top = 2070
Width = 2985
Begin Timer Zeit1
Enabled = 0 'False
Interval = 500
Left = 60
Top = 480
End
Begin Label lab_tooltip
AutoSize = -1 'True
BackColor = &H0080FFFF&
BorderStyle = 1 'nicht Σnderbar, einfach
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 900
TabIndex = 1
Top = 405
Visible = 0 'False
Width = 75
End
Begin Label Bezeichnung1
BackColor = &H00C0C0C0&
Caption = "Lassen Sie den Mauszeiger auf einem Symbol ruhen !"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 435
Left = 120
TabIndex = 0
Top = 480
Width = 2415
End
Begin Image img_tools
Height = 330
Index = 5
Left = 2220
Picture = TOOLTIPS.FRX:0302
Top = 60
Width = 360
End
Begin Image img_tools
Height = 330
Index = 4
Left = 1800
Picture = TOOLTIPS.FRX:094C
Top = 60
Width = 360
End
Begin Image img_tools
Height = 330
Index = 3
Left = 1380
Picture = TOOLTIPS.FRX:0F96
Top = 60
Width = 360
End
Begin Image img_tools
Height = 330
Index = 2
Left = 960
Picture = TOOLTIPS.FRX:15E0
Top = 60
Width = 360
End
Begin Image img_tools
Height = 330
Index = 1
Left = 540
Picture = TOOLTIPS.FRX:1C2A
Top = 60
Width = 360
End
Begin Image img_tools
Height = 330
Index = 0
Left = 120
Picture = TOOLTIPS.FRX:2274
Top = 60
Width = 360
End
Begin Line Linie1
X1 = 2880
X2 = 0
Y1 = 420
Y2 = 420
End
End
Option Explicit
Declare Sub getcursorpos Lib "user" (lppoint As PointAPI)
Dim mx As Integer, my As Integer
Sub img_tools_Click (index As Integer)
If index = 5 Then End
End Sub
Sub img_tools_MouseMove (index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Dim mousepos As PointAPI
Static last As Integer
getcursorpos mousepos
mx = mousepos.x
my = mousepos.y
If last = index And lab_tooltip.Visible = True Then Exit Sub
Select Case index
Case 0: lab_tooltip = "╓ffnen"
Case 1: lab_tooltip = "Speichern"
Case 2: lab_tooltip = "Ausschneiden"
Case 3: lab_tooltip = "Kopieren"
Case 4: lab_tooltip = "Einfⁿgen"
Case 5: lab_tooltip = "Beenden"
End Select
lab_tooltip.Left = img_tools(index).Left + img_tools(index).Width / 2 - lab_tooltip.Width / 2
zeit1.Enabled = True
last = index
End Sub
Sub Zeit1_Timer ()
Dim mousepos As PointAPI, nx As Integer, ny As Integer
If lab_tooltip.Visible = False Then
lab_tooltip.Visible = True
Exit Sub
End If
getcursorpos mousepos
nx = mousepos.x
ny = mousepos.y
If nx <> mx Or ny <> my Then
lab_tooltip.Visible = False
zeit1.Enabled = False
End If
End Sub