Signature Capture?


Active member
Feb 7, 2005
Programming Experience
Hi Everyone,
I have been working through the Microsoft Article on signature capture for the pocket pc. I cant get it to load correctly for a windows device. I hace stripped all the stuff out of the application about the networking etc, but when I try to load the application i get an error straight away about at the start of the main class stating 'An unhandled exception of type 'System.NullReferenceException' occurred in System.Windows.Forms.dll'. This error occurs when deploying to the device. If I deploy it to the emulator it gets past that part but then falls over in the global when trying to execute the code below-

Shared Function LoadImage(ByVal type As System.Type, ByVal imageName As String) As Bitmap

Return New Bitmap(System.Reflection.Assembly.GetExecutingAssembly(). _

GetManifestResourceStream("\Program Files\sig-cap\" & imageName))

End Function

Does anyone know if the pocket pc screens work diferently to the windows 4.2 screens?

Anyone got any ideas or know where I can get another example of this code.

There are some subtle differences in the way Forms work under PPC and CE.NET.

The most likely reason for the NullReferenceException is if you are using an InputPanel. Basically, an InputPanel will generate the above if the form doesnt have a MainMenu attached to it (under PPC), but will be okay under CE.NET.

There are a few others, but let me know if the above isnt it.

On your other problem.. is the resource embedded? If so you may need to prepend the namespace name to the file name otherwise it wont find it.

Probabably best to list all the embedded resources and look at the name just to make sure...