0
I assume this is related to your other thread. It is still not clear if the "Save As" dialog is in your application (process) or in a different process.
0
i use timer but it enters every program on windows that mouse go move on!
because the command <sendkey.send("{ENTER}")> is in the timer tick event!
and it execute this command on all programs.
i thinks when i put the code in a timer thick event, it can't detect "Save Az" window ! but i want when it detect a save as window then enters it.
any idea?!
0
Bahar,
Use timer to execute code in background:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
_timer = new Timer();
_timer.Interval = 1000;
_timer.Tick += new EventHandler(TimerTick);
_timer.Start();
}
void TimerTick(object sender, EventArgs e)
{
Text = DateTime.Now.ToLongTimeString();
}
private System.Windows.Forms.Timer _timer;
Your code should go into TimerTick method. This method will be executed on a UI thread so you're free to modify form's contents at will. Timer will execute once every second. You can change this interval by modifying the line:
_timer.Interval = 1000;
Interval is measured in milliseconds.
Zoran