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 ).
 
Back
Top