Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mouseup()
Message
From
25/06/2003 12:56:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/06/2003 12:24:57
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00803849
Message ID:
00803867
Views:
15
>Hi all,
>I'm trying to figure out how to recognise when the left mouse button has been released over a different form than the one where the mouse was pressed. I'm trying to drag from a listbox on one from and drop something on a form in the class designer. Right now it sort of works. When I release over the class being designed, nothing happens until I click on the class. Then my mouseup code runs and adds the object. I think I have tried every combination of drag(), mousemove(), etc. and I can't seem to trap that event over another form until I click on that form. It's possible to do this because the toolbox does it, but I cannot for the life of me figure out how they trap this event. Any ideas? Thanks.
>
>Gary

Gary,
Why do you try to track the release of mouse button. Start the drag and catch it with DragDrop.

ie:
*Form1.text1.MouseDown
Lparameters nButton, nShift, nXCoord, nYCoord
If nButton = 1
  nStart = Seconds()
  Do While Mdown() And Seconds()-nStart < 0.4
  Enddo
  If Mdown()
    This.Drag(1)
    oObj = Sys(1270)
    cSCX = Sys(1271,oObj)
    cHierarchy = Sys(1272,oObj)
    MessageBox('Drag ended'+Chr(13)+;
    'FormFile :'+cSCX+Chr(13)+;
    'Hierarchy:'+cHierarchy+Chr(13)+;
    'Object class'+oObj.Baseclass)
  Endif
Endif

*Form2.text1.dragdrop
LPARAMETERS oSource, nXCoord, nYCoord
this.Value = oSource.Value

*Form2.Label1.DragOver
LPARAMETERS oSource, nXCoord, nYCoord, nState
oSource.drag(0) && Cancel the drag
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform