[Gambas-user] User control disappears when moved by mouse

Claus Dietrich claus.dietrich at freenet.de
Tue Jun 13 10:05:46 CEST 2023


>The problem is you are using Mouse.ScreenX not Button1.X as the first value
>The button x pos moves relevant to itself not Mouse.screenx.
>
>Try this...  (I used Last not Button1 as then this code works to move any
>control
>
>Public Sub Button1_MouseMove()
>
>If Mouse.Left Then Last.Move(Last.X + (Mouse.X - Mouse.StartX), Last.Y +
>(Mouse.Y - Mouse.StartY))
<End
<BruceS

This works perfect. Thanks a lot.
Claus



More information about the User mailing list