using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace GForms { public partial class Form1 : Form { GLabel lblTest = new GLabel(); public Form1() { InitializeComponent(); lblTest.Text = "Test Label"; } private void Form1_Load(object sender, EventArgs e) { gForm1.MainControl.Controls.Add(lblTest); } int direction = 3; private void timer1_Tick(object sender, EventArgs e) { lblTest.Left += direction; if (lblTest.Left < 0) { lblTest.Left = 0; direction *= -1; } else if (lblTest.Left + lblTest.Width > gForm1.Width) { direction *= -1; lblTest.Left = gForm1.Width - lblTest.Width; } } } }