Results 1 to 3 of 3

Thread: changing minimum form size at run time

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Brisbane Australia
    Posts
    150

    changing minimum form size at run time

    I have a form in VB.NET which uses docking etc to change the size of controls and the form etc at run time. However, I cant seem to set the minimumsize parameters of the form at run time - only at design time. I was trying to do this

    me.minimumsize.width=x

    in the form_load event but it don't like it

    says "Expression is a value and therefore cannot be the subject of an assignment" ??

    Does anyone know if I am doing something wrong or is there a way around this ??



  2. #2
    Registered User jkw119's Avatar
    Join Date
    Oct 2001
    Location
    Pittsburgh
    Posts
    256
    just say

    VB Code:
    1. me.width = x

    that works...

    jeff

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Brisbane Australia
    Posts
    150
    Gday Jeff.
    thanks for the reply but it dosn't work in VB.NET. I am trying to stop the user from resizing the form smaller than what is was loaded as. Anyway, I've found how to do it now. The command in the form_load event is

    Me.MinimumSize = New System.Drawing.Size(Me.Width, Me.Height)

    as the height and width properties of the form are now read only
    Just a small change from VB6
    regards
    Bh

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