Results 1 to 2 of 2

Thread: Copying pictures after a graphic method

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    8
    I'm trying to flip a picture, and then copy it into another picture after it is flipped. However, the copy procedure always gives me the original unflipped picture. Any thoughts? Code is below:

    'gets the picture
    Private Sub Picture1_Click()
    Picture1.Picture = LoadPicture("c:/picture.jpg")
    End Sub

    'flips it:this seems to work fine
    Private Sub Command1_Click()
    Picture1.PaintPicture Picture1.Picture, 0, 0, _
    Picture1.Width, Picture1.Height, 0, Picture1.Height, _
    Picture1.Width, -Picture1.Height, vbSrcCopy
    End Sub

    'always gives me original picture - not the flippped one I want
    Private Sub Picture2_Click()
    Picture2.Picture = Picture1.Picture
    End Sub

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    While flippig you don't change the picture... if you draw / copy to a picturebox you change it's image property. You have to copy the image from Picture1 to Picture2:

    Code:
    Picture2.Picture = Picture1.Image
    (And don't forget to set AutoRedraw of picture1 to true)

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