Posts tagged ‘queue’

Hooking the keyboard message queue in compact framework code

Here is some nice code to use a keyboard hook implemented in C# for compact framework.

You can use this to catch the funny OS asigned keys like F1, F2, F3, F4, F6 and F7 (Softkey 1 and 2, Phone, End, Volume Up, Volume Down); and last but not least catch the Win Key press.

Continue reading ‘Hooking the keyboard message queue in compact framework code’ »

Windows mobile worker thread to post form data using a queue

A threaded form uploader app in C#

Recently I had to do an app that watches a dir for new files and then uploads them to a DocuShare server using http form post.

I was told, that it is very easy to use form post from code and decided to do the app in C#. Unfortunately, it was not that easy to find code that does uploads via form post, especially for Compact Framework (CF). Maybe it is easier in JAVA, but for JAVA I had to install a JAVA VM onto the windows mobile 6.1 device and for CF all runtimes are already on the device. I searched the internet for valuable form post code in C# and found one titled ‘C# is the better JAVA‘.
OK, this code looked good and i tried it within Compact Framework. After changing the functions to ones available in CF, the code runs fine. As you know, CF does not have the same full featured functions as the .Net Framework for PCs.

Continue reading ‘Windows mobile worker thread to post form data using a queue’ »