Moving Windows

BlitzPlus Forums/BlitzPlus Programming/Moving Windows

MadMax(Posted 2003) [#1]
Is it possible to move a window with code, and if so, how?

cheers


Mark Tiffany(Posted 2003) [#2]
The trick is to remember that just about all gadgets can be acted on by all gadget commands. And that windows are gadgets too. Therefore you can use SetGadgetShape to move & resize a window, and things like SetGadgetText to change the name of it, and so on. Here's some sample code:

win=CreateWindow("Click Me!",0,0,100,100)
MouseWait()
SetGadgetShape win,100,100,200,200
MouseWait()



MadMax(Posted 2003) [#3]
cheers, that's great