Hello Benoît, well, at this time we are also discussing this issue in the forum of the Italian community of programmers Gambas .
I am attaching a simple application . I would like to point out that when you start to drag the image to be dredged, also the X and Y coordinates of the mouse pointer - relative to the object (in the example of the application attached it is a "PictureBox" ) that contains the image to drag - are stored. Then , when the release occurs , and therefore is raised the event of _Drop( ) inside another container (in the example of the attached application it is a "ScrollView" ) , the dragged object is not released to the coordinates in which the mouse pointer is located at the time, but to the coordinates previously stored when dragging begins !!! So the object is released in the other container (the ScrollView) to the coordinates "where" the mouse was clicked (inside of the PictureBox), when dragging of the image is started. And more, I known however a slight displacement of the coordinate values at the time of the event of _Drop( ) compared to those stored in the time of initiation of the drag , and for the accuracy : X - 8 and Y + 2. I hope I have been clear enough. :-( Best regards vuotttt -------------------------------------------- Lun 21/10/13, Benoît Minisini <gam...@users.sourceforge.net> ha scritto: Oggetto: Re: [Gambas-user] R: "Strange" coordinates of mouse with _Drop() event A: "mailing list for gambas users" <gambas-user@lists.sourceforge.net> Data: Lunedì 21 ottobre 2013, 23:59 Le 21/10/2013 09:17, Ru Vuott a écrit : > Hello, > > I would like to draw attention to my message, highlighting the strange coordinates returned by the mouse with the event _Drop (). > > Is it normal or there is a bug. > > Thanks > vuott > > > > -------------------------------------------- > Dom 20/10/13, Ru Vuott <vu...@yahoo.it> ha scritto: > > Oggetto: [Gambas-user] "Strange" coordinates of mouse with _Drop() event > A: gambas-user@lists.sourceforge.net > Cc: gam...@users.sourceforge.net > Data: Domenica 20 ottobre 2013, 00:22 > > Hello, > > on a Form I have a "ScrollView" and separately a > "PictureBox", in which there is the image I'll drag then > with the mouse inside the "ScrollView". > > Here the code: > ************************************** > Public Sub Form_Open() > > ScrollView1.Drop = True > > End > > > Public Sub PictureBox1_MouseDrag() > > If Mouse.Left Then > Drag.Icon = Last.Picture > > Last.Drag(Last.Picture.Image) > > Endif > > End > > > Public Sub ScrollView1_Drop() > > Dim pb As PictureBox > Dim pc As Picture > > With pb = New > PictureBox(ScrollView1) > .X = Mouse.X > .Y = Mouse.Y > .Picture = Drag.Data.Picture > > .W = Drag.Data.Picture.W > .H = Drag.Data.Picture.H > End With > > > ' In console I read the "very strange" coordinates of mouse > pointer: > With Mouse > Print .X > Print .Y > End With > > End > ************************************** > > Where I'm wrong? > > > > Best regards > vuottttt > Please provide a project that reproduces the bug. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Drag-Drop-0.0.1.tar.gz
Description: application/force-download
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user