Results 1 to 2 of 2

Thread: [RESOLVED] about paintpicture method

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,961

    Resolved [RESOLVED] about paintpicture method

    i'm using a visual basic 6...
    i'm trying use the paintpicture method, but i don't hunderstand these method... i'm trying but it's difficult...
    i'm trying build a flip procedure using these method, but i recive draw bugs...
    Code:
    Option Explicit
    
    Private Enum FlipState
        Vertical = 0
        Horizontal = 1
        HorizontalVertical = 2
    End Enum
    
    Private Sub Flip(picSource As PictureBox, picDestiny As PictureBox, fsFlip As FlipState)
        If fsFlip = Vertical Then
            picDestiny.PaintPicture picSource.Image, 0, 0, picSource.ScaleWidth, -picSource.ScaleHeight, 0, 0, picSource.ScaleWidth, picSource.ScaleHeight, vbSrcCopy
        ElseIf fsFlip = Horizontal Then
            picDestiny.PaintPicture picSource.Image, 0, 0, -picSource.ScaleWidth, picSource.ScaleHeight, 0, 0, picSource.ScaleWidth, picSource.ScaleHeight, vbSrcCopy
        ElseIf fsFlip = HorizontalVertical Then
            picDestiny.PaintPicture picSource.Image, 0, 0, -picSource.ScaleWidth, -picSource.ScaleHeight, 0, 0, picSource.ScaleWidth, picSource.ScaleHeight, vbSrcCopy
        End If
    End Sub
    
    Private Sub Combo1_Click()
        Flip Picture1, Picture2, Vertical
    End Sub
    can anyone explain to me what isn't right?
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #2

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,961

    Re: about paintpicture method

    i found the answer...
    when i put the image in Vertical(for example), i must change the position: insted 0, i must use the height image for the new position...
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

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