public partial class Form1 : Form { protected System.Windows.Forms.Timer _timer; static int flaggg; private void Form1_Load(object sender, EventArgs e) { _timer = new System.Windows.Forms.Timer(); this._timer.Interval = 700; this._timer.Start(); this._timer.Tick += new EventHandler(_timer_Tick); } public void _timer_Tick(object sender, EventArgs e) { this.lblmflash.Visible = !this.lblmflash.Visible; // this.lblmflash.Visible = true; lblmflash.ForeColor = Color.DarkGreen; if (flaggg == 1) { Appendlblmflash("Process completed, Send Another Indent"); flaggg = 0; } //this.lblmflash.Visible = false; } public void GetData() // to run server // { string res = System.Text.Encoding.ASCII.GetString(temp); switch (res.Substring(0, 1)) { case "O": if (res.StartsWith("OUTPROCESS")) { flaggg = 1; } break; } } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { Appendlblmflash("Indent in process! Please wait..."); } public void Appendlblmflash(string val) { if (InvokeRequired) { this.Invoke(new Action<string>(Appendlblmflash), new object[] { val }); return; } lblmflash.Text = val; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)