|
-
Apr 12th, 2004, 01:40 PM
#1
Thread Starter
New Member
Borderless Form Resize From Left
I have a form that is set to the right side of the screen and is borderless, i.e set to 0
I want to resize the form but all the examples I have found only adjust the width from the right side of the form. I need to be able to change the width of the form from the left side. I know if I set the border style to '2' it is sizable and it can be sized from the left or right, but my form needs to remain fixed to the right of the screen.
The form also has a gradient effect and turning on the border looks bad is it does not look the same as the main form.
Only the width needs adjusting as the height is set to the screen height.
If anybody could help it would be most appreciated.
-
Apr 12th, 2004, 02:25 PM
#2
How are you handling the resize if you have a borderless form? Have you put a control on the right and capture the Mouse... events? Or is that what you're after?
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Apr 12th, 2004, 02:27 PM
#3
What you need to do, is resize the form like the tutorials show you, then move it back how far you increased it. Like so:
VB Code:
Form.Width = Form.Width + 100
Form.Left = Form.Left - 100
?
Phreak
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Apr 12th, 2004, 04:16 PM
#4
Thread Starter
New Member
How are you handling the resize if you have a borderless form? Have you put a control on the right and capture the Mouse... events? Or is that what you're after?
This is exactly what I am after. I am using the above method but need to have the control on the left and adjust the width from the left leaving the right side against the edge of the screen. It wants to be controlled via the mouse so:
Form.Width = Form.Width + 100
Form.Left = Form.Left - 100
is not what is required. Thanks anyway to «°°phReAk°°»
-
Apr 12th, 2004, 04:25 PM
#5
VB Code:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Me.Left = Me.Left + X
Me.Width = Me.Width - X
End If
End Sub
Has someone helped you? Then you can Rate their helpful post. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|