Disabling the touch screen for Pocket PC

E

Echo

Hi all. Wanted to know if someone could help me on a little problem. I
am currently creating a scanning program in Visual Studio C# .Net and
was hoping someone could help me in code on how to disable the touch
screen for the application. If, only the application or if possible the
device itself. I am running Visual Studios C#.Net and the device has
pocket PC 2003.Most of the code I got was to do with Windows CE which
doesn't work because it is Windows Mobile that's running. If someone
could help me I would greatly appreciate it.

Thanks on advance.
 
C

Chris Tacke, eMVP

For the entire device sounds like a really bad idea - that's a brick in the
making (what happens if you get an exception and there's a need to tap an
"ok" button?). For your app you could implement an IMessageFilter.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
 
E

Echo

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
 
G

Guest

An IMessageFilter implementation will do this. Sergey Bogdanov has a sample
somewhere - Google will be able to find it.

-Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top