Button Click Simulation

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hello.

How can I simulate button click in Compact Framework?
Why there is no PerformClick method of the Button class?

Thank you.
 
Hi Dave,
you can add PerformClick method to your own button control

public class MyButton : System.Windows.Forms.Button
{
public MyButton() { }

public void PerformClick()
{
base.OnClick(new System.EventArgs());
}

}

or you can use ButtonEx control from OpenNETCF namespace, which has a lot of
other useful functionalities (look at www.opennetcf.org ).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top