There are at least a couple of different ways to do what you want.
One way is to use your background image with TEXTURE BACKDROP. But you must have an up-to-date version of DBPro.
Thus:
set display mode 864,486,32
SET TEXT TO BOLD
SET TEXT FONT "Arial"
sync on
load image "C:\Program Files\The Game Creators\Dark Basic Professional\Projects\man.png",1
load image "C:\Program Files\The Game Creators\Dark Basic Professional\Projects\backdrop.png",2
texture backdrop 2
y=400: x=243
repeat
if upkey() then dec y
if downkey() then inc y
if leftkey() then dec x
if rightkey() then inc x
SPRITE 2,x,y,1
set cursor 100,100
print "y pos:";y
print "x pos:";x
sync
sleep 20
until spacekey()
end
Another way is to paste your background image (NOT as a sprite) and use SET SPRITE 1,1,1 to force the background to be visible.
Thus:
set display mode 864,486,32
SET TEXT TO BOLD
SET TEXT FONT "Arial"
set text opaque
sync on
load image "C:\Program Files\The Game Creators\Dark Basic Professional\Projects\man.png",1
load image "C:\Program Files\The Game Creators\Dark Basic Professional\Projects\backdrop.png",2
paste image 2,0,0
set sprite 2,1,1
y=400: x=243
repeat
if upkey() then dec y
if downkey() then inc y
if leftkey() then dec x
if rightkey() then inc x
SPRITE 2,x,y,1
set cursor 100,100
print "y pos:";y
print "x pos:";x
sync
sleep 20
until spacekey()
end
The second version uses opaque text, so it doesn't keep overwriting the text.