Signature Capture?

dmc1980

Active member
Joined
Feb 7, 2005
Messages
33
Programming Experience
5-10
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 ce.net 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-


Public
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 ce.net 4.2 screens?

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

Cheers
 
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...

Cheers

Greg
 
Back
Top