Hi all. Thanks for posting. First on your answer: The exceptions and
buttons has already been mapped and there is no need to tap an 'ok' on
the screen. All that has been used by keyup events because it has an
alphanumeric keaboard and booleans to emulate the tap of the 'ok' on
the exception box. I only need a way to disable the taps on the screen
for my app for the user so that he can't accidentally tap on another
place that he isn't supposed to. At the moment the app is working fully
on the pda and all data and clicks and enters and so on ain't done on
the screen, its been done on the keyboard of the pda. So in all I do
not need the touch screen and therefore I need to disable the touch
taps on the screen even if it is only my app. What I need to do is for
the app to get only input from the keyboard(which also works on getting
exceptions and messageboxes and closing the app by using the Esc on the
pda keyboard and so on) and not by the touch screen in short. O and
what is this IMessageFilter can you define it for me please?
If you want I'll show you some code on the pda::
private void txtWaybillNo_KeyUp(object sender,
System.Windows.Forms.KeyEventArgs e)
{
if (!ErrorOKPressed)
{
if (e.KeyValue == 13 || e.KeyValue == 40) //Enter /Down Arrow
{
Cursor.Current = Cursors.WaitCursor;
if (GetWaybill())
{
Cursor.Current = Cursors.Default;
ErrorOKPressed = false;
this.txtPartNo.Focus();
}
else
{
Cursor.Current = Cursors.Default;
ErrorOKPressed = true;
this.txtWaybillNo.Focus();
}
}
else if (e.KeyValue == 38) // Up Arrow
{
Cursor.Current = Cursors.Default;
ErrorOKPressed = false;
this.txtEmployee.Focus();
}
else if (e.KeyValue == 27) // Esc key
{
Cursor.Current = Cursors.Default;
if (MessageBox.Show("Are you sure you wish to return to the
department
menu?","Confirm",MessageBoxButtons.YesNo,MessageBoxIcon.Question,MessageBoxDefaultButton.Button1)
== DialogResult.Yes)
{
ErrorOKPressed = true;
this.Close();
this.Dispose();
}
else
{
Cursor.Current = Cursors.Default;
ErrorOKPressed = true;
this.txtWaybillNo.Focus();
}
}
}
else
{
Cursor.Current = Cursors.Default;
this.txtWaybillNo.Focus();
ErrorOKPressed = false;
}
See the ErrorOKPress is the bool that simulate the enter key on a
messagebox
EX. bool true = enter pressed / OK Tapped
bool false = enter not pressed / OK not Tapped
and I am also using the keyUp event of an textbox and using the
e.keyvalues that has been pressed on the keyboard So in addition I do
not need the touch screen, 1) Because I have a full keyboard on the pda
built in, 2)The user is not allowed to use the touch screen.
Thanks on advance and for a solution on this problem
Echo