user6258964
user6258964

Reputation:

How to make hotkeys in VB6?

I've some problem, i'm planning to make a form can hide itself and the form can show again (activate it only with a hotkey). what's the source code for my problem?

Upvotes: 0

Views: 1202

Answers (1)

Nisa Wiji Wati
Nisa Wiji Wati

Reputation: 46

Declare with this

Dim i As Integer
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As     Integer

then make a timer

Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKeyControl) And GetAsyncKeyState(vbKeyR) Then
Frmsav.Show
End If
End Sub

that code using Ctrl + R to show your form

Upvotes: 3

Related Questions