Hi,
Write code like below.
Timer timer = new Timer();
public FormWithTimer()
{
timer.Tick += new EventHandler(Method_Do);
timer.Interval = (500) * (1);
timer.Enabled = true;
timer.Start();
}
public void Method_Do(object sender, EventArgs e)
{
if (checkBox2.Checked)
{
PointOnTerrainGE pot = ge.GetPointOnTerrainFromScreenCoords(0, 0);
label1.Text = pot.Altitude.ToString();
label2.Text = pot.Latitude.ToString();
}
}
Hope this will help you.