public partial class ScrollText : Form { public bool moveright = true; //This Variable should be declared globaly public ScrollText() { InitializeComponent(); } private void timer1_Tick(object sender, EventArgs e) { if (moveright == true) { lblScroll.Left += 5; } else { lblScroll.Left -= 5; } if (lblScroll.Left <= Convert.ToInt32(this.ClientRectangle.Left)) { moveright = true; } if (lblScroll.Left + lblScroll.Width >= Convert.ToInt32(this.ClientRectangle.Right)) { moveright = false; } } }
1/07/2014
C# Moving Label to the left and right
Subscribe to:
Post Comments (Atom)
This blog gives very important info about .Net Thanks for sharing
ReplyDeleteDot Net Online Course Bangalore