Resize or Rotate pictureboxes, labels, textboxes at runtime?

RohanP

New member
Joined
Oct 14, 2005
Messages
4
Programming Experience
5-10
Hi There,

Is it possible to rotate or resize pictureboxes, labels, textboxes at runtime?
And I even wanted to make textbox and label controls Transperent ?

Regards
Rohan Powle
 
if you need a transparent label just set up its backColor to "transparent".
About resize and rotate picBox; say you want to Rotate image to Left:

VB.NET:
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate90FlipNone)
PictureBox1.Width = PictureBox1.Height * PictureBox1.Image.Width / PictureBox1.Image.Height
PictureBox1.Refresh()

or you want to Flip Horizontal:

VB.NET:
PictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipX)
PictureBox1.Refresh()

to zoom In:

VB.NET:
PictureBox1.Width = PictureBox1.Width * 2
PictureBox1.Height = PictureBox1.Height * 2 [COLOR=darkgreen]'will zoom in for 100%[/COLOR]


HTH
Regards ;)
 
Thanks for the reply

Hi There,

Rotating the image within the picturebox is ok, but what I wanted to know Is it possible to rotate controls like pictureboxes or textboxes ??
 
yes it is required

actually i am developing an application wherein the user drags controls over a picturebox and I retrive the X,Y cordinates wherein he has droped it.

now suppose he is dragging an element TITLE which can be horizontally or vertically placed on the picture box.

I have to even place pictureboxes and label. Rotation and resizing controls is a must for me..

SOMETHING LIKE PHOTOSHOP wherein an text element is rotated or resized

Rohan
 
Back
Top