if i run the application after 2 min my textbox1 & label1 become invisible... if i move the mouse pointer again textbox1 & label become visible ... now what i need is after 2 min again the textbox1 & label1 need to invisible and if i move mouse pointer it should visible again......
this process should repeat continuously until i close application...
Loading


Sudhakar ChaudharyRank #1,379 · 1.2K reputationPosted Oct 20, 2012, 5:24 AM EDT
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace lable
{
public partial class Form1 : Form
{
Timer timer1 = new Timer();
int count;
public Form1()
{
InitializeComponent();
timer1.Tick += new EventHandler(timer1_Tick);
timer1.Interval = 10000;
}
void timer1_Tick(object sender, EventArgs e)
{
if (count == 2)
{
textBox1.Visible = false;
label1.Visible = false;
count = 0;
}
count++;
}
private void Form1_Load(object sender, EventArgs e)
{
timer1.Start();
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
textBox1.Visible = true;
label1.Visible = true;
}
}
}
VulpesRank #55 · 29.2K reputationPosted Oct 20, 2012, 3:00 AM EDT
The skeleton handlers for the Form.MouseMove event and the Timer.Tick event should of course be added from the VS designer:
selva kumar48 reputationPosted Oct 20, 2012, 5:10 AM EDT
selva kumar48 reputationPosted Oct 20, 2012, 6:12 AM EDT
Sudhakar ChaudharyRank #1,379 · 1.2K reputationPosted Oct 20, 2012, 6:34 AM EDT
selva kumar48 reputationPosted Oct 20, 2012, 8:46 AM EDT