Unlike DBPro, DBC has no Pick Object command so the biggest hurdle is getting your program to detect which object the user is clicking on.
You do however have the OBJECT SCREEN X() and OBJECT SCREEN y() functions which return the 2D X and Y screen positions of a given object.
So, if you know that your objects have numbers between 1 and 100 then a For..Next can run through them and get their X and Y screen positions in turn - each time, comparing the results with the current Mouse X and Y co-ordinates.
Whichever object has the closest Screen X and Y values to the X/Y mouse position when the button was clicked is the selected object.
Dragging is best done with the mouse button held down. Normally you would move on the X axis with MouseMoveX() and on the Z axis with MouseMoveY().
To move an object along the Y axis it's generally done by using either the right mouse button or the left one in conjunction with a key - such as the shift key.
I've knocked together the following short snippet to point you in the right direction:
sync on: sync rate 60
autocam off
cls
For N=-2 to 2
Make Object Cube N+3,10
Position Object N+3,N*15,0,0
Next N
Position Camera 0,20,-60
Point Camera 0,0,0
do
Mx=MouseX(): My=MouseY(): Mc=MouseClick()
If Mc=1
Hide Mouse
Selected=Select3DObj(Mx,My)
Color Object Selected,RGB(255,0,0)
ObjPosX=Object Position X(Selected): ObjPosY=Object Position Y(Selected): ObjPosZ=Object Position Z(Selected)
Repeat
MMx=MouseMoveX()/5: MMy=MouseMoveY()/5
If ShiftKey()=1
Position Object Selected,ObjPosX,ObjPosY-MMy,ObjPosZ
Else
Position Object Selected,ObjPosX+MMx,ObjPosY,ObjPosZ-MMy
Endif
ObjPosX=Object Position X(Selected): ObjPosY=Object Position Y(Selected): ObjPosZ=Object Position Z(Selected)
Sync
Until MouseClick()=0
Color Object Selected,RGB(255,255,255)
Show Mouse
Endif
sync
Center Text 320,0,"Object Selected: "+Str$(Selected)
loop
function Select3DObj(Mx,My)
Closest=10000
For N=1 to 5
objx=Object Screen X(N): objy=Object Screen Y(N)
Dist=sqrt((mx-objx)^2+(my-objy)^2)
If Dist < Closest
Closest = Dist
ObjSelected = N
Endif
Next N
endfunction ObjSelected
TDK_Man