XusinboyBekchanov / VisualFBEditor

IDE for FreeBasic
Other
169 stars 39 forks source link

In linux, Form_MouseMove reset x,y when is moving over ImageBox #152

Closed demosthenesk closed 3 years ago

demosthenesk commented 3 years ago

Examine the following Project4. It is an eyes app for FreeBasic.

  1. Move mouse cursor around imagebox to change the image.
  2. Move mouse over imagebox, x,y of mouse resets and never show center-eyes image Project4.zip
XusinboyBekchanov commented 3 years ago

Fixed: Mouse events do not go to parents like they do in Windows: https://github.com/XusinboyBekchanov/MyFbFramework/commit/8688da67920433770b539781d6e023a8d76d0f3d

Now, to work, you need to add the following code (it works on Windows too):

Private Sub Form1.ImageBox1_MouseMove(ByRef Sender As Control, MouseButton As Integer, x As Integer, y As Integer, Shift As Integer)
    Form_MouseMove(Sender, MouseButton, ImageBox1.Left + x, ImageBox1.Top + y, Shift)
End Sub
demosthenesk commented 3 years ago

fixed!