Results 1 to 3 of 3

Thread: Problems flipping a picture

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Location
    Posts
    7
    I am having trouble. I wrote a function that should flip an image box, but I am having a couple of problems.

    Here is the source code:
    Picture1.ScaleWidth = Image1.Width
    Picture1.ScaleHeight = Image1.Height
    Picture1.Width = Image1.Width
    Picture1.Height = Image1.Height
    Picture1.Picture = Image1.Picture
    Picture2.Height = Image1.Height
    Picture2.Width = Image1.Width
    Picture2.PaintPicture Picture1.Picture, Picture1.ScaleWidth, 0, -1 * Picture1.ScaleWidth, Picture1.ScaleHeight
    Image1.Picture = Picture2.Image

    Problem #1: I am having is that when I run this, PictureBox2 momenterally flashes with the flipped image. Then, the image disappears and PictureBox2 reverts back to what is was before.

    Problem #2: When the picture flashes up, I noticed that the transparency disappears. How would I fix this?

    Thanks,
    Bob

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Set autoredraw to true
    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.

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    For your second problem, you can't have the picture transparent like the image control. But you could download my transparent picturebox on my homepage that you can have a certain maskcolor to be transparent, by cutting the region of the control
    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