override Textbox.OnClick on Windows Mobile CE
I can't catch the OnClick
event on a Windows CE application. The event OnClick
, OnMouseDown
and so on does not exist. Is it possible to catch these events?
protected override void OnClick(EventArgs e)
{
base.OnClick(e);
}
protected开发者_如何学JAVA override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{
base.OnMouseDown(e);
}
this also does not work
You have to subclass the control and watch for the WM_LBUTTONDOWN/ WM_LBUTTONUP messages. Subclassing is covered in MSDN here and the CF team blog here and here. It's even covered (for a textbox click even) on CodeProject here.
精彩评论