Hallo Frank,
sorry, dass ich erst jetzt wieder so spät antworte. Trotzdem gibt es für Deine Frage eine einfache Antwort:
Verwende einfach das
MouseClick-Ereignis. Wenn Du auf das Ereignis reagierst, dann kannst Du mittels der übergebenen Parameter auch die Mausposition überprüfen:
Private Sub Control1_MouseClick(sender as Object, e as MouseEventArgs) _
Handles Control1.MouseClick
Dim messageBoxVB as New System.Text.StringBuilder()
messageBoxVB.AppendFormat("{0} = {1}", "Button", e.Button)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Clicks", e.Clicks)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "X", e.X)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Y", e.Y)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Delta", e.Delta)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Location", e.Location)
messageBoxVB.AppendLine()
MessageBox.Show(messageBoxVB.ToString(),"MouseClick Event")
End SubEinzige "Herausforderung" ist es das Control zu bestimmen, was letztendlich das Event wirft (ist es Deine Form, eine PictureBox, ...)? Also das Control, welches Dein Spielbrett zeichnet, das ist das gefragte Control.
Ich hoffe, ich konnte Dir weiterhelfen?
Grüße
Timo