Sunday 13 December 2009

101 Windows Mobile and Compact Framework Resources - Part 101

Next up is my website Smart Mobile Device.
http://www.smartmobiledevice.co.uk/
It includes various samples, how to guides, links and blogs.

101 Windows Mobile and Compact Framework Resources - Part 100

Next up is a MSDN article entitles "Bar Code Scanners with the .NET Compact Framework".
http://msdn.microsoft.com/en-us/library/aa446489.aspx

101 Windows Mobile and Compact Framework Resources - Part 99

Next up is Simon Hart's Blog.
http://www.simonrhart.com/
Particular highlights are :-
http://www.simonrhart.com/2008/05/memory-management-on-windows-mobile-61.html
http://www.simonrhart.com/2008/10/comprehension-vs-lambda-queries.html
http://www.simonrhart.com/2008/07/linq-level-100.html
http://www.simonrhart.com/2008/07/linq-to-objects-on-cf.html
http://www.simonrhart.com/search/label/LINQ

101 Windows Mobile and Compact Framework Resources - Part 98

Next up is a MSDN article entitled "How To: Programmatically Control the Windows Mobile Device Emulators from .NET".
http://msdn.microsoft.com/en-us/library/bb936678.aspx

101 Windows Mobile and Compact Framework Resources - Part 97

Next up is In The Hand, which specialise in .NET Compact Framework development for handheld computer devices.
http://inthehand.com/

101 Windows Mobile and Compact Framework Resources - Part 96

Next up is a forum thread entitled "Windows Mobile managed graphics APIs?".
http://www.gamedev.net/community/forums/topic.asp?topic_id=540284

101 Windows Mobile and Compact Framework Resources - Part 95

Next up is Nick Randolph's Blog.
http://community.softteq.com/blogs/nick/default.aspx
Particular highlights are :-
http://community.softteq.com/blogs/nick/archive/2009/06/10/accessing-data-with-windows-mobile-6-5-widgets-ajax-4-entity-framework-and-ado-net-data-services.aspx

101 Windows Mobile and Compact Framework Resources - Part 94

Next up is a Windows Phone Blog post entitled "Using Custom Icons in Windows Mobile 6.5".
http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/05/using-custom-icons-in-windows-mobile-6-5.aspx

101 Windows Mobile and Compact Framework Resources - Part 93

Next up is a Code Project article entitled "Advanced P/Invoke on the Microsoft .NET Compact Framework".
http://www.codeproject.com/KB/mobile/compframe2.aspx

101 Windows Mobile and Compact Framework Resources - Part 92

Next up is the Windows Mobile and Accelerometers page.
http://code.msdn.microsoft.com/mag200909WiMoAccel

101 Windows Mobile and Compact Framework Resources - Part 91

Next up is a screencast presented by Daniel Moth covering POOM.
http://www.microsoft.com/uk/msdn/nuggets/nugget/190/Windows-Mobile-Managed-APIs-POOM.aspx

Friday 11 December 2009

101 Windows Mobile and Compact Framework Resources - Part 90

Next up is a forum thread entitled "What’s a nice way of building a wParam or lParam in C#? (Something friendlier than shift operators?)".
http://stackoverflow.com/questions/202330/whats-a-nice-way-of-building-a-wparam-or-lparam-in-c-something-friendlier-t

101 Windows Mobile and Compact Framework Resources - Part 89

Next up is the Windows Mobile Line of Business Solution Accelerator 2008.
http://www.microsoft.com/DownLoads/details.aspx?FamilyID=428e4c3d-64ad-4a3d-85d2-e711abc87f04&displaylang=en

101 Windows Mobile and Compact Framework Resources - Part 88

Next up is the Microsoft® Windows Mobile® 6 Consumer Solution Accelerator.
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=acb764df-ef79-4b96-a47f-6c7d916473e5

101 Windows Mobile and Compact Framework Resources - Part 87

Next up is a MSDN Magazine article entitled "Calling Win32 DLLs in C# with P/Invoke".
http://msdn.microsoft.com/en-us/magazine/cc164123.aspx
Although not directly mentioning Windows Mobile or the Compact Framework, the techniques mentioned in the article are very relevant to these areas.

101 Windows Mobile and Compact Framework Resources - Part 86

Next up is a MSDN How To entitled "How To: Intercept Incoming Short Message System (SMS) Messages".
http://msdn.microsoft.com/en-us/library/bb932385.aspx

101 Windows Mobile and Compact Framework Resources - Part 85

Next up is a blog post entitled "Control.DrawToBitmap for .NET Compact Framework".
http://www.cnblogs.com/shark2076/archive/2007/12/06/985230.html

Thursday 10 December 2009

101 Windows Mobile and Compact Framework Resources - Part 84

Next up is a MSDN How To entitled "How to: Create a Database by Using the Engine Object (Programmatically)".
http://msdn.microsoft.com/en-us/library/ms171966.aspx

101 Windows Mobile and Compact Framework Resources - Part 83

Next up is a blog post entitled "Visual Studio 2005 Device Emulator and Internet Connectivity".
http://blogs.msdn.com/akhune/archive/2005/11/16/493329.aspx

101 Windows Mobile and Compact Framework Resources - Part 82

Next up is a blog post entitled "SQL Server CE 3.5 SELECT TOP".
http://codequest.blogspot.com/2008/05/sql-server-ce-35-select-top.html

101 Windows Mobile and Compact Framework Resources - Part 81

Next up is a SQLCE 3.5 Database Tutorial.
http://dotnetperls.com/sqlce-database-use

101 Windows Mobile and Compact Framework Resources - Part 80

Next up is an article entitled "Development Considerations With The .NET Compact Framework".
http://kylecordes.com/net-compact-framework-development/

101 Windows Mobile and Compact Framework Resources - Part 79

Next up is Martin Plante's Blog.
http://www.slimcode.com/cs/blogs/martin/
Particular highlights are :-
http://www.slimcode.com/cs/blogs/martin/archive/2009/09/25/performance-tests-using-bitmap-with-different-pixelformat-under-the-net-cf.aspx

101 Windows Mobile and Compact Framework Resources - Part 78

Next up is the Windows MarketPlace for Mobile.
http://developer.windowsphone.com/marketplace.aspx

Tuesday 8 December 2009

101 Windows Mobile and Compact Framework Resources - Part 77

Next up is the Windows Mobile Developer Facebook Group.
http://www.facebook.com/wmdev?ref=ts

101 Windows Mobile and Compact Framework Resources - Part 76

Next up is a blog posting from the Visual Studio for Devices Blog, detailing the Platform Verification Task.
http://blogs.msdn.com/vsdteam/archive/2006/09/15/756400.aspx

101 Windows Mobile and Compact Framework Resources - Part 75

Next up is the .NET Compact Framework Facebook Group.
http://www.facebook.com/group.php?gid=2227393283&ref=ts

101 Windows Mobile and Compact Framework Resources - Part 74

Next up is Building Solutions with the Microsoft.NET Compact Framework: Architecture and Best Practices for Mobile Development.
http://www.amazon.co.uk/Building-Solutions-Microsoft-NET-Compact-Framework/dp/0321197887/ref=sr_1_11?ie=UTF8&s=books&qid=1259490708&sr=1-11

101 Windows Mobile and Compact Framework Resources - Part 73

Next up is The Definitive Guide to the .NET Compact Framework.
http://www.amazon.co.uk/Definitive-Guide-Compact-Framework-Professionals/dp/1590590953/ref=sr_1_8?ie=UTF8&s=books&qid=1259490708&sr=1-8

101 Windows Mobile and Compact Framework Resources - Part 72

Next up is SQL Server CE Database Development with the .NET Compact Framework.
http://www.amazon.co.uk/Database-Development-Compact-Framework-Experts/dp/1590591194/ref=sr_1_7?ie=UTF8&s=books&qid=1259490708&sr=1-7

101 Window Mobile and Compact Framework Resources - Part 71

Next up is .Net Compact Framework Programming with C#.
http://www.amazon.co.uk/Compact-Framework-Programming-Microsoft-NET-Development/dp/0321174038/ref=sr_1_5?ie=UTF8&s=books&qid=1259490708&sr=1-5

Monday 7 December 2009

101 Windows Mobile and Compact Framework Resources - Part 70

Next up is the Windows Mobile Team Blog.
http://blogs.msdn.com/windowsmobile/
Particular highlights are :-
http://blogs.msdn.com/windowsmobile/archive/2006/01/09/510997.aspx
http://blogs.msdn.com/windowsmobile/archive/2004/07/06/174568.aspx
http://blogs.msdn.com/windowsmobile/archive/2004/04/22/118603.aspx

101 Windows Mobile and Compact Framework Resources - Part 69

Next up is Scott Holden's Blog.
http://blogs.msdn.com/scottholden
Particular highlights are :-
http://blogs.msdn.com/scottholden/archive/2006/08/22/713056.aspx

101 Windows Mobile and Compact Framework Resources - Part 68

Next up is Loke Uei Tan's Blog.
http://blogs.msdn.com/lokeue
Particular highlights are :-
http://blogs.msdn.com/lokeuei/archive/2008/05/14/enable-remote-debugging-on-netcf-apps.aspx
http://blogs.msdn.com/lokeuei/archive/2007/10/04/understanding-virtual-memory-for-windows-mobile.aspx

101 Windows Mobile and Compact Framework Resources - Part 67

Next up is The Windows Mobile RSS (Reed and Steve Stuff) Feed.
http://blogs.msdn.com/hegenderfer/
Particular highlights are :-
http://blogs.msdn.com/hegenderfer/archive/2007/08/31/slaying-the-virtual-memory-monster.aspx

101 Windows Mobile and Compact Framework Resources - Part 66

Next up is Steven Pratschner's Blog.
http://blogs.msdn.com/stevenpr/
Particular highlights are :-
http://blogs.msdn.com/stevenpr/archive/2008/05/08/the-clr-profiler-for-the-net-compact-framework-series-index.aspx
http://blogs.msdn.com/stevenpr/archive/2007/10/26/what-s-new-in-the-remote-performance-monitor-for-net-compact-framework-3-5.aspx
http://blogs.msdn.com/stevenpr/archive/2006/04/17/577636.aspx

101 Windows Mobile and Compact Framework Resources - Part 65

Next up is Rob Tiffany's Blog.
http://blogs.msdn.com/robtiffany/
Particular highlights are :-
http://blogs.msdn.com/robtiffany/archive/2009/10/02/the-hidden-message-queue-on-your-windows-phone.aspx
http://blogs.msdn.com/robtiffany/archive/2009/04/09/memmaker-for-the-net-compact-framework.aspx
http://blogs.msdn.com/robtiffany/archive/2008/10/09/listen-to-rob-s-windows-mobile-interview-on-net-rocks.aspx

101 Windows Mobile and Compact Framework Resources - Part 64

Next up is Richard Jones' Blog.
http://geekswithblogs.net/MobileLOB/Default.aspx
Particular highlights are :-
http://geekswithblogs.net/MobileLOB/archive/2009/01/29/quickly-sending-email-from-compact-framework.aspx

101 Windows Mobile and Compact Framework Resources - Part 63

Next up is Amit Chopra's Blog.
http://blogs.msdn.com/amit_chopra/default.aspx
Particular highlights are :-
http://blogs.msdn.com/amit_chopra/archive/2007/12/13/tools-and-resources-for-windows-mobile-isvs.aspx

101 Windows Mobile and Compact Framework Resources - Part 62

Next up is the Mobile Developer Group Team Blog.
http://blogs.msdn.com/mobiledev/
Particular highlights are :-
http://blogs.msdn.com/mobiledev/archive/2008/12/01/netcf-applications-start-up-policy-and-configuration-options.aspx
http://blogs.msdn.com/mobiledev/archive/2008/11/25/checkout-these-two-articles.aspx
http://blogs.msdn.com/mobiledev/archive/2008/05/14/crash-course-in-developing-applications-for-windows-mobile.aspx

101 Windows Mobile and Compact Framework Resources - Part 61

Next up is the Enterprise Mobile Blog.
http://blog.enterprisemobile.com/
Particular highlights are :-
http://blog.enterprisemobile.com/2008/05/windows-mobile-device-emulator-2/
http://blog.enterprisemobile.com/2008/07/using-htc-diamonds-sensor-sdk-from-managed-code/

101 Windows Mobile and Compact Framework Resources - Part 60

Next up is Maarten Struys' Website and Blog.
http://www.dotnetfordevices.com
Particular highlights are :-
http://www.dotnetfordevices.com/code_snippets.html
http://www.dotnetfordevices.com/articles/50.html
http://www.dotnetfordevices.com/articles/52.html

101 Windows Mobile and Compact Framework Resources - Part 59

Next up is Constanze Roman's Blog.
http://blogs.msdn.com/croman/
Particular highlights are :-
http://blogs.msdn.com/croman/archive/2009/05/15/windows-mobile-track-for-rampup-has-been-launched.aspx

101 Windows Mobile and Compact Framework Resources - Part 58

Next up is Sachin's Blog.
http://palewar.blogspot.com/
Particular highlights are :-
http://palewar.blogspot.com/2008/04/do-you-need-start-button-on-windows.html

101 Windows Mobile and Compact Framework Resources - Part 57

Next up is Raffaele Limosani's Blog.
http://blogs.msdn.com/raffael/
Particular highlights are :-
http://blogs.msdn.com/raffael/archive/tags/Memory/default.aspx
http://blogs.msdn.com/raffael/archive/2008/11/18/troubleshooting-crashes-on-windows-mobile.aspx

http://blogs.msdn.com/raffael/archive/2008/03/01/supporting-kiosk-applications-on-windows-mobile-technically-achievable-vs-supported.aspx

101 Windows Mobile and Compact Framework Resources - Part 56

Next up is Jim Wilson's Blog.
http://www.pluralsight.com/community/blogs/jimw/
Particular highlights are :-
http://www.pluralsight.com/community/blogs/jimw/archive/2008/02/27/50325.aspx
http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/18/50753.aspx
http://www.pluralsight.com/community/blogs/jimw/archive/2007/04/20/46866.aspx

Sunday 6 December 2009

101 Windows Mobile and Compact Framework Resources - Part 55

Next up is Shreeram's Blog.
http://shreerams.blogspot.com
Particular highlights are :-
http://shreerams.blogspot.com/2008/02/windows-mobile-development-tips-n.html

101 Windows Mobile and Compact Framework Resources - Part 54

Next up is David Kline's Blog.
http://blogs.msdn.com/davidklinems/
Particular highlights are :-
http://blogs.msdn.com/davidklinems/archive/2005/10/04/476988.aspx

101 Windows Mobile and Compact Framework Resources - Part 53

Next up is a blog post entitled "Memory Architecture of Windows Mobile 5.0".
http://hariexcel.spaces.live.com/blog/cns!D1237283CA43FD1D!176.entry

101 Windows Mobile and Compact Framework Resources - Part 52

Next up is Anthony Wong's Blog.
http://blogs.msdn.com/anthonywong/
Particular highlights are :-
http://blogs.msdn.com/anthonywong/archive/2006/03/13/550686.aspx

101 Windows Mobile and Compact Framework Resources - Part 51

Next up is a blog post entitled "Getting help from the Doctor (Dr Watson that is!)".
http://blogs.msdn.com/hopperx/archive/2005/10/07/478306.aspx

Saturday 5 December 2009

101 Windows Mobile and Compact Framework Resources - Part 50

Next up is Programming .NET Compact Framework 3.5 written by Paul Yao and David Durant.
http://www.amazon.co.uk/Programming-Compact-Framework-Microsoft-Development/dp/0321573587/ref=sr_1_1?ie=UTF8&s=books&qid=1259490708&sr=1-1

101 Windows Mobile and Compact Framework Resources - Part 49

Next up is a MSDN article entitled "Building .NET Compact Framework 2.0 Applications That Have .NET Compact Framework 1.0 Code Compatibility ".
http://msdn.microsoft.com/en-us/library/bb435027.aspx

101 Windows Mobile and Compact Framework Resources - Part 48

Next up is a blog posting from the Visual Studio for Devices Blog, detailing how to establish a connection via Active Sync to the Emulator.
http://blogs.msdn.com/vsdteam/archive/2005/10/07/478295.aspx

101 Windows Mobile and Compact Framework Resources - Part 47

Next up is a MSDN article entitled "How to: Display a Gradient Fill".
http://msdn.microsoft.com/en-us/library/ms229655(VS.80).aspx

101 Windows Mobile and Compact Framework Resources - Part 46

Next up is a page from the MSDN article which is useful when using XML provisioning, entitled "Remove One or More Settings from the Device".
http://msdn.microsoft.com/en-us/library/ms890085.aspx

101 Windows Mobile and Compact Framework Resources - Part 45

Next up is a MSDN article entitled "Building and Testing Windows Mobile-based Pocket PC Help".
http://msdn.microsoft.com/en-us/library/ms889525.aspx

101 Windows Mobile and Compact Framework Resources - Part 44

Next up is a selection of .NET Compact Framework Samples from MSDN.
http://www.microsoft.com/downloads/en/results.aspx?pocId=&freetext=.NET%20Compact%20Framework%20Sample&DisplayLang=en

101 Windows Mobile and Compact Framework Resources - Part 43

Next up is Alex Yakhnin's MSDN Blog.
http://blogs.msdn.com/priozersk/
Particular highlights are :-
http://blogs.msdn.com/priozersk/archive/2009/12/03/a-few-tips-on-customizing-listview-in-wm-6-5.aspx

101 Windows Mobile and Compact Framework Resources - Part 42

Next up is Mike Francis' Blog.
http://blog.mjfnet.com/Blog/
Particular highlights are :-
http://blog.mjfnet.com/blog/FormatPage.aspx?path=content/projects/resources/resources.format.html

101 Windows Mobile and Compact Framework Resources - Part 41

Next up is Joel Ivory Johnson's Blog.
http://www.j2i.net/BlogEngine/
Particular highlights are :-
http://www.j2i.net/BlogEngine/post/2009/11/24/Why-Wont-my-Application-Show-in-the-Marketplace.aspx
http://www.j2i.net/BlogEngine/post/2009/11/09/Sleeping-for-Zero-Seconds.aspx
http://www.j2i.net/BlogEngine/post/2009/01/25/Custom-Actions-in-a-Cab-Installation.aspx
http://www.j2i.net/BlogEngine/post/2008/11/07/Detecting-Storage-Cards.aspx
http://www.j2i.net/BlogEngine/post/2008/08/27/Power-Management-Article-Published.aspx

Friday 4 December 2009

101 Windows Mobile and Compact Framework Resources - Part 40

Next up is a StackOverflow.com forum thread entitled ".Net Compact Framework Tips, Tricks, and Gotchas".
http://stackoverflow.com/questions/363158/net-compact-framework-tips-tricks-and-gotchas/363197#363197

101 Windows Mobile and Compact Framework Resources - Part 39

Next up is another Ruslan Trifonov's Blog.
http://dotnetslackers.com/Community/blogs/ruslantrifonov/
Particular highlights are :-
http://dotnetslackers.com/Community/blogs/ruslantrifonov/archive/2007/07/10/_2200_How-To_2200_-Series_3A00_-Retrieving-IMSI-and-IMEI-on-Windows-Mobile.aspx

101 Windows Mobile and Compact Framework Resources - Part 38

Next up is a collection of webcasts covering the Compact Framework :-
http://msevents.microsoft.com/CUI/SearchDisplay.aspx?culture=en-US&evtTypHero=3#culture=en-US;sortKey=;sortOrder=;pageEvent=false;hdnInitialCount=;kwdAny=compact%20framework;eventType=3;searchcontrol=yes;s=1

101 Windows Mobile and Compact Framework Resources - Part 37

Next up is a series of webcasts entitled "24 Hours of Windows Mobile Application Development".
http://blogs.msdn.com/windowsmobile/archive/2008/12/22/24-hours-of-windows-mobile-application-development.aspx

101 Windows Mobile and Compact Framework Resources - Part 36

Next up is Peter Nowak's Blog.
http://blogs.compactframework.de/Peter.Nowak/
Particular highlights are :-
http://blogs.compactframework.de/Peter.Nowak/2009/07/10/Reading+Environment+Variables+And+Additional+EnvironmentSpecialFolder+Settings+From+NET+CF.aspx

Thursday 3 December 2009

101 Windows Mobile and Compact Framework Resources - Part 35

Next up is a set of Video Tutorials covering subjects such as An Introduction To Developing with Microsoft Windows Mobile 6 and Using Setup Projects to Deploy Windows Mobile 5.0 Applications.
http://msdn.microsoft.com/en-us/windowsmobile/bb264341.aspx

101 Windows Mobile and Compact Framework Resources - Part 34

Next up is a MSDN article entitled "Developing Widgets for Windows Mobile 6.5 ".
http://msdn.microsoft.com/en-us/library/dd721906.aspx

101 Windows Mobile and Compact Framework Resources - Part 33

Next up is a MSDN article entitled "A Technical Comparison of Replication and Remote Data Access Features in SQL Server 2005 Mobile Edition 3.0".
http://msdn.microsoft.com/en-us/library/ms345126(SQL.90).aspx

101 Windows Mobile and Compact Framework Resources - Part 32

Next up is a Forum post entitled "SendKeys in Compact Framework 2.0".
http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/d5d6097e-f221-452e-8b65-5659e2c9faaa

101 Windows Mobile and Compact Framework Resources - Part 31

Next up is a MSDN article entitled "Developing Screen Orientation-Aware Applications".
http://msdn.microsoft.com/en-us/library/ms839354.aspx

Wednesday 2 December 2009

101 Windows Mobile and Compact Framework Resources - Part 30

Next up is Dale Lane's Blog.
http://dalelane.co.uk/blog/
Particular highlights are :-
http://dalelane.co.uk/blog/?p=241

101 Windows Mobile and Compact Framework Resources - Part 29

Next up is a MSDN article entitled "An Introduction to P/Invoke and Marshaling on the Microsoft .NET Compact Framework".
http://msdn.microsoft.com/en-us/library/aa446536.aspx

101 Windows Mobile and Compact Framework Resources - Part 28

Next up is a MSDN article entitled "Using the FakeGPS Utility".
http://msdn.microsoft.com/en-us/library/bb158722.aspx

101 Windows Mobile and Compact Framework Resources - Part 27

Next up is a MSDN article entitled "How to: Attach to Managed Device Processes".
http://msdn.microsoft.com/en-us/library/b1ksfbk7(VS.80).aspx

101 Windows Mobile and Compact Framework Resources - Part 26

Next up is a blog post by the Windows CE Network Team "Introduction to Connection Manager".
http://blogs.msdn.com/cenet/archive/2006/06/06/620360.aspx

101 Windows Mobile and Compact Framework Resources - Part 25

Next up is Chris Tacke's Blog.
http://blog.opennetcf.com/ctacke/
Particular highlights are :-
http://blog.opennetcf.com/ctacke/2007/05/16/SDFSampleCustomDrawingAListAndViewingAllNetworkAdaptersToo.aspx
http://blog.opennetcf.com/ctacke/2009/03/31/GettingAnSDCardSerialNumberInTheCompactFramework.aspx

101 Windows Mobile and Compact Framework Resources - Part 24

Next up is the OpenNETCF Desktop Communication Library. This is used to allow communication between Desktop and Device using RAPI.
http://rapi.codeplex.com/

101 Windows Mobile and Compact Framework Resources - Part 23

Next up is Neil Cowburn's Blog.
http://blog.opennetcf.com/ncowburn/
Particular highlights are :-
http://blog.opennetcf.com/ncowburn/2008/06/03/HOWTORetrieveTheICCIDUsingTheSIMManagerAPIs.aspx
http://blog.opennetcf.com/ncowburn/2008/06/04/FollowupRetrieveTheICCIDInC.aspx

101 Windows Mobile and Compact Framework Resources - Part 22

Next up is Marcus Perryman's Blog.
http://blogs.msdn.com/marcpe/
Particular highlights are :-
http://blogs.msdn.com/marcpe/archive/2009/06/29/let-s-talk-about-touch-part1.aspx
http://blogs.msdn.com/marcpe/archive/2006/03/03/542941.aspx

101 Windows Mobile and Compact Framework Resources - Part 21

Next up is Koushik Dutta's Blog.
http://www.koushikdutta.com
Particular highlights are :-
http://www.koushikdutta.com/2008/07/playing-mp3s-and-wmas-using-net-compact.html
http://www.koushikdutta.com/2008/07/using-htc-touch-diamond-sensor-sdk-from.html

Tuesday 1 December 2009

101 Windows Mobile and Compact Framework Resources - Part 20

Next up is a blog post by the .NET Compact Framework team entitled ".Net Compact Framework V2 Service Pack 1 Data Grid control enhancements."
http://blogs.msdn.com/netcfteam/archive/2006/04/25/583542.aspx

101 Windows Mobile and Compact Framework Resources - Part 19

Next up is Mark Arteaga's Blog.
http://blog.markarteaga.com/
Particular highlights are :-
http://blog.markarteaga.com/DrawingRotatedTextInNETCompactFramework20.aspx

101 Windows Mobile and Compact Framework Resources - Part 18

Next up is Ruslan Trifonov's Blog.
http://xman892.blogspot.com
Particular highlights are :-
http://xman892.blogspot.com/2009/02/windows-mobile-and-net-compact.html

101 Windows Mobile and Compact Framework Resources - Part 17

Next up is Alex Yakhnin's OpenNETCF Blog.
http://blog.opennetcf.com/ayakhnin/
Particular highlights are :-
http://blog.opennetcf.com/ayakhnin/PermaLink,guid,9a6a541c-9109-4748-b3e0-6f8d0ed2f95f.aspx
http://blog.opennetcf.com/ayakhnin/PermaLink,guid,34221459-8db8-41ef-91c7-5514eade8fca.aspx
http://blog.opennetcf.com/ayakhnin/PermaLink,guid,70c9a4c0-57e2-45fe-b106-941250744266.aspx

101 Windows Mobile and Compact Framework Resources - Part 16

Next up is the .NET Compact Framework Technology Samples :-
http://msdn.microsoft.com/en-us/library/fkack1sx.aspx

101 Windows Mobile and Compact Framework Resources - Part 15

Next up is Peter Foot's Blog.
http://peterfoot.net/
Particular highlights are :-
http://peterfoot.net/VibrationAndPocketPCDevices.aspx
http://peterfoot.net/DetermineWM50AKUVersionProgrammatically.aspx

101 Windows Mobile and Compact Framework Resources - Part 14

Next up is Christopher Fairbairn's Blog.
http://www.christec.co.nz/blog
Particular highlights are :-
http://www.christec.co.nz/blog/archives/134
http://www.christec.co.nz/blog/archives/208
http://www.christec.co.nz/blog/archives/113

101 Windows Mobile and Compact Framework Resources - Part 13

Next up is Microsoft® .NET Compact Framework (Core Reference) written by Andy Wigley, Stephen Wheelwright.
http://www.amazon.co.uk/Microsoft%C2%AE-NET-Compact-Framework-Reference/dp/0735617252/ref=sr_1_34?ie=UTF8&s=books&qid=1259490668&sr=1-34

101 Windows Mobile and Compact Framework Resources - Part 12

Next up is Windows Mobile Data Synchronization with SQL Server 2005 and SQL Server Compact 3.1 written by Rob Tiffany.
http://www.amazon.co.uk/Windows-Mobile-Synchronization-Server-Compact/dp/0979891205/ref=sr_1_5?ie=UTF8&s=books&qid=1259490628&sr=1-5

101 Windows Mobile and Compact Framework Resources - Part 11

Next up is the Microsoft Mobile Development Handbook written by Andy Wigley, Daniel Moth and Peter Foot.
http://www.amazon.co.uk/Microsoft-Mobile-Development-Handbook-Wigley/dp/0735623589/ref=sr_1_2?ie=UTF8&s=books&qid=1259490611&sr=8-2

Monday 30 November 2009

101 Windows Mobile and Compact Framework Resources - Part 10

Next up is José Gallardo Salazar's Blog.
http://www.mobilepractices.com/
Particular highlights are :-
http://www.mobilepractices.com/2007/10/detecting-what-net-cf-version-is.html
http://www.mobilepractices.com/2008/10/setupdll-sample-and-walkthrough-terms.html
http://www.mobilepractices.com/2007/12/multi-line-graphicsmeasurestring.html

101 Windows Mobile and Compact Framework Resources - Part 9

Next up is Chris Craft's Blog.
http://www.cjcraft.com/blog/
Particular highlights are :-
30 Days of .NET (Windows Mobile Applications) - http://www.cjcraft.com/blog/default,month,2008-06.aspx

101 Windows Mobile and Compact Framework Resources - Part 8

Next up is a set of articles available from the OpenNETCF.
http://community.opennetcf.com/articles/

101 Windows Mobile and Compact Framework Resources - Part 7

Next up is Christian Helle's Blog.
http://christian-helle.blogspot.com/
Particular highlights are :-
http://christian-helle.blogspot.com/2007/06/accessing-windows-mobile-60-sound-apis.html
http://christian-helle.blogspot.com/search/label/ListView

101 Windows Mobile and Compact Framework Resources - Part 6

Next up is the OpenNETCF Smart Device Framework (SDF). This is a library which provides an extension to the .NET Compact Framework. It has proved to be invaluable in a number of projects I have worked on.
http://www.opennetcf.com/Products/SmartDeviceFramework/tabid/65/Default.aspx

Sunday 29 November 2009

101 Windows Mobile and Compact Framework Resources - Part 5

Next up is the Windows Mobile Managed Gestures Sample. With the introduction of Windows Mobile 6.5 saw the Gestures API and Physics Engine. Alex Yakhnin and Ron Buckton presented two WebCasts demonstrating the Gestures API and Physics Engine and provided a code sample and sample library.
http://code.msdn.microsoft.com/gestureswm

101 Windows Mobile and Compact Framework Resources - Part 4

Next up is a thread from one of the Smart Device Development forums. This thread lists a number of different options for making your Windows Mobile Application User Interface look attractive.
http://social.msdn.microsoft.com/Forums/en/vssmartdevicesvbcs/thread/5d1343ea-8820-4bdd-993c-e6bf17c2e760

101 Windows Mobile and Compact Framework Resources - Part 3

Next up is the "How Do I?" Videos for Devices. This is an excellent resource which provides over 100 screencasts which demonstrate a variety of subjects, such as the State and Notification Broker, User Interface Programming, Security and Deployment, etc. Along with the screencasts are code samples in both C# and VB.NET.
http://msdn.microsoft.com/en-us/netframework/bb495180.aspx

101 Windows Mobile and Compact Framework Resources - Part 2

Next up is the MSDN Smart Device Development Forums. These forums cover a number of areas of Smart Device Development such as the Compact Framework and Windows Mobile Development. I have found them to be an excellent resource to ask questions and also as a learning tool by knowing what issues others face.
http://social.msdn.microsoft.com/Forums/en-US/category/smartdevicedevelopment

101 Windows Mobile and Compact Framework Resources - Part 1

Over the next few weeks I will be sharing with you a collection of links to various resources I have collected over the years. These resources are directly related to Windows Mobile and the Compact Framework. This is by no means the full extent of resources available, and more may be added as time goes on.

First up is the MSDN Online Documentation. I find this to be very useful in determining a number of things, such as usage examples as well as which versions of the Framework support which features. Searching online using your favourite online search engine normally displays results directly from the MSDN Documentation, also using this technique can also highlight any other uses of that type that may be useful.
http://msdn.microsoft.com/en-us/library/default.aspx

Thursday 12 November 2009

Bing Maps and Windows Mobile Part 5

A question was recently asked on the Smart Device MSDN forums here. This regarded getting an address from latitude and longitude co-ordinates.

In an attempt to answer the question I had a quick look at the Bing Maps Web Service and found that ReverseGeocode method was available and posted a link to the relevant MSDN documentation here.

As I had already blogged about Bing Maps and Windows Mobile, I thought I would check what the method returned.

I used the Geocode method to return the Latitude and Longitude from my home address and then feed these two values back into the ReverseGeocode method and was returned an address string, although the house number was 15 numbers out.

The method I used is below, please note that the LatitudeSpecified and LongitudeSpecified had to set to ensure that a valid response was receieved.

private string ReverseGeocodeCoordinates(double latitude, double longitude)
{
ReverseGeocodeRequest reverseGeocodeRequest = new ReverseGeocodeRequest();
reverseGeocodeRequest.Credentials = new WindowsMobileBingMapsTester.net.virtualearth.dev.staging.Credentials();
reverseGeocodeRequest.Credentials.Token = GetClientToken();

reverseGeocodeRequest.Location = new WindowsMobileBingMapsTester.net.virtualearth.dev.staging.Location();
reverseGeocodeRequest.Location.Latitude = latitude;
reverseGeocodeRequest.Location.LatitudeSpecified = true;
reverseGeocodeRequest.Location.Longitude = longitude;
reverseGeocodeRequest.Location.LongitudeSpecified = true;

// Make the geocode request
GeocodeService geocodeService = new GeocodeService();
GeocodeResponse geocodeResponse = geocodeService.ReverseGeocode(reverseGeocodeRequest);

if (geocodeResponse.Results.Length > 0)
if (geocodeResponse.Results[0].Locations.Length > 0)
return geocodeResponse.Results[0].DisplayName;

return null;
}

Usage :-

string currentAddress = ReverseGeocodeCoordinates(47.608, -122.337);

Hopefully this will help those looking to determine an address from a set of co-ordinates.

Friday 11 September 2009

Discovering Windows Messages and Remote Spy

A number of questions are asked on the MSDN Smart Device forums regarding implementing functionality that does not naturally exist in the Compact Framework. I recommend a technique called SubClassing which Alex Yahknin has blogged about here.

In addition to the source code provided by Alex, I thought it may be worth while putting together a step by step guide as to how to discover the windows messages that a window can receive as this is useful when implementing the subclassing technique. Visual Studio ships with a remote tool call Remote Spy which can be used to discover these windows messages.

I have created these instructions at the following link http://www.smartmobiledevice.co.uk/HowTo/DiscoverWindowsMessages. Hopefully others will find them useful.

Wednesday 26 August 2009

Windows Mobile 6.5 and Gestures

Having just viewed the MSDN Webcast: Developing for Windows Mobile 6.5 Devices: Using the Gesture APIs (Part 1 of 2) a link for the managed wrapper was mentioned, which is available here

Monday 24 August 2009

Windows Embedded CE and Windows Mobile Live Chat

A Windows Embedded CE and Windows Mobile Live Chat is scheduled on August 25, 2009 at 9:00 - 10:00 A.M. Pacific Time here.

Hopefully you can come along.

Saturday 15 August 2009

Toshiba TG01 and Accelerometer

I purchased the Toshiba TG01 a number of weeks ago and wanted to make programmatic use of the Accelerometer built into the device.

I knew that there would be a DLL on the device responsible for allowing access to the Accelerometer so I went about identifying this.

On the TG01 there is an application within the Settings called Adjust Motion Sensor and I thought that this application would make use of the DLL that would be available on the device. So I connected the TG01 via Active Sync and started Remote Process Viewer. I then started the Adjust Motion Sensor application and it appeared in the list of running processes, as expected.

Selecting the process from list provided me with a list of the Assemblies the application had loaded, one being the Axcon.dll.





I then wanted to copy the Axcon.dll to my development machine. The DLL is located in the \Windows directory of the device so I copied it from there.

I then opened the DLL using Notepad and was able to identify a number of possible method names as follows :-


?DTSDeregisterAcceleration@@YAKI@Z ?DTSDeregisterActionEvent@@YAKI@Z ?DTSGetAcceleration@@YAKIPAU_TS_ACCELERATION@@@Z ?DTSRegisterAcceleration@@YAKPAUHINSTANCE__@@IPAI@Z ?DTSRegisterActionEvent@@YAKPAUHWND__@@PAUHINSTANCE__@@PAI@Z ?DTSResumeSystemActionResponse@@YAKPAUHWND__@@@Z ?DTSSuspendSystemActionResponse@@YAKPAUHWND__@@@Z MwAxconEvtNotice MwAxconHoriPtSet MwAxconInitialSet MwAxconManOpTurn MwAxconParaSet MwAxconPresentGet MwAxconPresentGet2 MwAxconResume MwAxconStart MwAxconStop MwAxconSupend MwAxconTestRead MwAxconTestWrite TSDeregisterAcceleration TSDeregisterActionEvent TSGetAcceleration TSRegisterAcceleration TSRegisterActionEvent TSResumeSystemActionResponse TSSuspendSystemActionResponse

I then went another step further and loaded the DLL into Dependancy Walker which gave me the following :-

unsigned long DTSDeregisterAcceleration(unsigned int)
unsigned long DTSDeregisterActionEvent(unsigned int)
unsigned long DTSGetAcceleration(unsigned int,struct _TS_ACCELERATION *)
unsigned long DTSRegisterAcceleration(struct HINSTANCE__ *,unsigned int,unsigned int *)
unsigned long DTSRegisterActionEvent(struct HWND__ *,struct HINSTANCE__ *,unsigned int *)
unsigned long DTSResumeSystemActionResponse(struct HWND__ *)
unsigned long DTSSuspendSystemActionResponse(struct HWND__ *)
MwAxconEvtNotice
MwAxconHoriPtSet
MwAxconInitialSet
MwAxconManOpTurn
MwAxconParaSet
MwAxconPresentGet
MwAxconPresentGet2
MwAxconResume
MwAxconStart
MwAxconStop
MwAxconSupend
MwAxconTestRead
MwAxconTestWrite
TSDeregisterAcceleration
TSDeregisterActionEvent
TSGetAcceleration
TSRegisterAcceleration
TSRegisterActionEvent
TSResumeSystemActionResponse
TSSuspendSystemActionResponse

At this point I knew I had the methods of interest however the puzzling part was the structure being passed into the DTSGetAcceleration method.


I then fired an email off to Toshiba in the hope for some support in this area, however at the time of writing I am still waiting for a response.

I posted a question on the Modaco forums (http://www.modaco.com/content/toshiba-tg01-tg01-modaco-com/290257/tg01-sdk/) however it seemed I had reached a dead end at this point.

I just happened to check back on the forum last night and found that a thread had been started regarding the G-Sensor in the TG01 (http://www.modaco.com/content/toshiba-tg01-tg01-modaco-com/291274/g-sensor-in-tg01-emu-dev/)

Scrolling through this thread I found that a PDF document had been posted regarding the Driver Interface Specification.

I would like to point out that an attempt had been made to contact Toshiba regarding this however no response was given.

I downloaded the PDF document and begain reading. The document contained exactly the information I had been previously lacking therefore this morning I went about creating a C# managed wrapper for the methods exposed via Axcon.DLL.

Having done a bit of P/Invoking in the past I soon was able to call the required methods, passing in the correct data types and thanks to the document, able to retrieve G-Sensor data, based on the definition of the structure mentioned early.

There were two sections to the document. One was getting the G-Sensor data and the other was getting action events. These action events were things such as Shake, Rotate, Tilt, etc. The interesting thing about the action events were that when registring the event, a Handle was required for the Window that was to recieve the action events. I managed to intercept the messages being sent from the Action Event using the NativeWindow class as specified here (http://blog.opennetcf.com/ayakhnin/CategoryView,category,NativeWindow.aspx). I managed to intercept a Shake event however my main focus was on the G-Sensor data.

Having got back an X, Y and Z value from the method call DTSGetAcceleration, I then went about trying to intergrate this into the HTCSensorSDK sample as specified here (http://blog.enterprisemobile.com/2008/07/using-htc-diamonds-sensor-sdk-from-managed-code/)

With the Toshiba you had to "manually" query the G-Sensor data using the DTSGetAcceleration method.

After a short while I had managed to integrate the TG01 G-Sensor data into the sample and was able to get the ball rolling around the screen, there seems to be a slight issue with this however I am yet to figure that out.

So I have now got the wrapper I had wanted all those weeks ago and hopefully this information and sample code will help others integrate the G-Sensor data with their applications and games.

Toshiba - Please note I have only taken the unofficial route with this due to the lack of response from yourselfs. My intentions are only to help provide the relevant information to others so that they can make use of the hardware provided in the TG01.

G-Sensor Code :-

public struct _TS_ACCELERATION
{
public short x;
public short y;
public short z;
public _FILETIME time;
}

public struct _FILETIME
{
Int32 dwLowDateTime; /* low 32 bits */
Int32 dwHighDateTime; /* high 32 bits */
}

[DllImport("CoreDll.dll", SetLastError = true)]
public static extern IntPtr GetModuleHandle(IntPtr ModuleName);

[DllImport("CoreDll.dll", SetLastError = true)]
public static extern Int32 GetModuleFileName(IntPtr hModule, StringBuilder ModuleName, Int32 cch);

[DllImport("Axcon.dll", SetLastError = true)]
public static extern Int32 TSRegisterAcceleration(IntPtr hModule, UInt32 uPeriod, out UInt32 puID);

[DllImport("Axcon.dll", SetLastError = true)]
public static extern Int32 TSDeregisterAcceleration(UInt32 uID);

[DllImport("Axcon.dll", SetLastError = true)]
public static extern Int32 TSGetAcceleration(UInt32 uID, ref _TS_ACCELERATION accel);

G-Sensor Code Usage :-

// Registrying
// Firstly get the module handle for the application
IntPtr modulehandle = GetModuleHandle(IntPtr.Zero);
// Secondly registry the Acceleration providing the module handle above, the interval at which the data will be updated and the Request Id which is used when getting the G-Sensor data
TSRegisterAcceleration(modulehandle, (UInt32)100, out puId);

// Getting G-Sensor Data
// puId is the Request Id from above and acc is the reference to the_TS_ACCELERATION structure - This method can be called in a while loop or timer tick
TSGetAcceleration(puId, ref acc);

// Deregistry
// puId is the Request Id from above
TSDeregisterAcceleration(puId);

Action Events Code :-


[DllImport("Axcon.dll", SetLastError = true)]
public static extern Int32 TSRegisterActionEvent(IntPtr hWnd, IntPtr hModule, out UInt32 puID);

[DllImport("Axcon.dll", SetLastError = true)]
public static extern Int32 TSDeregisterActionEvent(uint uID);

[DllImport("Axcon.dll", SetLastError = true)]
public static extern Int32 TSSuspendSystemActionResponse(IntPtr hWnd);

[DllImport("Axcon.dll", SetLastError = true)]
public static extern Int32 TSResumeSystemActionResponse(IntPtr hWnd);


Action Events Code Usage - In conjuction with the NativeWindow project above :-

// The control that will receive the Action Events Windows Messages
MyAccControl myAccControl = new MyAccControl(this.Handle, this.listBox1);
// Register the Action Events using the Handle of the control above, the module handle and the puId
TSRegisterActionEvent(myAccControl.Handle, modulehandle, out puId);

Snippet of Code used to determine orientation of device :-

if (acc.z > 0)
{
if (acc.z > 800)
{
this.listBox1.Items.Add("Device Face Up Flat");
}
}
else
{
if (0 - acc.z > 800)
{
this.listBox1.Items.Add("Device Face Down Flat");
}
}
if (acc.y > 0)
{
if (acc.y > 800)
{
this.listBox1.Items.Add("Device Rotated Right");
}
}
else
{
if (0 - acc.y > 800)
{
this.listBox1.Items.Add("Device Rotated Left");
}
}
if (acc.x > 0)
{
if (acc.x > 800)
{
this.listBox1.Items.Add("Device Standing Up ");
}
}
else
{
if (0 - acc.x > 800)
{
this.listBox1.Items.Add("Device Upside Down");
}
}

Tuesday 4 August 2009

Bing Maps and Windows Mobile Part 4

I knew of the following Device How Do I video (Display Virtual Earth Maps inside a PictureBox Control? - http://msdn.microsoft.com/en-gb/netframework/dd920289.aspx) and after looking at the code, it provided the missing piece in the jig saw from the original article I was working from (http://msdn.microsoft.com/en-us/library/dd483215.aspx).

The missing pieces were a few calls to a number of the specified properties as below :-

pushpin.Location.LatitudeSpecified = true;
pushpin.Location.LongitudeSpecified = true;
mapUriOptions.ZoomLevelSpecified = true;

I now get a nice map as expected. It is slightly unusual that you set the property's value and then have to state that the value was specified, you would think that by just setting the value in the first place then you would have specified the value. It is also strange that these specified properties were not listed in the code from the MSDN article.

So the code as posted previously should now look like the following :-

private string GetMapUri(double latitude, double longitude, int zoom, string mapStyle, int width, int height)
{
Pushpin[] pins = new Pushpin[1];
Pushpin pushpin = new Pushpin();
pushpin.Location = new WindowsMobileBingMapsTester.net.virtualearth.dev.staging1.Location();
pushpin.Location.Latitude = latitude;
pushpin.Location.LatitudeSpecified = true;
pushpin.Location.Longitude = longitude;
pushpin.Location.LongitudeSpecified = true;
pushpin.IconStyle = "2";
pins[0] = pushpin;
MapUriRequest mapUriRequest = new MapUriRequest();
// Set credentials using a valid Bing Maps Token
mapUriRequest.Credentials = new WindowsMobileBingMapsTester.net.virtualearth.dev.staging1.Credentials();
mapUriRequest.Credentials.Token = GetClientToken();
// Set the location of the requested image
mapUriRequest.Pushpins = pins;
// Set the map style and zoom level
MapUriOptions mapUriOptions = new MapUriOptions();
switch (mapStyle.ToUpper())
{
case "HYBRID":
mapUriOptions.Style = MapStyle.AerialWithLabels;
break;
case "ROAD":
mapUriOptions.Style = MapStyle.Road;
break;
case "AERIAL":
mapUriOptions.Style = MapStyle.Aerial;
break;
default:
mapUriOptions.Style = MapStyle.Road;
break;
}
mapUriOptions.ZoomLevel = zoom;
mapUriOptions.ZoomLevelSpecified = true;
// Set the size of the requested image to match the size of the image control
mapUriOptions.ImageSize = new WindowsMobileBingMapsTester.net.virtualearth.dev.staging1.SizeOfint();
mapUriOptions.ImageSize.Height = height;
mapUriOptions.ImageSize.Width = width;
mapUriOptions.ImageSize.HeightSpecified = true;
mapUriOptions.ImageSize.WidthSpecified = true;
mapUriRequest.Options = mapUriOptions;
int width1 = mapUriRequest.Options.ImageSize.Width;
ImageryService imageryService = new ImageryService();
MapUriResponse mapUriResponse = imageryService.GetMapUri(mapUriRequest);
return mapUriResponse.Uri;
}

Monday 3 August 2009

Bing Maps and Windows Mobile Part 3

Using the method GetMapUri from here http://msdn.microsoft.com/en-us/library/dd483215.aspx I was able to retrieve a URL, however I have been unable to see a map yet, just a nice grey square with part of the words "Staging" on it. This was using both my home address and 1 Microsoft Way, as suggested in the article.

One point to note is that when running the GetMapUri method, the line
MapUriResponse mapUriResponse = imageryService.GetMapUri(mapUriRequest); complained with an soap exception regarding the width of the mapUriOptions.ImageSize object not be set (The argument value must be between 80 and 900.Parameter name: Options.ImageSize.WidthActual value was 0.). I found that the following two statements also need to be added to prevent this exception :-
mapUriOptions.ImageSize.HeightSpecified = true;
mapUriOptions.ImageSize.WidthSpecified = true;

With these properties set, the code executes successfully, however I am presented with the grey square as previously mentioned.

Reusing the Token has had little effect.

I will post the code that I have, however I'm unsure why I am not getting a map :-


private string GetMapUri(double latitude, double longitude, int zoom, string mapStyle, int width, int height)
{
Pushpin[] pins = new Pushpin[1];
Pushpin pushpin = new Pushpin();
pushpin.Location = new WindowsMobileBingMapsTester.net.virtualearth.dev.staging1.Location();
pushpin.Location.Latitude = latitude;
pushpin.Location.Longitude = longitude;
pushpin.IconStyle = "2";
pins[0] = pushpin;
MapUriRequest mapUriRequest = new MapUriRequest();
// Set credentials using a valid Bing Maps Token
mapUriRequest.Credentials = new WindowsMobileBingMapsTester.net.virtualearth.dev.staging1.Credentials();
mapUriRequest.Credentials.Token = GetClientToken();
// Set the location of the requested image
mapUriRequest.Pushpins = pins;
// Set the map style and zoom level
MapUriOptions mapUriOptions = new MapUriOptions();
switch (mapStyle.ToUpper())
{
case "HYBRID":
mapUriOptions.Style = MapStyle.AerialWithLabels;
break;
case "ROAD":
mapUriOptions.Style = MapStyle.Road;
break;
case "AERIAL":
mapUriOptions.Style = MapStyle.Aerial;
break;
default:
mapUriOptions.Style = MapStyle.Road;
break;
}
mapUriOptions.ZoomLevel = zoom;
// Set the size of the requested image to match the size of the image control
mapUriOptions.ImageSize = new WindowsMobileBingMapsTester.net.virtualearth.dev.staging1.SizeOfint();
mapUriOptions.ImageSize.Height = height;
mapUriOptions.ImageSize.Width = width;
mapUriOptions.ImageSize.HeightSpecified = true;
mapUriOptions.ImageSize.WidthSpecified = true;
mapUriRequest.Options = mapUriOptions;
int width1 = mapUriRequest.Options.ImageSize.Width;
ImageryService imageryService = new ImageryService();
MapUriResponse mapUriResponse = imageryService.GetMapUri(mapUriRequest);
return mapUriResponse.Uri;
}

My usage :-


WindowsMobileBingMapsTester.net.virtualearth.dev.staging.GeocodeLocation currentLocation = GeocodeAddress("1 Microsoft Way, Redmond, WA");
this.webBrowser1.Url = new Uri(GetMapUri(currentLocation.Latitude, currentLocation.Longitude, 17, "HYBRID", 220, 220));

Bing Maps and Windows Mobile Part 2

After waiting about an hour and a half I tried to add the Common web service again and after entering the correct credentials (Account Id rather than Account Name) I was able to add the reference.

I build the project and found a number of errors, namely due to the copy and paste from the original article, however after these were resolve the project built and deployed to the Windows Mobile 5 emulator.

I kept things simple by entering my home address and wanting to get out the Latitude and Longitude. Having entered only my house number and street, the code ran through however no locations were found. I then entered my complete address and I was able to get out a
GeocodeLocation object which allowed me to display a label with the two properties on it.

The following is the code I have currently, I will then look at downloading a map, bear in mind that you have to sign up for a developer account and the credentials you have to enter in both the dialog and the code are unique to yourself and have been removed in the posted code :-


private string GetClientToken()
{
CommonService commonService = new CommonService();
commonService.Url = "https://staging.common.virtualearth.net/find-30/common.asmx";
commonService.Credentials =
new System.Net.NetworkCredential("[ACCOUNTID]", "[ACCOUNTPASSWORD]");
// Create the TokenSpecification object to pass to GetClientToken.
TokenSpecification tokenSpec = new TokenSpecification();
//Use the currently exposed public IP for the page.
tokenSpec.ClientIPAddress = "[IPADDRESS]";
// The maximum allowable token duration is 480 minutes (8 hours).
// The minimum allowable duration is 15 minutes.
tokenSpec.TokenValidityDurationMinutes = 480;
// Now get a token from the Bing Maps Token Service.
return commonService.GetClientToken(tokenSpec);
}


private GeocodeLocation GeocodeAddress(string address)
{
GeocodeRequest geocodeRequest = new GeocodeRequest();
// Set the credentials using a valid Bing Maps token
geocodeRequest.Credentials = new Credentials();
geocodeRequest.Credentials.Token = GetClientToken();
// Set the full address query
geocodeRequest.Query = address;
// Set the options to only return high confidence results
ConfidenceFilter[] filters = new ConfidenceFilter[1];
filters[0] = new ConfidenceFilter();
filters[0].MinimumConfidence = Confidence.High;
GeocodeOptions geocodeOptions = new GeocodeOptions();
geocodeOptions.Filters = filters;
geocodeRequest.Options = geocodeOptions;
// Make the geocode request
GeocodeService geocodeService = new GeocodeService();
GeocodeResponse geocodeResponse = geocodeService.Geocode(geocodeRequest);
if (geocodeResponse.Results.Length > 0)
if (geocodeResponse.Results[0].Locations.Length > 0)
return geocodeResponse.Results[0].Locations[0];
return null;
}

And calling code :-

GeocodeLocation currentLocation = GeocodeAddress("[MY ADDRESS HERE]");
if (currentLocation != null)
{
this.label1.Text = "Lat: " + currentLocation.Latitude.ToString();
this.label1.Text += " Long : " + currentLocation.Longitude.ToString();
}

More to follow...

Bing Maps and Windows Mobile Part 1

Eric Lam had blogged about the Bing Maps Web Services SDK 1.0 (http://ericlam.spaces.live.com/blog/cns!5D73BE0B4076E647!4408.entry), so I decided to sign up for a developer account to have a play with the SDK.

After receiving the email I was instructed to sign in to Bing Maps CSS to create a password for my account. Having done this I then went about trying to get something up and running.

After browsing through the documentation, there was a link to the Developing a Mobile Application Using Bing Maps Web Services article (http://msdn.microsoft.com/en-us/library/dd483215.aspx), I thought this is exactly what I was looking for (I wanted to Geocode an address and then display a map inside a Smart Device project).

I started reading this article and it soon turned out that it was very much focused on developing a ASP.NET page that a Windows Mobile device could access, this wasn't exactly what I was looking for, but would be a useful resource in achieving my goal.

So I set about adding the first web reference (ASMX) for being able to setup a Client Token. I was then prompted for my Username and Password however it was going to take a couple of hours for my account to be fully activated so I went on to the next section, the Bing Maps Web Services.

The service URLs had an extension of SVC (WCF), I had never used WCF before so this was going to be a new experience. As the article was aimed at creating a ASP.NET page then Adding A Service Reference wouldn't be a problem, however you do not get this option for a Smart Device project.

After a little more searching I realised I had to generate the Proxy classes. I thought I needed to use the svcutil.exe tool, I went ahead and generated the proxy classes, added them to my Smart Device project and then built, I was then faced with a number of build errors. I then remembered that there was a NETCF version of this tool (netcfsvcutil.exe), so I then attempted to generate the proxy classes using this tool. The tool ran through to completion however did not produce any proxy classes.

I then did a bit more searching and found the following piece of documentation Bing Maps Web Services Metadata (http://msdn.microsoft.com/en-us/library/cc966738.aspx). This provided the metadata URLs which I could then add as references to my Smart Device project.

I now have all four Bing Map Web Services added to my project, I am now just waiting for my account to be activated to be able to add the Common web service and then generate a Client Token.

More details to follow...

Monday 27 July 2009

OpenNETCF.Rss and SDF 2.3

A question was asked on the MSDN Smart Device Development Forum this morning regarding Synchronization using RSS (http://bit.ly/L88qA). I responded with a number of links to the OpenNETCF's SDF documention for their RSS namespace and a link to Alex Yakhnin's blog post "Taking OpenNETCF.Rss for a spin." (http://bit.ly/XHsjp).

I am a keen subscriber to a number of blog posts via this mechanism so I have an interest in this, I even subscribe to various blogs on my HTC Diamond device, so I wanted to know more about this namespace. I didn't have much time this morning to have a play with Alex's example application so I had a look after work.

As the SDF now includes the OpenNETCF.Rss namespace I opened Alex's example and removed the OpenNETCF.Rss project and referenced the OpenNETCF.Rss namespace from the SDF2.3 installation on my machine. Building this then lead to a number of build errors relating to other changes in the SDF, I didn't really have time to correct all the build errors and all I really wanted to do was to prove that I could download some data via this mechanism so I started a new solution that would just download the name of the feed and the names of the feed items. I may come back to this and correct the other build errors at some point.

I started writing some code however ran into a problem with a configuration I needed to provide, which Alex's example provided. After loading the config file into an XmlDocument I then proceeded extracting the relevant XmlNode and passing it to the StorageConfiguration.Load and TransportConfiguration.Load methods.

The second issue I came across was that the version of the OpenNETCF.Rss assembly was slightly out of date in Alex's config file so I updated it from 1.0.0.0 to 2.3.0.39.
All was going well, the config was loaded successfully, now all I needed to do was to call the Receieve method on a valid RSS feed URL. I tried my Twitter account however that requires additional user credentials, I then tried the MSDN forum however that didn't work (it didn't seem to work in Snackr either, but thats another story), I then tried Neil Cowburn's blog (http://bit.ly/166fYW) and that worked successfully.

I now have the title of the Feed in a label and the titles of the Feed Items in a listbox.

The following is the code I have :-

XmlDocument currentConfig = new XmlDocument();
currentConfig.Load(@"\Program Files\wmrsstester\WMRssTester.exe.config");
XmlNode currentNode = currentConfig.DocumentElement;
XmlNode feedNode = null;
foreach (XmlNode currentChildNode in currentNode.ChildNodes)
{
string nameofchildnode = currentChildNode.Name;
feedNode = currentChildNode;
}
OpenNETCF.Rss.Configuration.FeedConfiguration.StorageConfiguration.Load(feedNode);
OpenNETCF.Rss.Configuration.FeedConfiguration.TransportConfiguration.Load(feedNode);
OpenNETCF.Rss.Data.Feed currentFeed = OpenNETCF.Rss.FeedEngine.Receive(new Uri(@"http://feeds.feedburner.com/neilco?format=xml"));
this.label1.Text = currentFeed.Title;
foreach (OpenNETCF.Rss.Data.FeedItem currentFeedItem in currentFeed.Items)
{
this.listBox1.Items.Add(currentFeedItem.Title);
}

Along with the config file :-

<?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <section name="feed.net" type="OpenNETCF.Rss.Configuration.FeedConfiguration, OpenNETCF.Rss, Version=2.3.0.39, Culture=neutral, PublicKeyToken=null " /> </configSections>
<feed.net> <communication> <refreshInterval value="60000" /> <transports> <add scheme="http"> <defaultPort value="80" /> <receiveTimeout value="90000" /> <noDelay enabled="true" /> <connectionLimit inbound="16" /> <serializer type="OpenNETCF.Rss.FeedSerializer,Version=2.3.0.39,Culture=neutral,PublicKeyToken=null" /> <hosts default="allow"> <allow /> <deny /> </hosts> </add> </transports> </communication>
<storage> <provider name="fileStorage" enabled="true" type="OpenNETCF.Rss.FeedFileStorage,OpenNETCF.Rss,Version=2.3.0.39,Culture=neutral,PublicKeyToken=null"> <path value="\Temp" /> <feedSizeLimit value="250" /> </provider> </storage>
</feed.net>
</configuration>

Hopefully this experience will help someone else.

First Blog Post

This is my first blog post. I will hopefully add a number of other posts as and when I think of something to write.