I made a custom caption bar control to replace the standard Windows caption bar. It's just a very basic one with images for the caption bar and close/maximize/minimize buttons.
I used 2 images for the top left and right corners. I have one of the MousePointer's set to SE/NW and the other one to SW/NE. So when holding the mouse over the corners it shows the "size window" cursor.
How would I have this resize the form when the mouse is moved from the top corners?
I attached a screen shot.
The caption bar at the top is the UserControl which is placed at the top of the form.
I would guess the code would go into the imgTopRight_MouseMove() event but I'm not sure how to do it.
Last edited by DigiRev; Mar 26th, 2007 at 02:55 AM.
It has a bug though when you resize it to the tiniest. It returns an invalid call or procedure. Otherwise, pretty neat stuff. Gotta save this code for future use. You rock bush!
I edited your code a bit. It'll return to normal size when the user accidentally resize it to the smallest.
VB Code:
Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)