Results 1 to 7 of 7

Thread: Using image files

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    19

    Question

    Hi there !
    Anyone can help me.
    Is there any method to load specific part of image file and put it into Image or PictureBox.

    Thanks
    Vbkids

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    what exactly do you mean "part" of a image?
    NXSupport - Your one-stop source for computer help

  3. #3
    New Member
    Join Date
    Aug 2000
    Posts
    11
    Using paintpicture you can set the destination coordinates,width and height of the graphics being applied and the source coordinates, width and height.

    Ergo, you can grab a rectangular section of graphic from on picturebox and place it in another picture box (or straight onto the form).

    Look up .paintpicture in your help files and see if that does the trick.
    Give me five lines written by the most honourable of men, and I shall find in them an excuse to hang him. - Cardinal Richelieu

    Ben Stappleton
    VB6E SP4

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    If you don't need to stretch the image from it's original size, you should use bitblt api, it's faster
    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.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    19
    What I really want to know is that

    I don't want to use:

    Image1.Picture = LoadPicture("...")
    Picture1.PaintPicture Image1.Picture,....

    I just want to load picture and use it without middle control. And I don't want to load all picture just some part for example the middle part of the image.

    -------
    | |
    | |
    -------

    Wish more help
    Thanks in advance
    vbkids

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    You have to load the whole picture since the data is stored in a byte array. Maybe you could make it load just the horizontal section that is part of the picture but that's a hard thing to do. I guess you won't win much time if you don't have a huge bitmap which is very vertically excentric.
    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.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    19

    Lightbulb Thanks for all

    Thanks for all of your who have tried to show me the way.
    All of your comment are very useful to me.
    And finally from what I get I can find the solution for what I really want in MSDN

    Good Luck!
    vbkids


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