How can I flip/rotate the label in C# Windows Forms?
I set the background image to my label.
At every time interval it moves three pixels to the right side. When it reaches the form end position I need the label to be flipped and turned back.
I have tried the following way, but I didn’t get the solution.
private void timer1_Tick(object sender, EventArgs e){
if (label2.Location.X < this.Width)
label2.Location = new Point(label2.Location.X + incr, label2.Location.Y);
else
{
incr = -2;
label2.Location = new Point(label2.Location.X - 50, label2.Location.Y);
label1.Image.RotateFlip();
}
this.Refresh();
}
Create a class,
newlabel, which can rotate its Text on any angle specified by the user.You can use it by code or simply dragging from the ToolBox.
Now drag this custom control to be used into your form.
You have to set the below properties.
Change angle as required by simply changing the
RotateAngleproperty.