Thumbs upSolvedPlease Help me.

Posts 1–5 of 5 · Page 1 of 1
Please Help me.
I know hotkey code, but i want to know for example if i clicked Insert, make the form be invisible, and if i clicked again make it visible.
anyone know it?
Thanks! =)
if form1.visible = true then
form1.visible = false
elseif form1.visible = false then
form1.visible = true
end if

Quote Originally Posted by DawgiiStylz View Post
if form1.visible = true then
form1.visible = false
elseif form1.visible = false then
form1.visible = true
end if

This is really all you need, but I'll make it a little more noob-friendly.

Code:
Dim insert as Boolean
insert = GetAnscKeyState(Keys.Insert) 'might have spelled that wrong, I'm just typing this here, not on VB

If insert = True Then
If form1.Visible = False Then
Form1.Visible = True
End If
If form1.Visible = False Then
Form1.Visible = True
End If
End If
Throw that on a timer that's always running and you're good.
Thanks Guys, Gonna Test now and tell you!

---------- Post added at 08:02 AM ---------- Previous post was at 07:50 AM ----------

Thanks, after understanding the code i make it again =)
Code:
Dim Hotkey1 As Boolean
        Hotkey1 = GetAsyncKeyState(Keys.Insert)
        If Hotkey1 = True Then
            If Me.Visible = True Then
                Me.Visible = False
            Else
                If Me.Visible = False Then
                    Me.Visible = True
                End If
            End If
        End If
Thanks Guys!
Quote Originally Posted by Mayion View Post
Thanks Guys!
@Mayion
Just felt for dropping you an smaller version, and maybe easier to use as well
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Keys) As Boolean

If GetAsyncKeyState(Keys.Insert) Then
      Me.Visible = Not (Me.Visible)
End If

//Solved
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us