Results 1 to 5 of 5

Thread: Borderless Form Resize From Left

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2003
    Location
    Eire
    Posts
    8

    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.

  2. #2
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431
    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.

  3. #3
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    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:
    1. Form.Width = Form.Width + 100
    2. Form.Left = Form.Left - 100
    ?
    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2003
    Location
    Eire
    Posts
    8
    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°°»

  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    VB Code:
    1. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     If Button = vbLeftButton Then
    3.         Me.Left = Me.Left + X
    4.         Me.Width = Me.Width - X
    5.     End If
    6. 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
  •  



Click Here to Expand Forum to Full Width