.NET Compact Framework "Gotchyas" for the Beginner
I started an article of things I've found along the way as I start working on smart device apps.
Hopefully it will help others who are just getting started save some time.
I started an article of things I've found along the way as I start working on smart device apps.
Hopefully it will help others who are just getting started save some time.
5 Comments
Richard Blewett said
April 02, 2004
Here are a few more: You can get rid of the "x" in the top right hand window by setting "MinimizeBox"= false for the form. You then get an OK in the top letf hand corner. You should change this back for production as device apps should "stay alive" The Compact Framework Windows Forms does not suppoer alot of events that the full framework does. When you hook up to a control and subscribe to an event - make sure that that particular control does actually fire that event. The compiler will happily accept you code but it may fail at runtime. WHich events aren't supported depends on which service pack you are using. Before you base youur design arouond a .NET facility *make sure* that the compact framework supports it - For example Guid.NewGuid not being supported floored me for a while as it was the PK for the table I was working with. I'll post more about this but probably on my own blog - the CF is great but we're not in Kansas anymore Dorothy - things you expect to work from the full framework just aren't there in teh Compact Framework
HumanCompiler said
April 02, 2004
Those are great, Richard, thanks! How's about once you get your post up, let me know and I'll add it to the helpful links section? btw, with that MinimizeBox thing, couldn't you just put this in the constructor so it only does that when you're developing and doesn't when you release the product, so you don't have to worry about it... #If DEBUG Then Me.MinimizeBox = False #End If Thanks again for more tips! :)
Richard Blewett said
April 02, 2004
Yes of course you could put it in you're ctor - but then the DesignTime proprty doesn't work in the Compact Framework so you'd ave to use a compiler flag (#define, or /d on the command line IIRC) to tell whether it was designtime operation of this was runtime decision. Of course - for controls, the DesignTime property doesn't work in the ctor for the full framework either - you need to implement ISupportInitialize to be able to hook costruction code into a contral that depends on the DesignTime property.
Richard Blewett said
April 02, 2004
Of course if I'd read to the end of your response I'd have seen you were taling ablut teh debug flag not the DesignTime property ;-)
HumanCompiler said
April 02, 2004
It's quite alright ;) I would've just e-mailed you, but I didn't see any place to e-mail you on your blog! :(