开发者

override Textbox.OnClick on Windows Mobile CE

开发者 https://www.devze.com 2023-03-05 04:13 出处:网络
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?

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

精彩评论

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