I am developing CF application for a handheld device that
has both touchscreen and keyboard input. For some reason,
the user wants to disable the touchscreen input (i.e., you
can't use a pen to select/navigate between textboxes and
comboboxes on screen). One way is to create custom
controls from textbox and combobox, and derive OnClick
and/or OnMouseDown events to prevents these events being
handled. But I couldn't get my code work:
public class TextBoxEx: System.Windows.Forms.TextBox
{
protected override void OnMouseDown(MouseEventArgs e){
// do nothing here
}
}
Is there anything wrong with my code, or I was thing the
wrong way? Also, is there a better way to achieve my goal
without having to create custom controls for all UI
elements, like SetStyle() in Control class (it is not
supported in CF)?
Thanks for your reply in advance!
|