| MouseDown, -Up, -Move |
| |
| |
| Private Sub Form_Load() | |
| shpLeftButton.FillColor = vbButtonFace | |
| shpMidButton.FillColor = vbButtonFace | Die TestButtons werden nach Laden des Formulars |
| shpRightButton.FillColor = vbButtonFace | mit leerem Bild geladen. |
| shpAltKey.FillColor = vbButtonFace | |
| shpCtrlKey.FillColor = vbButtonFace | |
| shpShiftKey.FillColor = vbButtonFace | |
| End Sub | |
| |
| Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) |
| Select Case Button | |
| Case Button And vbLeftButton | |
| shpLeftButton.FillColor = vbRed | |
| Case Button And vbMiddleButton | |
| shpLeftButton.FillColor = vbRed | |
| Case Button And vbRightButton | |
| shpRightButton.FillColor = vbRed | |
| End Select | |
| If vbAltMask And Shift Then shpAltKey.FillColor = vbBlue | Bei Drücken der Maustasten auf die untere Testfläche |
| If vbCtrlMask And Shift Then shpCtrlKey.FillColor = vbBlue | werden die "Maus"-Buttons rot gefärbt. |
| If vbShiftMask And Shift Then shpShiftKey.FillColor = vbBlue | Bei Drücken der Shift- und Alt-Taste sowie gleichzeitigem |
| End Sub | Drücken der Maustaste auf die Testfläche werden die |
| Tastatur-Buttons blau gefärbt. |
| Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) |
| shpLeftButton.FillColor = vbButtonFace | Die Buttons werden nach Loslassen der Maustasten |
| shpMidButton.FillColor = vbButtonFace | entladen. |
| shpRightButton.FillColor = vbButtonFace | |
| shpAltKey.FillColor = vbButtonFace | |
| shpCtrlKey.FillColor = vbButtonFace | |
| shpShiftKey.FillColor = vbButtonFace | |
| End Sub | |
| |
| Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) |
| lblXPosition.Caption = X | Bei Bewegen des Mauszeigers über das Formular |
| lblYPosition.Caption = Y | werden die Koordinaten in Bezeichnungsfeldern |
| End Sub | angezeigt. |
| |
| Private Sub picAusgabe_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) |
| If Button = vbLeftButton Then picAusgabe.PSet (X, Y) | Bei Bewegen mit der linken Maustaste kann in der |
| End If | Zeichenfläche ein Bild gezeichnet werden. |
| End Sub | |
| |
| Private Sub picAusgabe_DblClick() |
| picAusgabe.Cls | Nach Doppelklick auf die Zeichenfläche wird die |
| End Sub | Zeichnung gelöscht. |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| . |
| |