I don't know how to make it so that you drag a rectangle indicating the region that the window will take up, but I can make it resize while you are dragging it.
This will take some work, but bare with me.
I will tell you to add chunks of code to certain parts of your code, and subs. If the subs don't exist, create them (by selecting them from the dropdown box on the right as you look as the code window.)
Add the following code to the general section of the form's module (before all of the subs and functions)
Code:
Const borderwidth = 10
Private xlresize As Boolean
Private xrresize As Boolean
Private ytresize As Boolean
Private ybresize As Boolean
note: borderwidth can be changed to anything you want. It defines how many pixels the border is (how wide the region is that you must click on to drag the size of the window)
Add the following code to the Form_MouseDown() sub
Code:
xrresize = False
xlresize = False
ytresize = False
ybresize = False
If X > Width - Screen.TwipsPerPixelX * borderwidth Then
xrresize = True
End If
If X < Screen.TwipsPerPixelX * borderwidth Then
xlresize = True
End If
If Y > Height - Screen.TwipsPerPixelY * borderwidth Then
ybresize = True
End If
If Y < Screen.TwipsPerPixelY * borderwidth Then
ytresize = True
End If
add the following code to the Form_MouseMove() sub:
Code:
If Button = vbLeftButton Then
If xrresize And X > Screen.TwipsPerPixelX * borderwidth * 2 Then
Width = X
End If
If xlresize And Width - X > Screen.TwipsPerPixelX * borderwidth * 2 Then
Width = Form1.Width - X
Left = Form1.Left + X
End If
If ybresize And Y > Screen.TwipsPerPixelY * borderwidth Then
Height = Y
End If
If ytresize And Height - Y > Screen.TwipsPerPixelY * borderwidth * 2 Then
Height = Height - Y
Top = Top + Y
End If
End If
MousePointer = 0
If X > Width - Screen.TwipsPerPixelX * borderwidth Or X < Screen.TwipsPerPixelX * borderwidth Then
MousePointer = 9
End If
If Y > Height - Screen.TwipsPerPixelY * borderwidth Or Y < Screen.TwipsPerPixelY * borderwidth Then
MousePointer = 7
End If
If (X > Width - Screen.TwipsPerPixelX * borderwidth And Y > Height - Screen.TwipsPerPixelY * borderwidth) Or (X < Screen.TwipsPerPixelX * borderwidth And Y < Screen.TwipsPerPixelY * borderwidth) Then
MousePointer = 8
End If
If (X > Width - Screen.TwipsPerPixelX * borderwidth And Y < Screen.TwipsPerPixelY * borderwidth) Or (X < Screen.TwipsPerPixelX * borderwidth And Y > Height - Screen.TwipsPerPixelY * borderwidth) Then
MousePointer = 6
End If
I haven't taken the time to test it thoroughly, but it should work. Be sure to let me know how it worked for you.