On some Lscripts when you move the script's window it redraws the background rather than leaving the 'shape' of the window in the main LW window.

How is this done?

Some examples of plugins that work this way can be found here:

Pictrix

These are compiled Lscripts not SDK plugins, so it must be possible but how?

I wanna write some scripts but I like this approach as you might want to remind yourself what it was you were editing!

Cheers
Matt