Board index » cppbuilder » Simulate a button click

Simulate a button click

If I want to use a timer component, and I want the program to act as if
a button was clicked when the timer times out, how do I simulate the
clicking of the button? Thanks.
--
Richard B. Hall, Software Design Team (ED14)
544-3789 (voice)
544-8480 (fax)
richard.b.h...@msfc.nasa.gov
 

Re:Simulate a button click


In the timer's OnTimer handler,

void __fastcall TForm1::Timer1Timer(TSender *Sender)
{
Button1Click(Sender);

Quote
}

Re:Simulate a button click


Buttons have a Click() method:

MyButton->Click();

Gambit

Quote
"Richard Hall" <richard.b.h...@msfc.nasa.gov> wrote in message

news:390F40FB.E9214207@msfc.nasa.gov...
Quote
> If I want to use a timer component, and I want the program to act as if
> a button was clicked when the timer times out, how do I simulate the
> clicking of the button? Thanks.

Other Threads