Results 1 to 3 of 3

Thread: how to slice single picture

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Posts
    46

    how to slice single picture

    in to 4 picture box

    ie. i want to load very big image !



    single picture into




    Part1 | Part2
    |
    --------------+--------------
    |
    Part3 | Part$

  2. #2
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    This sample show you how to "get" 1/4 of the source image and assing it to another Picturebox:
    VB Code:
    1. Picture2.Move 0, 0, Picture1.Width / 2, Picture1.Height / 2
    2.     Picture2.PaintPicture Picture1.Picture, 0, 0, Picture2.ScaleWidth, Picture2.ScaleHeight, _
    3.                                             0, 0, Picture1.ScaleWidth / 2, Picture1.ScaleHeight / 2
    Note:
    you will have to come up with some routine that will create new Picturebox on-the-fly using Control Array or Collection (Add method).

    Roy

  3. #3
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    Dont'forget to set AutoRedraw = True for all of your Pictureboxes.

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