.NET Compact Framework and the Smart Device Programming Features of VS.NET
Posted May 1, 2004
Chat Date: April 15, 2004
Please note: Portions of this transcript have been edited for clarity
Introduction
Moderator: mikefos (Microsoft)
Welcome to today's .NET Compact Framework and the Smart Device Programming features of VS.NET chat! Questions, comments, and suggestions are welcome.
Moderator: mikefos (Microsoft)
Let’s introduce our hosts for today.
Host: Ginny (MVP)
Hi, I'm Ginny Caughey. I'm President of Carolina Software, Inc. We provide apps for the solid waste industry.
Host: AlexY (MVP)
Hi am Alex Yakhnin, Program Manager from IntelliProg, Inc. and a member of directory board on OpenNETCF.org
Host: Zoran (eMVP)
Good morning. I am Zoran Galovic - founder of DotNetEmbedded Solutions which specialized in .NET Compact Framework, WCE .NET and related Windows Mobile (Smartphones and PocketPCs) technologies.
Host: PeterFoot (MVP)
Hi, I'm Peter Foot from In The Hand a developer of .NET Compact Framework software in the UK. I'm also an advisory board member for OpenNETCF.org
Host: Maarten (MVP)
Hi I'm Maarten Struys, .NET Compact Framework MVP
Host: JoeBork (Microsoft)
Howdy, I'm Joe Bork, and I am a tester on the Visual Studio for Devices team. I work on the managed designers for Visual Studio 2003 and Whidbey.
Host: cneable (Microsoft)
Hi, I'm Craig Neable, technical evangelist for smart device programability in Visual Studio.
Host: RobTiffany (eMVP)
Hi, I'm Rob Tiffany, CTO for Hood Canal Mobility
Host: ctacke (eMVP)
Hello, I'm Chris Tacke, wearer of many hats, including Co-founder of OpenNETCF.org
Moderator: mikefos (Microsoft)
Welcome everyone, let’s get started!
Start of Chat
Guest_z_embedded says:
Q: I’m quite a newbie in .Net CF and VB.NET (my chosen programming language) but I wanted to know if there is a way to programmatically adjust the memory allocated for my application..retreive values such as max memory on device and set app memory to max -1 mb or something similar. I guess API calls are needed? Where can I find such information?
Host: ctacke (eMVP)
A: The API is SystemMemoryDivision (I think). It's implemented in the OpenNETCF stuff.
Guest_z_embedded says:
Q: When will the "RFUtils" code that Paul Tobey wrote be incorporated into OpennetCF?
Host: ctacke (eMVP)
A: In the next release. Paul's cleaning it as we speak
Guest_z_embedded says:
Q: Sorry - When is the next release? Do you mean the next release of the SDK ?
Host: JanYeh (eMVP)
A: Next release of OpenNETCF SDF
Host: ctacke (eMVP)
A: It may make the next source drop as well. In the next 2 weeks, give or take, we should be publishing v 1.1
Host: cneable (Microsoft)
Q: Will the CF 2.0 support Generics? The Community Technology Preview of VS 2005 doesn't seem to...
A: You're right, it's not there yet, but it's currently being implemented. Not sure exactly what date we'll have a public build yet, but it will be there before we release...
Guest_Mike says:
Q: what is "Generics"?
Host: ctacke (eMVP)
A: generics are way too complex to explain here. They're kind of like C++ templates
Host: ctacke (eMVP)
Q: Is there a(n expected) release date for CF 2.0?
A: It will come with the Whidbey release, which I think is tentatively first half of next year.
Host: Zoran (eMVP)
Q: Is there a good guide out there to start off with .net cf programming for Smartphone (I am a newbie to .net itself)
A: You can find some Smartphone design/development resources on MSDN and on Visual Studio .NET help. If you have any (PocketPC and/or WCE .NET) .NET CF experience it is huge benefit.
Host: Ginny (MVP)
A: I don't believe the MDC slides are public at this time, sorry.
Host: ctacke (eMVP)
Q: I want to synchronize data from a PPC application with data in a desktop application. Where can I get information on doing that?
A: It can only be done from native (C++) code. Take a look at the StorckPor sample for a how-to on ActiveSync Service Providers.
Host: AlexY (MVP)
Q: Last chat someone offered an example of implementing IMailRuleClient in C# - when is this sample going to be posted?
A: I don't remember who that was, bit I can tell you that it is not possible to do just with C#. It will require a native COM and COM wrapper dll.
Host: AlexY (MVP)
Q: I know that you need to use native COMs, the person who volunteered that sample was implementing the COM objects through C# instead of by way of the MAPI sample that comes with the Pocket PC 2003 SDK
A: The person who "promised" the code last time was Ori Amiga from MS. I'll try to follow up with him, but IMO it's not possible with managed code only.
Guest_tperri says:
Q: I know that you need to use native COMs, the person who volunteered that sample was implementing the COM objects through C# instead of by way of the MAPI sample that comes with the Pocket PC 2003 SDK. Seth Demsey offered in the last session an example on how to implement the IMailRuleClient in a C# app with all of the components needed to make it work :) I have a copy of the chat session now - it appears that Seth had been working on a sample of the very functionality I am needing
Host: AlexY (MVP)
A: OK, I'll follow-up with Seth then. :)
Host: RobTiffany (eMVP)
Q: What is the method of disconnected database editing for field work that has the most options? Such as complex SQL statements synchronization etc. SQLCE XML transfer or another
A: Cache your field information in SQLCE and then use Merge Replication with SQL Server 2000.
Host: ctacke (eMVP)
Q: I am getting the following error when trying to call a Web Service from a Smart Device application running in VB.NET's emulator "Additional information: Unable to connect to the remote server”. The web service is also running locally. Any suggestions??
A: Sounds like you've made the #1 mistake and used 'localhost' for the WS URL. Use the PC's IP address.
Guest_cincyreds says:
[note] Good call ctacke_eMVP... I changed it to use the IP Address and it worked on both a synchronous and asynchronous call.
Host: RobTiffany (eMVP)
Q: Hi guys! I wonder when we will able to use stored procedures in SQL CE?
A: Stored Procedures will not be supported in the next version of SQL Server Mobile.
Host: RobTiffany (eMVP)
Q: Thanks, is there any plan to implement stored procedures in future versions of SQL ce?
A: I don't know at this time.
Host: ctacke (eMVP)
Q: So you don't know when stored procedures will be supported?
A: We don't know when or if.
Host: RobTiffany (eMVP)
Q: Can I use MSDE instead of server?
A: Yes, as long as you're aware that you only get 5 concurrent connections.
Host: JanYeh (eMVP)
Q: So is that 5 pda total or 5 pda at one time?
A: 5 clients concurrently. PDA or PC are the same.
Host: RobTiffany (eMVP)
Q: Is MSDE free?
A: Yes.
Host: Ginny (MVP)
Q: I am developing using a Samsung SPH-i700. But Samsung, and Verizon is not upgrading to PPC 2003. Does anybody knows when will be done?
A: It's really up to the OEM unfortunately.
Host: Zoran (eMVP)
Q: Are there any Smartphone-related managed API's in CF 2.0 (SMS, call management, etc.)?
A: Absolutely. The functionality has been already demonstrated at Microsoft Mobility Conference in March in San Francisco with some on stage development.
Host: cneable (Microsoft)
Q: Is it possible to upgrade a Tanager model to 2003?
A: For issues around flashing devices, you need to contact the OEM or your mobile operator.
Host: ctacke (eMVP)
Q: What about Windows CE 5.0? What CF version will it include?
A: Since it's due out in July, it will have CF SP2. When Whidbey ships, a QFE will be released to add it to Platform Builder.
Host: PeterFoot (MVP)
Q: In terms of programming, how different would Wm2k3 SE be from the current edition?
A: There is a single extra API to enable screen orientation switching, otherwise programmatically it is the same as WM2003, hence no new SDK was released. You'll obviously need to do some significant work to support the new screen orientations and sizes.
Host: ctacke (eMVP)
Q: Is there going to be a SP3 for CF1.0?
A: I've go no inside info on this, so I'm just wildly guessing here, but it's a long time until 2.0 comes out, so I would assume that we will see SP3. Is there any bug in particular you're concerned with?
Guest_TSDesignz says:
Q: I try to copy a cdb file to another directory on the device, but an ioexception came up. I've closed and disposed all connections to that file. What can I do?
Host: PeterFoot (MVP)
A: Do you have suitable free space for both copies of the file? Is it storage card or main memory?
Guest_TSDesignz says:
Q: Yes there's enough space available and it is main memory.
Host: PeterFoot (MVP)
A: Is there any further detail supplied with the IOException? it should give a reason for the failure.
Guest_TSDesignz says:
Q: No. The only error message says ioexception. If I try to copy an unused file the code works fine.
Host: JanYeh (eMVP)
A: You better check all the adoce object you used, make sure they are all "Closed" and "Disposed" Which set did you use in your code? DataSet or RecordSet?
Guest_TSDesignz says:
Q: I use dataset
Host: PeterFoot (MVP)
A: Were there any pending writes in the database, these are cached and the database api may still have the database open.
Guest_TSDesignz says:
Q: Yes there are writes, though the database that should be copied and to the second database. If you said, I must close all ADOCE objects, I only need to reconnect to the main database
Host: PeterFoot (MVP)
Q: Drop me an email at support@inthehand.com and I'll pass on some code I have for forcing a flush of a database
Host: BillRyan (MVP)
Q. Does anybody know of a working simple example involving SQLCE merge replication and C#? Including all the steps of the configuration in the DB server side?
A: I don't know of any examples that include Publication, but I know of a great book ... https://www.apress.com/book/bookDisplay.html?bID=182
Guest_z_embedded says:
Q: Rob - great book - always on my desk ready to assist me :-)
Host: RobTiffany (eMVP)
A: glad to hear it
Host: ctacke (eMVP)
Q: I am loading a managed dll using reflection, but I also have a thread that updates these dlls from a server. How can I unload these dlls from the main assembly that loads them so I can update them with the new versions that came from the server?
A: Unfortunately there is no way to unload the assembly in v 1.0 without shutting down all referring threads and processes.
Host: JanYeh (eMVP)
Q: Does Smartphone support sql CE ??
A: I guess not. https://www.microsoft.com/sql/editions/sqlmobile/sqlmobileresources.mspx. Due to limited resources on Smartphone.
Host: Ginny (MVP)
A: Smartphone 2003 does not support SQLCE, but the next version of Smartphone will contain SQLCE in ROM.
Host: cneable (Microsoft)
Q: Which Smartphone-related managed API's are expected in CF 2.0 (SMS, call management, camera, vibration, etc.)?
A: Our current plans are to enable several APIs including Inbox (both SMS and email send and receive), camera, a notification broker allowing you to both store and detect device, as well as application states and events (allowing such things as battery state, signal strength), and some call control. None of these are set in stone yet, but are probable.
Host: ctacke (eMVP)
Q: How can I use the features of Compact framework SP2 in VS.NET 2003?
A: There were no added API features or designer changes, so it will work as is. Simply code against the SP2 feature set.
Host: Maarten (MVP)
Q: What if anything is PPC Phone Edition missing that regular PPC has?
A: PPC Phone Edition is a complete PPC, so it just has more, the phone capabilities.
Host: JanYeh (eMVP)
Q: Is there a new emulator for VS 2003 so that we can make sure our code will work in the new version of 2003? Is there some sort of service pack to put that into VS?
A: It depends on what kind of emulator you installed. After you install newer SDK (PPC, Smartphone), you will have newer emulator.
Moderator: mikefos (Microsoft)
A: You can check out the following site for the latest emulator downloads https://www.microsoft.com/windowsmobile/developers/default.mspx
Host: AlexY (MVP)
Q: I am working with WSE 1.0. What is the best way to message level authentication? Right now I am designing my app using username tokens. I though X.509 certificates would be too hard to support on all of my Pocket PC's
A: Take a look a Casey Chesnut work on the usage WSE from CF: https://www.brains-n-brawn.com
Host: Maarten (MVP)
Q: Which Smartphone devices are shipping with the CF pre-installed?
A: All Smartphone 2003 versions contain the CF in ROM
Host: Ginny (MVP)
Q: When will the next version of Smartphone be out? (the one with SQLCE in ROM)
A: No date has been announced for the release of the next version, and the actual date would be after that to allow time for manufacturing.
Host: ctacke (eMVP)
Q: Do I need to close the connection and reconnect to the UDPClient when device is powered up (onActivated)?
A: I'm not sure, but probably. The driver handle will have changed.
Host: ctacke (eMVP)
Q: And how do I reconnect the wireless?
A: The driver should do that "automagically."
Host: JanYeh (eMVP)
[note] ... In my experience, that depends on the manufacturer's driver. If they support, it will be "automagically".
Host: ctacke (eMVP)
Q: What if there are other access points in the area?
A: Depends on the driver. For example, Cisco's grabs the last AP or the strongest (I think). The MS driver prompts the user.
Host: ctacke (eMVP)
Q: So... I need to test this situation with different wireless cards?
A: Absolutely. Test, test, test and always with as many types of hardware you can get your hands on.
Host: ctacke (eMVP)
Q: Damn - testing means more budget ... may not go well with management
A: Take it from me, testing is *WAY* cheaper than support. Plus you'll have more hair when it's done.
Host: ctacke (eMVP)
Q: How long will it take to reconnect?
A: Depends on the card, the driver, the AP and the signal strength. Should be less than 30 seconds though.
Host: JoeBork (Microsoft)
Q: I would like to prevent columns resizing in Listview control. Is there anything I can do?
A: No, unfortunately the Listview control doesn’t allow you to prevent column resizing.
Host: PeterFoot (MVP)
A: One workaround would be to not show the header, and implement a custom header using labels or buttons....
Host: ctacke (eMVP)
Q: When will it be possible to upgrade my device to Mobile 2003 Second Edition
A: Ask your OEM. It's completely up to them if and when to offer it.
Host: Ginny (MVP)
Q: are there any GOOD guides to building an installer for CF apps? If have found some articles, but none were really complete.
A: This book covers the topic well: https://www.amazon.com/exec/obidos/tg/detail/-/1590590953/103-6109055-7114249?v=glance
Host: JoeBork (Microsoft)
Q: Will CF 2.0 support TreeView.NodeMouseClick (since AfterSelect does not fire when selecting an already selected tree node)?
A: Yes, the NodeMouseClick event will be available in CF 2.0.
Host: ctacke (eMVP)
Q: Hi. What about owner draw controls in CF? Any good sources...?
A: Take a look at the OwnerDrawnList from OpenNETCF.org. https://opennetcf.org/library/OpenNETCF.Windows.Forms.OwnerDrawnList.html
Host: cneable (Microsoft)
Q: Can we expect proper profiling with the next version of CF?
A: We hope to have a better profiling story in Whidbey (we know this is painful today!), though we don't have enough concrete implementation plans as of yet.
Host: AlexY (MVP)
Q: Is there any way to get pixel data from a bitmap object without using GetPixel? I got no reply in the forum
A: If you're familiar with GDI programming, you could try to go the following route: HNWD - HDC - CreateDIBBitmap. Take a look at the article on MSDN: https://msdn2.microsoft.com/library/aa446563.aspx
Host: JoeBork (Microsoft)
Q: Is there a way to have Multi-Select on DataGrid ?
A**:** No, the DataGrid doesn’t currently support multiple selection.
Host: AlexY (MVP)
Q**:** Alex, I know this article, but it would take the same size of the panel, am I wrong? My bitmap is bigger than the screen.
A: You can try to CreateCompatibleDC and copy bitmap there.
Host: JoeBork (Microsoft)
Q: Today toolbar is on top on CE devices and bottom on PPCs; is the any chance that that will change in the near future? (I mean being able to dock it wherever we want...)
A: The docking position of the ToolBar control is determined by the implementation of that control on each platform (PPC or Windows CE). It’s not configurable if you use the native ToolBar control, so there’s no way to change the location in the CF control either.
Host: JoeBork (Microsoft)
Q: Can't have everything I guess...
A: If you’re interested in making your own CF UserControl instead of using the standard ToolBar, you can do that in C# in Visual Studio 2003 if you jump through some hoops. We’re also working on making it much easier to create custom controls (in C# or VB.NET) in Whidbey.
Moderator: mikefos (Microsoft)
Q: When will the next chat be?
A: Next one is May 13th. They're always listed out at https://msdn.microsoft.com/chats - so you can add to your calendar
Guest_tperri says:
Q: Peter - I wanted to let you know I bought your InTheHand poom object and I love it. Thank you for the great product.
A: Thanks! Glad you like it!
Moderator: mikefos (Microsoft)
Thanks for joining us today and thanks for the questions. It's time for us to officially end now, but some folks will be hanging out for a few minutes.
Moderator: mikefos (Microsoft)
If you have further questions regarding the Compact Framework, please check out the newsgroup!
Host: ctacke (eMVP)
All: If you're looking for tutorials, code or answers to your CF questions, visit www.OpenNETCF.org! It's comprehensive and free
Host: JanYeh (eMVP)
Just download OpenNETCF SDF and have it enhance your CF application!!
For further information on this topic please visit the following:
Newsgroups: Mobile and embedded application development topics
Embedded Transcripts: Read the archive
Website: Visit the Mobile & Embedded Developer Center
Top of page