开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜