Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture box flip

Status
Not open for further replies.

Mikethegoalie

Programmer
Oct 2, 2003
7
CA
hey guys, me again. Question. I have a picture box on my hockey program and i really wanna confuse my friends. When they click the command button in the program, i want the picture box ( not image box) to flip vertically. How can i go through with this?
thanks, mike
 
you could have two images with the program, and load the upside down one when they click the button.
 
its a picture box, with text. lets say this was displayed in the picture box: **********
********
******
***

how can i make it flip so its like this: ***
******
********
**********



 
I did something similar (I rotated the image) but it involved a lot of code and was slow. marcdoyles suggestion would be a good idea (and very quick) if the text is part of the image.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Try this code. This will help you flipping images in a picture box.
___
[tt]
Private Sub Picture1_Click()
With Picture1
.AutoRedraw = True
.PaintPicture .Picture, 0, 0, , .ScaleHeight, , .ScaleHeight, , -.ScaleHeight
.Picture = .Image
.AutoRedraw = False
.Cls
End With
End Sub[/tt]
___

See also thread222-654202, about flipping and rotating images.
 
If you want to rotate through any arbitary angle (whilst at the same time avoiding the normal solutions on the web for solving this problem that provide code for moving the image pixel by pixel) have a look at my SetWorldTransform solution in thread222-535523
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top