Hi!
I am working on a java app where the form is a fixed size UNDECORATED or TRANSPARENT, and I want to be able to move the form in much the same way as you can with a DECORATED form.
What I am trying to do is to have custom controls/icons on a form, so I don't really want the 'decorations' but want to be able to move the form.
So far I have tried the MouseMove event (doesn't trap a mouse button is pressed event).
MouseDragged event is the most likley but obviously the mouse moves and you can't 'hold' the mouse in place while the form moves by resetting top and left coordinates.
MousePressed event is good for determining a mouse button is pressed, but other mouse events can't be trapped while the button is pressed.
The other alternative I suppose would be to try and disable the resize button so the form can be moved but the size of the form cannot change.
Any thoughts?
I am working on a java app where the form is a fixed size UNDECORATED or TRANSPARENT, and I want to be able to move the form in much the same way as you can with a DECORATED form.
What I am trying to do is to have custom controls/icons on a form, so I don't really want the 'decorations' but want to be able to move the form.
So far I have tried the MouseMove event (doesn't trap a mouse button is pressed event).
MouseDragged event is the most likley but obviously the mouse moves and you can't 'hold' the mouse in place while the form moves by resetting top and left coordinates.
MousePressed event is good for determining a mouse button is pressed, but other mouse events can't be trapped while the button is pressed.
The other alternative I suppose would be to try and disable the resize button so the form can be moved but the size of the form cannot change.
Any thoughts?