Flipping graphics vertically and/or
horizontally
You can flip graphics very simply, by using the PaintPicture method of picture boxes
and forms. You use a negative height and/or width to make the picture flip.
Normal, straight copy: Picture2.PaintPicture
Picture1.Picture, 0, 0, _
Picture1.Width, Picture1.Height, 0, 0, _
Picture1.Width, Picture1.Height, vbSrcCopy
Horizontal flip:
Picture2.PaintPicture Picture1.Picture, 0, 0, _
Picture1.Width, Picture1.Height, Picture1.Width, _
0, -Picture1.Width,
Picture1.Height, vbSrcCopy
Vertical flip:
Picture2.PaintPicture Picture1.Picture, 0, 0, _
Picture1.Width, Picture1.Height, 0, Picture1.Height, _
Picture1.Width,
-Picture1.Height, vbSrcCopy
Horizontal and Vertical flip:
Picture2.PaintPicture Picture1.Picture, 0, 0, _
Picture1.Width, Picture1.Height, Picture1.Width, _
Picture1.Height,
-Picture1.Width, -Picture1.Height, vbSrcCopy
|