I have a borderless form which is always on top and with WS_EX_NOACTIVATE
flag set to prevent it for gaining focus.
const int WS_EX_NOACTIVATE = 0x08000000;
protected override CreateParams CreateParams {
get {
CreateParams param = base.CreateParams;
param.ExStyle |= WS_EX_NOACTIVATE;
return param;
}
}
Form contains small picture box for moving (since it's borderless):
private void pictureBox4_MouseMove(object sender, MouseEventArgs e) {
if (e.Button == MouseButtons.Left) {
ReleaseCapture();
SendMessage(this.Handle, 0xa1, 0x2, 0);
}
}
However when I move the window it doesn't get redrawn/shown, only when I release the mouse button does it move the form to new location.
I have seen applications which work in a similar fashion but they do show the window while moving (for example some virtual keyboards I've seen). I've also seen many questions elsewhere on net about this issue but with no answer.
Can someone please tell me if it is possible to show a window/form like this while moving (like "normal" window), and if yes, how to do it?