Clever-Excel-Forum

Normale Version: TextBox - Steuerkommandos mit der Maus
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hallo,

ich suche möglichst viele Steuerkommandos über die ich die Textbox mit der Maus steuern kann. Einige habe ich hier aufgeschrieben. Die eingegebenen Kommandos werden derzeit über eine zweite Textbox angezeigt.
Fallen euch noch mehr Kommandos ein?


(Button 3 finde ich nicht bei mir, vielleicht könnt ihr da helfen)
Code:
Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
'Anmerkung: Erst die Tasten, dann die Maustasten drücken

TextBox2.Value = ""

If Button = 1 Then TextBox2.Value = "Linke Maustaste"
If Button = 2 Then TextBox2.Value = "Rechte Maustaste"
If Button = 4 Then TextBox2.Value = "Mausrad"
If Button = 3 Then TextBox2.Value = "Knopf 3" '??? noch unbekannt

If Shift = 1 And Button = 1 Then TextBox2.Value = "Linke Maustaste + Umschalt-Taste gedrückt"
If Shift = 2 And Button = 1 Then TextBox2.Value = "Linke Maustaste + Strg-Taste gedrückt"
If Shift = 3 And Button = 1 Then TextBox2.Value = "Linke Maustaste + Umschalt + Strg-Taste gedrückt"
If Shift = 4 And Button = 1 Then TextBox2.Value = "Linke Maustaste + Alt-Taste gedrückt"
If Shift = 5 And Button = 1 Then TextBox2.Value = "Linke Maustaste + Umschalt + Alt-Taste gedrückt"
If Shift = 6 And Button = 1 Then TextBox2.Value = "Linke Maustaste + Strg + Alt-Taste gedrückt"
If Shift = 7 And Button = 1 Then TextBox2.Value = "Linke Maustaste + Umschalt + Strg + Alt-Taste gedrückt"

If Shift = 1 And Button = 2 Then TextBox2.Value = "Rechte Maustaste + Umschalt-Taste gedrückt"
If Shift = 2 And Button = 2 Then TextBox2.Value = "Rechte Maustaste + Strg-Taste gedrückt"
If Shift = 3 And Button = 2 Then TextBox2.Value = "Rechte Maustaste + Umschalt + Strg-Taste gedrückt"
If Shift = 4 And Button = 2 Then TextBox2.Value = "Rechte Maustaste + Alt-Taste gedrückt"
If Shift = 5 And Button = 2 Then TextBox2.Value = "Rechte Maustaste + Umschalt + Alt-Taste gedrückt"
If Shift = 6 And Button = 2 Then TextBox2.Value = "Rechte Maustaste + Strg + Alt-Taste gedrückt"
If Shift = 7 And Button = 2 Then TextBox2.Value = "Rechte Maustaste + Umschalt + Strg + Alt-Taste gedrückt"

If Shift = 1 And Button = 4 Then TextBox2.Value = "Mausrad + Umschalt-Taste gedrückt"
If Shift = 2 And Button = 4 Then TextBox2.Value = "Mausrad + Strg-Taste gedrückt"
If Shift = 3 And Button = 4 Then TextBox2.Value = "Mausrad + Umschalt + Strg-Taste gedrückt"
If Shift = 4 And Button = 4 Then TextBox2.Value = "Mausrad + Alt-Taste gedrückt"
If Shift = 5 And Button = 4 Then TextBox2.Value = "Mausrad + Umschalt + Alt-Taste gedrückt"
If Shift = 6 And Button = 4 Then TextBox2.Value = "Mausrad + Strg + Alt-Taste gedrückt"
If Shift = 7 And Button = 4 Then TextBox2.Value = "Mausrad + Umschalt + Strg + Alt-Taste gedrückt"

End Sub
Hallo Wulfi,

im Prinzip ist die Zählweise bei Button genauso wie bei Shift: 1, 2 und 4 und deren Kombinationen, nur das die Kombinationen bei der Maus nicht funktionieren bzw. gar nicht vorgesehen sind.

Gruß Uwe