Advertisement
2002C VB function enhancement #8864

Picture Commands

This includes the source code for Rotating a Picture 45 Degrees, Flipping a Picture Horizontally, and Flipping a Picture Vertically! Very usefull if your working on your own picture editing program. Questions: mikecanejo@Hotmail.com

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
'Ok, now just Copy and Paste everything here into the Form1..not in the Bas!
'<Start Copying>
Private Sub Command1_Click()
 'flip horizontal
 Picture2.Cls
 px% = Picture1.ScaleWidth
 py% = Picture1.ScaleHeight
 retval% = StretchBlt(Picture2.hdc, px%, 0, -px%, py%, Picture1.hdc, 0, 0, px%, py%, SRCCOPY)
End Sub
Private Sub Command2_Click()
 'flip vertical
 Picture2.Cls
 px% = Picture1.ScaleWidth
 py% = Picture1.ScaleHeight
 retval% = StretchBlt(Picture2.hdc, 0, py%, px%, -py%, Picture1.hdc, 0, 0, px%, py%, SRCCOPY)
End Sub
Private Sub Command3_Click()
 'rotate 45 degrees
 Picture2.Cls
 Call bmp_rotate(Picture1, Picture2, 3.14 / 4)
End Sub
Private Sub Form_Load()
Command1.Caption = "Flip Horizontal"
Command2.Caption = "Flip Vertical"
Command3.Caption = "Rotate 45 Degrees"
 Picture1.ScaleMode = 3
 Picture2.ScaleMode = 3
End Sub
'<Stop Copying...END>

Upload
Original Comments (3)
Recovered from Wayback Machine