I have a borderless form that is always on top and with a flag WS_EX_NOACTIVATEto prevent it from getting focus.
const int WS_EX_NOACTIVATE = 0x08000000;
protected override CreateParams CreateParams {
get {
CreateParams param = base.CreateParams;
param.ExStyle |= WS_EX_NOACTIVATE;
return param;
}
}
The form contains a small frame for moving (as it is 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 cannot be redrawn / shown, only when I release the mouse button, it moves the form to a new location.
I saw applications that work in a similar way, but they display a window while moving (for example, some virtual keyboards that I saw). I also saw a lot of questions elsewhere about this issue, but without an answer.
-, , , /, (, "" ), , ?