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 ChaudharyPosted Oct 20, 2012, 9:24 AM
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;
}
}
}
selva kumarPosted Oct 20, 2012, 12:46 PM
Sudhakar ChaudharyPosted Oct 20, 2012, 10:34 AM
selva kumarPosted Oct 20, 2012, 10:12 AM
selva kumarPosted Oct 20, 2012, 9:10 AM
VulpesPosted Oct 20, 2012, 7:00 AM
The skeleton handlers for the Form.MouseMove event and the Timer.Tick event should of course be added from the VS designer: