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 EnddefineCetin