Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

VbKey Combine


PVJsquad
 Share

Recommended Posts

anyone know how to combine the ALT and H in Form_KeyUp

```
'hide all menu
        Case vbKeyMenu + vbKeyH
            picHotbar.Visible = False
            picStatus.Visible = False
            PicHideButton.Visible = True
            picButton.Visible = False

            ' minimap
            Options.Minimap = 0
            SaveOptions
```
Link to comment
Share on other sites

@Erwin:

> And what if you change the + to And (So Case vbKeyAlt And vbKeyH

```
Case vbKeyMenu And vbKeyH
            picHotbar.Visible = False
            picStatus.Visible = False
            PicHideButton.Visible = True
            picButton.Visible = False

            ' minimap
            Options.Minimap = 0
            SaveOptions
```
Nothing Changed no effect
Link to comment
Share on other sites

@Grim:

> In case no one has found an answer yet, you would go something like
> ```
> If KeyAscii = vbKeyReturn Then
>   If KeyAscii = vbKeyAltMask Then
>       Your code here
>   End If
> End If
>
> ```

**KeyAscii** **Variable not defined**
Link to comment
Share on other sites

@GoldSide:

> what the sub ?

The sub where this code in is:
```
'hide all menu
        Case vbKeyMenu + vbKeyH
            picHotbar.Visible = False
            picStatus.Visible = False
            PicHideButton.Visible = True
            picButton.Visible = False

            ' minimap
            Options.Minimap = 0
            SaveOptions
```
Link to comment
Share on other sites

wait? so the code like this ?
```
'hide all menu
        Case vbKeyMenu + vbKeyH
            If KeyAscii = vbKeyReturn Then
                If KeyAscii = vbKeyAltMask Then
                picHotbar.Visible = False
                picStatus.Visible = False
                PicHideButton.Visible = True
                picButton.Visible = False

                ' minimap
                Options.Minimap = 0
                SaveOptions

                End If
            End If

```
or like this ?
```
If KeyAscii = vbKeyReturn Then
  If KeyAscii = vbKeyAltMask Then
      'hide all menu
        Case vbKeyMenu + vbKeyH
            picHotbar.Visible = False
            picStatus.Visible = False
            PicHideButton.Visible = True
            picButton.Visible = False

            ' minimap
            Options.Minimap = 0
            SaveOptions
  End If
End If
```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...