The flicker you are seeing is due to you letting DBPro redraw the display when it likes and not when best for your program - that's simple to fix though - you use SYNC ON at the top of your code, then use SYNC at the bottom of your loop as an instruction to redraw:
sync on
sync rate 0 ` no max frame rate - full out
do
cls
text mousex(), mousey(), "Here's some text"
sync ` time to draw
loop
you have a choice between redrawing everything every frame, or of recording the differences so you can restore them later, but doing that means you need to read from the graphics card, and that's *s*l*o*w*:
sync on
sync rate 0
do
` Remember the coordinates, because they need to be used in the consistently in all the following commands
x = mousex()
y = mousey()
` Create an image of what is there before we draw some text
get image 1, x, y, x+text width("Here's some text"), y+text height("Here's some text")
` Now place the text
text x, y, "Here's some text"
` Update the display
sync
` Restore the saved image
paste image 1, x, y
loop
As an indication of how much slower it is, the first piece of code runs at over 4000fps on my laptop, while the second runs at 64fps, or at 1.6% of the speed.
Basically, it's far faster to redraw everything except for the things you want to remove, than to try to undo them.