Results 1 to 2 of 2

Thread: Form sizing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    103

    Question Form sizing

    I am trying to create a form with a PictureBox of known size. I ran into problems, so I created a super-simple program to test things. First, I created a form and gave it a specific size. I also set:
    Me.ControlBox = False
    Me.Text = String.Empty
    Me.FormBorderStyle = FormBorderStyle.None
    since I assumed that these parameters could take up space. I then inserted a PictureBox on the form, it’s size being the same as the form and its offset being 0,0. I then inserted a bitmap image, of the same size, into the PictureBox.

    When I ran this program, approximately 7.5% of the right side of the image was cropped and approximately 16.7% of the bottom side of the image was cropped.

    Would you please point me to a resource which describes the maximum size of a picture box that can go into a form and other, related useful information. Thanks.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,296

    Re: Form sizing

    If you want a form to be sized based on a PictureBox then you can do this:
    vb.net Code:
    1. ClientSize = myPictureBox.Size

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