KeyCodeKonstante für [ALT] ?

Hallo Forumsmitglieder!

Ich schreibe gerade ein Programm in dem ich Tastatureingaben
simulieren muss. Das ist ja auch soweit kein Problem, aber mir fehlt die KeyCodeKonstante für Alt. Soweit VB mir das Anzeigt, gibt es die Gar nicht.

Kennt jemand den Wert für die Taste [ALT], oder hat jemand sonst
eine Idee wie ich den Druck dieser Taste simulieren kann?!

Vielen Dank im Vorraus!

CyA!
Felix

Also, den ALT-Key bekommst Du über den Shift-Parameter.

Hier der Auszug aus der MSDN:

An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT are pressed, the value of shift is 6.

[Bei dieser Antwort wurde das Vollzitat nachträglich automatisiert entfernt]

18?
Hi Felix,

also wenn ich mir mittels

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
MsgBox KeyCode
End Sub

die keycodes ausgeben lasse, erhalte ich bei [Alt] 18.

War’s das was Du brauchst??

Gruß

Sculpture