![]()
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »tobikubi« (22. Oktober 2007, 16:20)

Doch, klar. bsHobbit hat den Vorschlag mit Schnittmengen genannt
Zitat
gibt es da keine allgemeine sachen
|
|
Visual Basic Quellcode |
1 2 3 4 5 6 |
Public Function Beruehrt(ByVal t1 As Control, ByVal t2 As Control) As Boolean Dim sx, sy As Boolean sx = t1.Left <= (t2.Left + t2.Width) And (t1.Left + t1.Width) >= t2.Left sy = (t1.Top + t1.Height) >= t2.Top And t1.Top <= (t2.Top + t2.Height) Beruehrt = sx And sy End Function |