home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / design / c_ballon / tooltips.frm < prev    next >
Text File  |  1995-02-27  |  5KB  |  155 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Nicht Σnderbar, einfach
  5.    Caption         =   "Demo fⁿr Tooltips"
  6.    ClientHeight    =   960
  7.    ClientLeft      =   1635
  8.    ClientTop       =   2415
  9.    ClientWidth     =   2865
  10.    Height          =   1365
  11.    Icon            =   TOOLTIPS.FRX:0000
  12.    Left            =   1575
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   960
  16.    ScaleWidth      =   2865
  17.    Top             =   2070
  18.    Width           =   2985
  19.    Begin Timer Zeit1 
  20.       Enabled         =   0   'False
  21.       Interval        =   500
  22.       Left            =   60
  23.       Top             =   480
  24.    End
  25.    Begin Label lab_tooltip 
  26.       AutoSize        =   -1  'True
  27.       BackColor       =   &H0080FFFF&
  28.       BorderStyle     =   1  'nicht Σnderbar, einfach
  29.       FontBold        =   0   'False
  30.       FontItalic      =   0   'False
  31.       FontName        =   "MS Sans Serif"
  32.       FontSize        =   8.25
  33.       FontStrikethru  =   0   'False
  34.       FontUnderline   =   0   'False
  35.       Height          =   225
  36.       Left            =   900
  37.       TabIndex        =   1
  38.       Top             =   405
  39.       Visible         =   0   'False
  40.       Width           =   75
  41.    End
  42.    Begin Label Bezeichnung1 
  43.       BackColor       =   &H00C0C0C0&
  44.       Caption         =   "Lassen Sie den Mauszeiger auf einem Symbol ruhen !"
  45.       FontBold        =   0   'False
  46.       FontItalic      =   0   'False
  47.       FontName        =   "MS Sans Serif"
  48.       FontSize        =   8.25
  49.       FontStrikethru  =   0   'False
  50.       FontUnderline   =   0   'False
  51.       Height          =   435
  52.       Left            =   120
  53.       TabIndex        =   0
  54.       Top             =   480
  55.       Width           =   2415
  56.    End
  57.    Begin Image img_tools 
  58.       Height          =   330
  59.       Index           =   5
  60.       Left            =   2220
  61.       Picture         =   TOOLTIPS.FRX:0302
  62.       Top             =   60
  63.       Width           =   360
  64.    End
  65.    Begin Image img_tools 
  66.       Height          =   330
  67.       Index           =   4
  68.       Left            =   1800
  69.       Picture         =   TOOLTIPS.FRX:094C
  70.       Top             =   60
  71.       Width           =   360
  72.    End
  73.    Begin Image img_tools 
  74.       Height          =   330
  75.       Index           =   3
  76.       Left            =   1380
  77.       Picture         =   TOOLTIPS.FRX:0F96
  78.       Top             =   60
  79.       Width           =   360
  80.    End
  81.    Begin Image img_tools 
  82.       Height          =   330
  83.       Index           =   2
  84.       Left            =   960
  85.       Picture         =   TOOLTIPS.FRX:15E0
  86.       Top             =   60
  87.       Width           =   360
  88.    End
  89.    Begin Image img_tools 
  90.       Height          =   330
  91.       Index           =   1
  92.       Left            =   540
  93.       Picture         =   TOOLTIPS.FRX:1C2A
  94.       Top             =   60
  95.       Width           =   360
  96.    End
  97.    Begin Image img_tools 
  98.       Height          =   330
  99.       Index           =   0
  100.       Left            =   120
  101.       Picture         =   TOOLTIPS.FRX:2274
  102.       Top             =   60
  103.       Width           =   360
  104.    End
  105.    Begin Line Linie1 
  106.       X1              =   2880
  107.       X2              =   0
  108.       Y1              =   420
  109.       Y2              =   420
  110.    End
  111. End
  112. Option Explicit
  113. Declare Sub getcursorpos Lib "user" (lppoint As PointAPI)
  114. Dim mx As Integer, my As Integer
  115.  
  116. Sub img_tools_Click (index As Integer)
  117. If index = 5 Then End
  118. End Sub
  119.  
  120. Sub img_tools_MouseMove (index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
  121. Dim mousepos As PointAPI
  122. Static last As Integer
  123. getcursorpos mousepos
  124. mx = mousepos.x
  125. my = mousepos.y
  126. If last = index And lab_tooltip.Visible = True Then Exit Sub
  127. Select Case index
  128.     Case 0: lab_tooltip = "╓ffnen"
  129.     Case 1: lab_tooltip = "Speichern"
  130.     Case 2: lab_tooltip = "Ausschneiden"
  131.     Case 3: lab_tooltip = "Kopieren"
  132.     Case 4: lab_tooltip = "Einfⁿgen"
  133.     Case 5: lab_tooltip = "Beenden"
  134. End Select
  135. lab_tooltip.Left = img_tools(index).Left + img_tools(index).Width / 2 - lab_tooltip.Width / 2
  136. zeit1.Enabled = True
  137. last = index
  138. End Sub
  139.  
  140. Sub Zeit1_Timer ()
  141. Dim mousepos As PointAPI, nx As Integer, ny As Integer
  142. If lab_tooltip.Visible = False Then
  143.     lab_tooltip.Visible = True
  144.     Exit Sub
  145. End If
  146. getcursorpos mousepos
  147. nx = mousepos.x
  148. ny = mousepos.y
  149. If nx <> mx Or ny <> my Then
  150.     lab_tooltip.Visible = False
  151.     zeit1.Enabled = False
  152. End If
  153. End Sub
  154.  
  155.