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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

picturebox rotate and scroll bar

Status
Not open for further replies.

razorjr

Programmer
Sep 23, 2006
6
MY
Hello,i need some help.i really appreciate it if u know how to solve

i need to make a picturebox rotate left about 180 degree when my HscrollBar
at maximum value and rotate to right when HScrollBar at minumum value.If the scrollbard
is in the middle,the picturebox stay at 0 degree.

so,every time user scroll , the picture box looks like a car steering that can rotate to left and right based on scroll bar value.

thanks.
 
You actually need 3 pictures, since JavaScript can't rotate on the fly. I suspect you mean 90 degrees, not 180.

Anyhow, you'd have right.gif, center.gif, and left.gif.

In the onClick (or onBlur) for the scroll bar, you'd check the value. If it's less than 1/3 max, display right.gif, else if it's less than 2/3 max, display center.gif, else display left.gif.

 
Whoops, I read too many forums... that's the WM_COMMAND, not onClick, sorry!
 
how to do that with Windows Form Application .NET?
example i making a .NET application.btw i keep on trying.
 
To rotate a picture you could try...
Code:
PictureBox1.Image.RotateFlip(RotateFlipType::Rotate180FlipY );
although rotation can only be done in steps of 90 degrees.
otherwise you may have to do something fancy with the bitmap.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top