Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag and Drop Question
Message
From
12/04/2005 13:13:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
12/04/2005 13:10:09
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01003833
Message ID:
01003868
Views:
19
>Hi Cetin,
>
>Use DragDrop instead of what?
>
>I am using DragDrop. It is just that the DD of Thisform is firing instead of the DD of the room. The DD of the room fires only when i drop exactly on the border (when DragOver's nState reflects entry or exit).
>
>Thanks
>
>Henry
>
>P.S. You probably don't remember me but you have helped me tremendously over the years. Glad to see you're still around and willing to help ;-)))

I remember you (is it sufficient to say MSword to prove:)
o = Createobject('form1')
o.Show(1)
Define Class form1 As Form
  Add Object myroom As room With Name = "Room1"
  Add Object myroom As room With Name = "Room2", Top = 110
  Add Object bed1 As bed With Left = 120, Top= 10, BackColor=0x0000FF
  Add Object bed2 As bed With Left = 120, Top= 20, BackColor=0x00FFFF
  Add Object bed3 As bed With Left = 120, Top= 30, BackColor=0xFF00FF
  Add Object bed4 As bed With Left = 120, Top= 40, BackColor=0xFFFF00

  Procedure DragDrop
    Lparameters oSource, nXCoord, nYCoord
    oSource.Top = nYCoord - oSource.YCoord
    oSource.Left = nXCoord - oSource.XCoord
  Endproc
Enddefine

Define Class bed As Container
  Height = 5
  Width = 10

  Procedure MouseDown
    Lparameters nButton, nShift, nXCoord, nYCoord
    If nButton = 1
      This.Drag(1)
    Endif
  Endproc

  Procedure RightClick
    Set Message To This.Tag
  Endproc
Enddefine

Define Class room As Container
  Height = 100
  Width = 100
  Procedure DragDrop
    Lparameters oSource, nXCoord, nYCoord
    oSource.Tag = This.Name
    oSource.Move(nXCoord, nYCoord)
  Endproc
Enddefine
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