Results 1 to 8 of 8

Thread: images on forms

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    CT
    Posts
    5

    Unhappy

    How do you make an Jpeg, bmp, gif fit on your form?
    How do you resize them to fit your available area on the form?

    Help please

  2. #2
    Member
    Join Date
    May 2000
    Posts
    41
    I'm guessing you are using a PictureBox to display your image? Don't! Use the Image control. It rescales the image automatically.


    Hope this helps
    Here I doeh again

  3. #3
    Lively Member
    Join Date
    Aug 2000
    Location
    quebec
    Posts
    81
    Like this:
    Code:
    Private Sub Form_Resize()
        Image1.Stretch = True
        Image1.Width = Me.Width
        Image1.Height = Me.Height
    End Sub
    C/C++,Delphi,VB6,Java,PB (blech!),ASP,JSP,SQL...bla bla bla and bla
    I love deadlines. I like the whooshing sound they make as they fly by.
    —Douglas Adams

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    CT
    Posts
    5
    it's not what I meant

    I meant to make it fit a certain area, with the image control my picture is getting all screw up,
    I want it to fit the size of my form nad when I use the strech I'm losing some of the picture and it's getting blown
    up too much

  5. #5
    Member
    Join Date
    May 2000
    Posts
    41
    use a IMAGE CONTROL instead of a PICTURE BOX CONTROL. it will resize the picture and not the box accordingly.
    Here I doeh again

  6. #6

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    CT
    Posts
    5

    Unhappy

    go back and read my last posting, I'm using an image control, I just switch to a pic box five minutes ago and use the paintpicture command on it and seems to work unless picture is really big and then it cuts off this also happens with the image control. Thanks for the suggestion anyways

  7. #7
    Member
    Join Date
    May 2000
    Posts
    41
    image box worked for me. but at least you got it working.
    Here I doeh again

  8. #8
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    IT cut's off the picture because it doesn't fit into the picturebox which can't be larger than the screen resolution.
    To solve this problem you may have to load the picture directly into a DC and use stretchblt blit it on the form
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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