"Celine" <sq*****@yahoo.fr> wrote in message
news:f3*************************@posting.google.co m...
This question might be very trivial but how can I check that a button
is clicked. Is there a way to do something like:
if(button is clicked)
{
...
}
Thanks
Celine
Assuming you're working in Visual Studio .NET, the click event is the
default event for a Button object, and you can obtain a proper event
procedure shell by double-clicking on the button in question, in design
view.
private void button1_Click(object sender, System.EventArgs e)
{
}
Place the code you want to execute when the button is clicked in this event
procedure.
Caveat: this example is from a Windows application where the name of the
button object is button1.
Hope this helps.
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.