Autor Beitrag
Sneedlewoods
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: So 07.04.13 23:34 
Hallo,

ich bin auf folgendes Problem gestoßen:

Ich erstelle zwei GroupBoxen auf meiner Form1.

1. ich drücke über GroupBox1 die Maustaste: MouseDown
2. ich halte die Maustaste
3. ich bewege die Maus über GroupBox2
4. ich lasse die Maustaste los: MouseUp

Das Problem ist, dass das MouseUp immernoch auf GroupBox1 verweist. Was kann ich da machen? Ich möchte dass das MouseUp von GroupBox2 kommt.
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4798
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mo 08.04.13 11:02 
Hallo,

dies ist das Standardverhalten bei Windows-Controls und wird mittels des Stichworts "Captured Control" beschrieben, s. z.B. Mouse Capture in Windows Forms.
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4708
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Mo 08.04.13 11:29 
Du scheinst eine Art Drag&Drop implementieren zu wollen. Dafür gibt es in Winforms eigene Events. Eben die die mit dem Stichwort Drag beginnen.
Sneedlewoods Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Mo 08.04.13 23:43 
Danke für die Antworten.