.NET Compact Framework and the Smart Device Programming Features of VS.NET
Posted January 23, 2003
Chat Date: January 16, 2003
Chat Participants:
- Chris Tacke, Embedded MVP and CE Product Manager at Applied Data Systems
- Alex Feinman, MVP and Principal Software Engineer for Corrigo Inc in Redwood City, CA
- Ben Albahari, Program Manager on the .NET Compact Framework team
- Mark Gilbert, Program Manager on the Visual Studio for Devices team
- Kevin Boske, Test engineer with the SQL Server for CE team
- Marcin Przysucha, Test engineer with the SQL Server for CE team
- Michael Fosmire, Community Program Manager
Moderator: Mikefos (Microsoft):
Welcome to today's Chat. Our topic is the .NET Compact Framework and the Smart Device Programming features of VS.NET. Questions, comments, and suggestions are welcome.
Moderator: Mikefos (Microsoft):
Let’s introduce our Hosts for today.
Host: Chris_Tacke (MVP):
Hi. I'm Chris Tacke, CE Product Manager at Applied Data Systems
Host: Kevin Boske (Microsoft):
I'm Kevin Boske, I'm a test engineer with the SQL Server for CE team. I test the System.Data.SqlServerCe and System.Data.SqlClient components as well as SQL Server CE replication.
Host: Ben (Microsoft):
Hi, I’m Ben Albahari. I’m a Program Manager on the .NET Compact Framework.
Host: Alex Feinman (MVP):
Hi, I am Alex Feinman. I'm a Principal Software Engineer for Corrigo Inc in Redwood City, CA
Host: Marcin Przysucha (Microsoft):
Hi, I'm Marcin Przysucha, I work for SQL Server for Windows CE test team. I test managed data providers.
Moderator: Mikefos (Microsoft):
Welcome everyone, let’s get started!
Host: Mark (Microsoft):
Q: Does the CF have any IL limitations, or are the limits really just in the available base class libraries?
Host: Mark (Microsoft):
A: The .NETCF runtime is CLI compliant which means is supports all of the standardized byte codes. The desktop runtime has a handful of byte codes (literally 2 or 3) that it has for native interop that we don't support. Beyond that it's the available base class libraries.
Host: Ben (Microsoft):
Q: Will be enhancements to the grid control?
Host: Ben (Microsoft):
A: For future versions, we are interesting in improving our controls. We are interested in any specific feedback you have with limitations on the grid control.
Host: Alex Feinman (MVP):
Q: Does the emulator support serial communication for modems? using pinvoke?
Host: Alex Feinman (MVP):
A: You need to enable COM ports in the IDE Options/Devices. Select Emulator from the list, open its properties and on the hardware tab enable one or both COM ports.
Host: Mark (Microsoft):
Q: I need just a starting point about autonotification of sms received
Host: Mark (Microsoft):
A: Unfortunately we don't support SMS from the compact framework in the first version. The only way to get SMS working is with native interop. There are some samples included in the SmartPhone SDK for eVC that will show you what APIs you can call. You can also try the newsgroup for simple code snippets.
Host: Chris_Tacke (MVP):
Q: Is it possible to create DLLs that run under both CF and the PC framework?
Host: Chris_Tacke (MVP):
A: As of the Final Beta, a DLL compiled for the device will work on the PC without recompiling.
Host: Ben (Microsoft):
Q: Is it possible to auto-generate a typed dataset within a device project?
Host: Ben (Microsoft):
A: We don’t support typed-dataset in this version. The typed-datasets that are generated support members not supported by the .NET Compact Framework version of the DataSet class.
Host: Ben (Microsoft):
Q: REQ: Requests for grid: cell color, click for sort and edit
Host: Ben (Microsoft):
A: Note that you can achieve sorting functionality, via sorting the underlying DataView, and editing with a separate text box. We plan to provide code samples demonstrating this functionality on gotdotnet.com. Thanks for this feedback. Most appreciated!
Host: Mark (Microsoft):
Q: Will the notifyIcon be in CF later? Is there a work around so that I can add my apps to the sysTray?
Host: Mark (Microsoft):
A: It's something that we're considering adding in the future. For now you can workaround by calling the Systray APIs directly in the OS. If you need a window handle (I think you need one for the Systray APIs), you can either use a message window or call GetActiveWindow()
Host: Chris_Tacke (MVP):
Q: Can the cf load code dynamically? Like assembly.load from a byte array?
Host: Chris_Tacke (MVP):
A: No. The overload for accepting a byte array isn't supported in the CF.
Host: Alex Feinman (MVP):
Q: Will the forthcoming 'standard' editions of VS.NET 2003 (i.e. VC#.NET 2003 Standard) include the smart device extensions and the CF?
Host: Alex Feinman (MVP):
A: No. You will need Demo, Academic, Professional or Enterprise version
Host: Mark (Microsoft):
Q: Is sorting by a ListView's columns coming for CF?
Host: Mark (Microsoft):
A: Most likely, it was something we wanted for the first version but didn't have time to enable. It's a highly requested feature.
Host: Mark (Microsoft):
Q: Any way to do profiling on a CF device? Sometimes my CF device (e.g. iPAQ) behaves very differently than a PC (e.g. no FPU)
Host: Mark (Microsoft):
A: Unfortunately there isn't any easy way to profile this version. We're adding tools for profiling in the next release, but unfortunately you have to use trial and error in this release. There are some guidelines posted for writing performant code, they may help you out.
Host: Mark (Microsoft):
Q: Where can I find these "guidelines for writing performant code"?
Host: Mark (Microsoft):
A: I thought they were posted on www.gotdotnet.com, if not then post a message on the newsgroup and we can send them to you
Host: Ben (Microsoft):
Q: I'm using VS 2003 Final Beta and a WinCE 3.0 PPC. Why don't Paint handlers wired in for Label and TextBox work when Invalidate is called? PictureBox works AOK.
Host: Ben (Microsoft):
A: You must create a custom control in order to specify custom painting - all the built-in controls don’t provide hooks to change their appearance. PictureBox is an exception to this, because it’s specifically designed to allow custom drawing.
Host: Alex Feinman (MVP):
Q: Can you please post the api calls for adding apps to the systray? Or a starting point...
Host: Alex Feinman (MVP):
A: You need to use Shell_NotifyIcon (shellapi.h) and NOTIFYICONDATA structure. Marshalling NOTIFYICONDATA is a bit non-trivial. I could post a sample later. Ask this question again in the public NG
Host: Mark (Microsoft):
Q: Any chance of seeing CF running on cell phones any time soon?
Host: Mark (Microsoft):
A: There is a very good chance. NETCF does work on PPC Phones today
Host: Mark (Microsoft):
Q: I recently began to use VS .NET 2003 Final Beta SDE+CF and I could not get VS to download to my x86 CE target until I ran a Add-in utility called WinCEConfig. (1) Is this utility necessary to configure a proper download? (2) Is this a Microsoft utility?
Host: Mark (Microsoft):
A: If you're deploying to a Platform Builder WinCE 4.x based device (not PocketPC), then you need the tool to describe the device. We'll be posting a public version of the tool very soon with a FAQ on issues deploying to WIndows CE 4.x devices
Host: Ben (Microsoft):
Q: Will a later version of .NETCF expand threading libraries, esp. asynchronous delegates & BegnInvoke.
Host: Ben (Microsoft):
A: We intend to provide better threading support in future versions. There are work-arounds for common scenarios, such as supplying parameters to a method call on a new thread. We will post these on gotdotnet.com soon.
Host: Chris_Tacke (MVP):
Q: The ability to update a controls.Text from any thread is very handy on the PC framework, can we expect this on the .NETCF in the future?
Host: Chris_Tacke (MVP):
A: Updating the control text is supported using Control.Invoke.
Host: Marcin Przysucha (Microsoft):
Q: On SQLCE i need to save a byte array: what kind of field type do you suggest?
Host: Marcin Przysucha (Microsoft):
A: You can use varbinary (maximum size 510 bytes) or image (virtually no limit on data size).
Host: Mark (Microsoft):
Q: Its a bit strange from a market perspective why CE 4.0 is not supported how many devices to you figure are out there like this?
Host: Mark (Microsoft):
A: Since CE 4.2 is a free upgrade from 4.0 we've seen most people upgrade. We've worked with all of our large partners who deployed CE 4.0 devices to make sure we run on them, we just didn't do a full test pass on the OS.
Host: Chris_Tacke (MVP):
Q: Observation: Updating a controls.Text property from a thread other than the owning thread does NOT generate an exception and hits the trees.
Host: Chris_Tacke (MVP):
A: Calling a control's methods from another thread without Control.Invoke may or may not throw an exception depending on what the process is doing at the time. For safety *always* use Control.Invoke.
Host: Kevin Boske (Microsoft):
Q: Are there data providers to connect a ppc directly to a SQL Server 2000 DB?
Host: Kevin Boske (Microsoft):
A: System.Data.SqlClient does exactly this.
Host: Kevin Boske (Microsoft):
Q: What are the main current applications of SQLCE?
Host: Kevin Boske (Microsoft):
A: Persisted, off-line, mobile relational data storage requiring robust query processing and connectivity to SQL Server backends. We have a number of partners listed on our website https://www.microsoft.com/sql/ce/partners/default.asp Following these links will show you some very good examples of how SQL Server CE is used enterprise deployments.
Host: Marcin Przysucha (Microsoft):
Q: Does SQLCE support merging with SQL 2000 standard??
Host: Marcin Przysucha (Microsoft):
A: Yes, we do.
Host: Mark (Microsoft):
Q: Is there any possibility that the compact framework will become available for XPE platforms?
Host: Mark (Microsoft):
A: The desktop framework is the solution for Windows XPe, they are working on making it run better on XPe based systems.
Host: Alex Feinman (MVP):
Q: Using SQLce and the SQL namspace - what would be involved in writing my own "sync" code so I do not have to require my users to have IIS installed somewhere?
Host: Alex Feinman (MVP):
A: If you want to do it without IIS at all, you can transfer data between the device and the host in a form of xml files - that would be the easiest to import into dataset. XML data can be "massaged" into DataSet compliant format by using an appropriate XSL transform I suspect that what you mean is not "without IIS altogether" but rather without SQLISAPI - that would be best achieved via creating a xml web service that would server data for direct download to the device and accept changes for upload.
Host: Ben (Microsoft):
Q: I have had trouble using the datagrid and System.Data.SqlClient - are there any samples to connect these?
Host: Ben (Microsoft):
A: This is definitely possible. We will have a DataGrid sample on gotdotnet.com soon. Our DataGrid is a subset of the desktop one - so looking at a desktop sample will help you. You may need to set up each column (I can’t remember if we auto-populate columns off the top of my head).
Host: Mark (Microsoft):
Q: Is remoting supported on the cf?
Host: Mark (Microsoft):
A: No, for remote method invocation web services can probably do what you want, for inter-process communication you need to resort to the same methods as in native code (memory mapped files, sockets, or named events).
Host: Chris_Tacke (MVP):
Q: The click event on the label doesn't work on ppc 2002. Am I missing something?
Host: Chris_Tacke (MVP):
A: You're not missing anything, the default Label doesn't expose Click. You can create your own Clickable label pretty easily.
Host: Mark (Microsoft):
Q: When can we expect a non-beta release of CF?
Host: Mark (Microsoft):
A: NETCF is released and available for use with the golive program for people who want to ship applications, the Visual Studio development tools will be released very shortly (available within 2 months)
Host: Alex Feinman (MVP):
Q: REQ:How about a production grade tool for installs on PPC, again like the desktop VS setup projects.
Host: Alex Feinman (MVP):
A: I'll be posting a macro some time next week that generates a complete setup project in a solution that contains an SDE project. Check the public NG
Host: Mark (Microsoft):
Q: REQ:How about a production grade tool for installs on PPC, again like the desktop VS setup projects.
Host: Mark (Microsoft):
A: We are expanding our setup projects for devices in the next release. In the mean time you can write setup projects in eVC (you have to create the program manually), and InstallShield has a product that works with the Pocket PC. You can also use the build cab button now, the temporary files are left in your obj directory if you want to customize it
Host: Chris_Tacke (MVP):
Q: How do i "forcely" terminate an application?
Host: Chris_Tacke (MVP):
A: Call Application.Exit()
Host: Chris_Tacke (MVP):
Q: The code after Application.Exit is executed.
Host: Chris_Tacke (MVP):
A: The TerminateProcess() API will kill it. Another possibility would be to throw an exception and catch it in Main()
Host: Ben (Microsoft):
Q: Can we expect NumericUpDown to support decimal places and increments < 1 on the CF as they do on the desktop framework?
Host: Ben (Microsoft):
A: The NumericUpDown only supports whole numbers.
Host: Mark (Microsoft):
Q: Are there any future plans to support compilation to IL code in CF?
Host: Mark (Microsoft):
A: No, the compilers are too large and slow on the device.
Host: Mark (Microsoft):
Q: Does JIT under the CF work just like .Net for PC? (JIT methods on first invocation and store MSIL indefinitely).
Host: Mark (Microsoft):
A: The JIT is actually completely different. The netcf jit is much smaller and faster (because of the CPU limitations), the code is JITed the first time a method is run and cached in the garbage collected heap. If the EE needs to free up memory and a normal garbage collection doesn't free up enough, it will pitch JITed code to save space. The JITed code is all disposed when the process ends and isn't currently shared between processes.
Host: Mark (Microsoft):
Q: I am looking at releasing a .NETcf application - When will I be able to do this without the GOLive license?
Host: Mark (Microsoft):
A: As soon as VS 2003 ships (tentatively 1-2 months).
Host: Alex Feinman (MVP):
Q: Hints on "catching" the scroll events of a control?
Host: Alex Feinman (MVP):
A: Do you mean from ScrollBar controls? You will need to add a handler for the scrollbar control ValueChanged event.
Host: Mark (Microsoft):
Q: My company is investigating the NETCF in upgrading their current product written in embedded C++. Their biggest question is how often does MS plan on updating the NETCF with new features and will it stay within only the VS schedule.
Host: Mark (Microsoft):
A: The development tools will update with Visual Studio .NET and be on their schedule (as C++ will be soon). The .NETCF runtime and frameworks is currently planned (as always plans can change) to have more frequent updates to add new frameworks and ship with new versions of the Pocket PC.
Host: Chris_Tacke (MVP):
Q: Is there anyway to include the cf runtime in the same distribution cab as your application
Host: Chris_Tacke (MVP):
A: CabWiz.exe doesn't currently handle this easily. You can extract the files from the CAB and include them into your own CAB, but this is non-trivial because of the wide array of supported processors. MS plans to release a whitepaper in the coming months outlining how to do this.
Host: Mark (Microsoft):
Q: Any plans to add support for UserControls?
Host: Mark (Microsoft):
A: They are pretty much the same as custom controls, except design time. We're planning on adding support for design time in the next release.
Host: Kevin Boske (Microsoft):
Q: Can you give a developer a reason to step up to a WinCE4.x device from my trusty WinCE 3.0 PPC?
Host: Kevin Boske (Microsoft):
A: There are a number of new features to consider. It really depends on your device and application needs.
Host: Mark (Microsoft):
A: We are posting a public copy soon, if you need it now then ask a question on the newsgroup and somebody can get you a copy..
Host: Ben (Microsoft):
Q: Are there new features coming in the CF when VS.NET 2003 is released or is the current version the last for a while?
Host: Ben (Microsoft):
A: As Mark answered, the development tools will update with Visual Studio .NET and be on their schedule (as C++ will be soon). The .NETCF runtime and frameworks is currently planned (as always plans can change) to have more frequent updates to add new frameworks and ship.
Host: Mark (Microsoft):
Q: This chat was VERY timely for me. I'm to implement the same application on both PC and PPC platforms. Thanks.
Host: Mark (Microsoft):
A: Thanks, we checked your schedule before setting up the chat :)
Host: Kevin Boske (Microsoft):
Q: Shouldn't you use WIn CE 4.1+ instead of 4.x as the latter presumes 4.0 is supported
Host: Kevin Boske (Microsoft):
A: Yes, indeed, you should only use 4.1, 4.0 is not supported with .NET CF.
Host: Mark (Microsoft):
Q: Regarding .Net in general, we lost real edit and run in .Net are we ever getting it back?
Host: Mark (Microsoft):
A: I'm not sure what you're asking about, but the desktop team is trying hard to add edit and continue support, we unfortunately won't have it on the device though.
Host: Ben (Microsoft):
Q: Question about Help Click event supported in eVB
Host: Ben (Microsoft):
A: The .NET Compact Framework doesn’t support the help click event. It may be possible using the MessageWindow class to capture this event. Thanks for the feedback. We will provide a sample on gotdotnet demonstrating how to use the MessageWindow class.
Host: Mark (Microsoft):
Question for customers: Are you having much success using the newsgroups and getting the help you need?
Customers:
Newsgroups are really helpful, I've had much help.
Guest_FishFearMe says:
The MVP's etc. on the newsgroups have been quick to help and even follow-up ... they get an A.
Guest_Peter says:
The newsgroups are pretty good, along with Chris’s forums!
Moderator: Mikefos (Microsoft):
Thanks for joining us today and thanks for the questions. A special thank you to all our
Hosts today, including our MVPs Alex and Chris and SQL for CE gurus Marcin and Kevin who jumped in on short notice!
Top of page