home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Bunch of Control Buttons"
- ClientHeight = 3615
- ClientLeft = 1650
- ClientTop = 2250
- ClientWidth = 7575
- Height = 4020
- Left = 1590
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 3615
- ScaleWidth = 7575
- Top = 1905
- Width = 7695
- Begin PictureBox Picture1
- AutoSize = -1 'True
- BorderStyle = 0 'None
- Height = 2415
- Left = 225
- Picture = BUTTONS.FRX:0000
- ScaleHeight = 5
- ScaleMode = 0 'User
- ScaleWidth = 10
- TabIndex = 1
- Top = 195
- Width = 7215
- End
- Begin CommandButton Command11
- Caption = "Quit"
- Height = 375
- Left = 6105
- TabIndex = 0
- Top = 2955
- Width = 1215
- End
- Begin Label LocationText
- Alignment = 2 'Center
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 210
- TabIndex = 2
- Top = 2985
- Width = 3690
- End
- Sub Command11_Click ()
- End
- End Sub
- Sub Form_Load ()
- Picture1.ScaleWidth = 10
- Picture1.ScaleHeight = 5
- End Sub
- Sub Picture1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim msgString As String
- Dim ix As Integer
- Dim iy As Integer
- ' extract the integer part of the mouse x & y position
- ix = Int(X)
- iy = Int(Y)
- ' if the mouse is over the space between buttons
- ' we wish to do nothing. empirical testing
- ' indicates that if the fractional part of x
- ' is greater than .84 or the fraction part of y
- ' is greater than .74 the mouse is over the space
- ' between buttons.
- '
- If ((X - ix) < .85) And ((Y - iy) < .75) Then
- msgString = "you hit button " + Str$(ix * 5 + iy + 1)
- MsgBox (msgString)
- End If
- End Sub
- Sub Picture1_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim msgString As String
- msgString = "x = " + Str$(X) + " y = " + Str$(Y)
- LocationText.Caption = msgString
- End Sub
-