Hi,
I meant WM_ and WM_NC messages, which allow to intercept mouse or sizing
related events for non-client areas of windows. Border is not in client area
unfortunately. You have to check Platform SDK for all the details if you
want to know more. In your program you need to override WndProc and to be
able to intercept these messages. In particular you might be able to do what
you want with WM_NCCALCSIZE and WM_NCHITTEST.
If you have thick border you can also intercept WM_GETMINMAXINFO and
WM_WINDOWPOSCHANGED. But you have to check docs to find out what would be
best in your case.
Use these procedures in your form to understand sequence of messages and how
to deal with situation:
[System.Security.Permissions.PermissionSet(System.Security.Permissions.Secur
ityAction.Demand, Name="FullTrust")]
protected override void WndProc(ref Message m)
{
Console.WriteLine(m.Msg.ToString());
base.WndProc(ref m);
}
[System.Security.Permissions.PermissionSet(System.Security.Permissions.Secur
ityAction.Demand, Name="FullTrust")]
public override bool PreProcessMessage(ref Message msg) {
Console.WriteLine(msg.Msg.ToString());
return base.PreProcessMessage(ref msg);
}
I hope you can easily translate it to VB. These will print all messages,
which you get for NC and client areas as they appear.
HTH
Alex
What-a-Tool said:
Grabbing the border of my form doesn't trigger any mouse events that I can
find.
Sorry if I seem a little dense here, but how do you mean?
I can stop an event from happening during the resize with :
If Me.Mousebuttons <> Mousebutton.left
<action>
End If
but that still won't trigger it when I stop resizing and release. (no
re-sizing with keyboard)
--
/ Sean the Mc /
"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
mouse