There is no "MouseClick" event in the Compact Framework so change it to "MouseDown" (carefully note the case) at line 24. This should now work both optimised and non-optimised. The "splodge" test always misses (on my Axim X30 anyway) - probably because the RGB value returned on the device don't match the cRED constant. This is a known "feature" of devices as they have a limited colour palette for their displays, you will have to work that one through yourself.
When compiled with nonoptimized I get the error "Error loading program ... Door.dll".
If this persists I have no idea why. It works fine on my device, both legacy compiled and IDE, with that single change