Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Occurs when the user presses and releases an ANSI key.
ANSI - American National Standards Institute (ANSI) 8-bit character set used to represent up to 256 characters (0–255) [blue]using your keyboard[/blue]. The first 128 characters (0–127) correspond to the letters and symbols on a standard U.S. keyboard. The second 128 characters (128–255) represent special characters, such as letters in international alphabets, accents, currency symbols, and fractions.
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Caption = "Down"
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Caption = "Up"
End Sub
Option Explicit
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Caption = ""
Timer1.Enabled = True
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer1.Interval = 500
Label1.AutoSize = True
Label1.Caption = ""
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Label1.Caption & "-"
End Sub
Public downCount As Long
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
downCount = 0
Timer1.Enabled = True
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Timer1.Enabled = False
MsgBox "Button held down for " & downCount / 10 & " seconds."
End Sub
Private Sub Form_Load()
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
downCount = downCount + 1
End Sub