.NET Compact Framework and Smart Device Programming (October 11, 2005)

Please note: Portions of this transcript have been edited for clarity

**Introduction:*

mikefos_msft (Moderator):
** Welcome to today’s MVP-hosted chat concerning Smart Device Programming with Visual Studio .NET 2003. We do have a number of Microsoft folks online today as well. We are pleased to welcome our Experts for today’s chat. I will have them introduce themselves now.
Ginny Caughey (Expert):

Hi I'm Ginny Caughey. I'm president of Carolina Software Inc - an ISV company based in North Carolina specializing in apps for the solid waste industry.
sandeepp_MSFT (Expert):
*
Hi, I'm Sandeep Prabhakar a dev on the .NET Compact Framework team.
DanielMoth (Expert):**
Hi, I am Daniel Moth, Principal Consultant for Avanade, OpenNETCF.org Advisory Member and NETCF MVP. Visit my blog here: https://www.danielmoth.com/Blog/
timg_msft (Expert):**
Hi, I'm Tim Gerken, Software Development Test lead for the .NET Compact Framework. My specific responsibilities include the core execution engine and servicing. I also have expertise in Windows.Forms and most of the rest of the managed BCL.
Laxmi NRO [MSFT] (Expert):**
Hello folks, This is Laxmi NRO, Microsoft SQL Mobile Developer
Mark Arteaga (Expert):**
Hi, I'm Mark Arteaga (.NET Compact Framework MVP) OpenNETCF.org contributor and President of Neoteric Software Development Company.
baladutt_MSFT (Expert):**
Hi, I am SQL Mobile Developer.
Alok_MSFT (Expert):**
Hi, I am Alok. I work for SQL Mobile Team
jessev_MSFT (Expert):**
Hi, I'm Jesse Vaught, Software Development Test lead for the .NET Compact Framework. My specific responsibilities are integration into products such as WindowsCE & WindowsMobile.
AlexYakhnin (Expert):**
Hi, my name is Alex Yakhnin I am an owner of the IntelliProg, Inc. and a member of Advisory Board of OpenNETCF.org

Sachin_MSFT (Expert):
** Hi, I'm Sachin, PM in SQL Mobile group
mikefos_msft (Moderator):

Let’s begin the chat. We welcome you to begin submitting your questions for our Experts!

Start of chat:

Ginny Caughey (Expert):
Q:
could opensource.org framework be used for low layer driver development? Or even LSP stuff or NDIS stuff
A: I'm not sure if you mean OpenNETCF? If so, the answer is no. If not, I'm afraid I don't understand the question. ;)

Ginny Caughey (Expert):
Q:
Hi... I realize you have Opensource.org name in the description of today's chat... interesting enough I was looking at their website couple of days ago... what are they all about? is the framework opensource? is there a fee to use it? could it be used for
A:OpenNETCF.org is devoted to providing free code, samples, discussions, and blogs all about the .NET Compact Framework. Visit us at www.opennetcf.org. The framework is shared source - you can see our license online. There is no fee to use the code.

DanielMoth (Expert):
Q:
If I create a Smart Device Class Library and use DataSets within, will it correctly work in the WinForms platform?
A: In general, a netcf dll will retarget to the desktop and work unless you are using device specific functionality (pinvokes, irda, sqlce etc). I am not aware of specific limitations with datasets. Also see my post here: https://www.danielmoth.com/Blog/2004/09/retargetable-256.html

Ginny Caughey (Expert):
Q:
If I create a Smart Device Class Library and use DataSets within, will it correctly work in the WinForms platform?
A: As far as I know using a DataSet from the Compact Framework on the desktop should work, but I haven't actually tried it.

Mark Arteaga (Expert):
Q:
Hello, I think I read somewhere that the compact framework is more "deterministic" regarding the garbage collection than the standard .NET framework. Is it so, and how is it so ?
A: Garbage collector is non-deterministic on .NETCF

DanielMoth (Expert):
Q:
Hello, I think I read somewhere that the compact framework is more "deterministic" regarding the garbage collection than the standard .NET framework. Is it so, and how is it so ?
A: In addition, check out this for how it works and differs for the desktop: https://blogs.msdn.com/stevenpr/archive/2004/07/26/197254.aspx

sandeepp_MSFT (Expert):
Q:
Hello, I think I read somewhere that the compact framework is more "deterministic" regarding the garbage collection than the standard .NET framework. Is it so, and how is it so ?
A: Maybe this blog on the .net compact garbage collector will help: https://blogs.msdn.com/stevenpr/archive/2004/07/26/197254.aspx

DanielMoth (Expert):
Q:
A question for the OpenNETCF representative: I've tried to delete Registry sub-keys and it just doesn't work. Are you fellows aware of this bug and working to fix it?
A: Personally I am not aware of it. Have you reported that anywhere? We have a bugs database that anyone can report to or you could even post a complete repro in the newsgroup and one of us will pick it up...

DanielMoth (Expert):
Q:
Re deleting registry keys: I did report it in the OpenNETCF forums. I am not aware of the Bugs Database. What's the URL for it?
A: https://bugs.netcf.tv/

AlexYakhnin (Expert):
Q:
Hi, is there a way, programmatically, to tell the system that the device is in used so it won't turn itself off during the running of the application?
A: What can do is to call the SystemIdleTimerReset API

AlexFeinmanMVP (Expert):
Q:
I've successfully added a gradient background to my CF app but I can't find a way to properly display an image (with a true transparent background). Does anyone know a workaround so that an image will display correctly on top of such a gradient background?
A: In order to draw an image transparently, use Graphics.DrawImage overload that takes ImageAttributes as the last parameter. In the ImageAttributes element use SetColorKey to specify a transparent color (both lowColor and highColor must be the same)

KGrey MSFT (Expert):
Q:
I've successfully added a gradient background to my CF app but I can't find a way to properly display an image (with a true transparent background). Does anyone know a workaround so that an image will display correctly on top of such a gradient bkgrd?
A: Have you tried seen this article: https://msdn2.microsoft.com/en-us/library/ms172507 ?

Ginny Caughey (Expert):
Q:
Sorry for my late reply. I'll look at the blog (about garbage collection), but could the CF make a better job than the regular .NET framework regarding the "unavailable" time during which it collects data (so I won't "feel" a momentary pause) ?
A: The .NET Compact Framework team is always looking for better garbage collection algorithms, and they have made some improvements for version 2.

DanielMoth (Expert):
Q:
So basically, it is the same garbage collection algorithm ?
A: No it isn't. Please read that blog entry. e.g. no generations, 750K collection etc

Ginny Caughey (Expert):
Q:
So basically, it is the same garbage collection algorithm ?
A: The garbage collection algorithm for version 2 is somewhat different, but the GC is still non-deterministic. Here's a good blog entry: https://blogs.msdn.com/mikezintel/archive/2004/12/08/278153.aspx

DanielMoth (Expert):
Q:
Is it possible to change the width of the vertical scrollbar on a listview or to disable it?
A: You can only change it system wide not for a specific listview. If you want to make it wider there is a hacky workaround: https://www.danielmoth.com/Blog/2005/02/listview-with-scroll-events-and.html

sandeepp_MSFT (Expert):
Q:
Is there a way to "anonymously" populate a collection? I'm populating it with data from an XML file and never figured out how to pass a collection to a method and have it add the necessary elements. Instead I had to hard code for each type of collection.
A: In VS 2005, you should be able to use generics to determine the type of elements in the collection

DanielMoth (Expert):
Q:
Ok thanks. One last question, we are targeting the Windows XP embedded platform, using Visual Studio .NET 2003. I am confused if we don't need also a part of Embedded VC++ ?
A: The compact framework (or eVC) do not come into it with XPe. You can use the full fx or regular C++

DanielMoth (Expert):
Q:
When will VS 2005 and the .Net CF 2.0 be commercially available?
A: November 7th

DanielMoth (Expert):
Q:
When will VS 2005 and the .Net CF 2.0 be commercially available?
A: Also note that the netcf build in the RC is the same as what will ship with RTM.

DanielMoth (Expert):
Q:
Any chance that .Net CF 2.0 will work with VS 2003?
A: Sorry, no.

Ginny Caughey (Expert):
Q:
Any chance that .Net CF 2.0 will work with VS 2003?
A: I haven't tried it, but I doubt it works. There are so many great new tools for device development in VS 2005 that it would be a shame to miss those even if you could get it to work though.

Ginny Caughey (Expert):
Q:
When copying a file from a desktop to a PPC it appears that ???rapi.GetDeviceFileSize??? doesn???t work with WiFi connection (but does with a USB connection). Is there another way to monitor the growing file being copied, so I can update a progress bar correctly?
A: Are you using Activesync 4.0 or 3.8?

bozennal (Expert):
Q:
Hello, When i try to load a large image(.jpg), I get an Exception with "Exception" as the message. The only way to get it to load is to go to memory settings and adjust distribution between programs and storage AND restart application, is this a known bug?
A: It’s not a bug, it’s a design

DanielMoth (Expert):
Q:
Another question(sorry if this isn't the right place for this one) : How do you become and MVP/eMVP?
A: Demonstrate expertise for a technology and a passion for sharing it with the community. That's my view anyway...

mikefos_msft (Moderator):
Q:
Another question(sorry if this isn't the right place for this one) : How do you become and MVP/eMVP?
A: Daniel is pretty on-target there. Basically, it's proving yourself to be recognized, credible and accessible within a technical community (online or offline). More information can be found here: https://mvp.support.microsoft.com/.

AlexFeinmanMVP (Expert):
Q:
Is there a way to "anonymously" populate a collection? I'm populating it with data from an XML file and never figured out how to pass a collection to a method and have it add the necessary elements. Instead I had to hard code for each type of collection.
A: This should be easier to do in VS2005 using generics

jessev_MSFT (Expert):
Q:
Sorry for my late reply. I'll look at the blog (about garbage collection), but could the CF make a better job than the regular .NET framework regarding the "unavailable" time during which it collects data (so I won't "feel" a momentary pause) ?
A: Checking with the EE Program Manager, Steven Pratschner, regarding the GC performance question, "We've definitely made huge improvements in GC performance in V2 by making some changes in the algorithm and in the way we use the CE memory management APIs. Allocation tests show an increase of about 5x. But that's just allocation time. Collection time is the other cost, but that varies so much depending on how many live, reachable objects are available at any given time. Look to my blog, https://blogs.msdn.com/stevenpr/, once VS 2005 is released for more specific numbers."

AlexYakhnin (Expert):
Q:
Is there a faster way for pulling lookup tables down to the device than using RDA? Some have around 4 rows other have 15000... (hoping someone will answer the URL Exception Q)
A: It should be faster with SQL Mobile and CF v2

Laxmi NRO [MSFT] (Expert):
Q:
Is there a faster way for pulling lookup tables down to the device than using RDA? Some have around 4 rows other have 15000... (hoping someone will answer the URL Exception Q)
A: RDA should be fast as it is simple compared to Merge Replication which is very complex. If you find RDA Slow, can you please tell us more about the platform where you are finding it slow and what is the memory on the device. What is main memory and what is card memory. Which verion of SQL CE you have tried? ... etc.

AlexFeinmanMVP (Expert):
Q:
I've built my own installation engine (in WinForms) to provide a more automated way to provide CF updates whenever a PPC is connected. But there seems to be no simple way to determine which CAB file should be uploaded. Any improvements on this is VS2005?
A: There were no specific improvements in this area. You still have to write the code that detects the platform. You still need to write your own RAPI code or use OpenNETCF SDF Serial class. Essentially, nothing changed since 1.0 except that writing P/Invoke code became easier

PeterFoot (Expert):
Q:
Is it possible to programmatically enter in URL Exceptions under My Work Network? Which reg keys would this be?
A: You can use the XML configuration - CM_MAPPINGS (see the SDK or MSDN documentation) to setup mappings based on url patterms. This can be passed through DMProcessConfigXML P/Invoke or Microsoft.WindowsMobile.Configuration on WM 5.0

sandeepp_MSFT (Expert):
Q:
When installing a new version of my PPC software I always get a "Do you want to reinstall?" dialog box on the PPC. I've tried several tricks to make it not appear but to no avail; Daniel Moth helped me out with this too. Does anyone know a way?
A: Maybe this blog from Alex might help: https://blog.opennetcf.org/afeinman/PermaLink,guid,1de2284c-a65e-417c-a130-1bd5acd4ad3d.aspx

DanielMoth (Expert):
Q:
Are there any problems / what are the implications of using VS 2005 to target WM 2003 devices?
A: The only implication I am aware of is that you get a better IDE and SP3 pushed to the device if it doesn't already have it.

Ginny Caughey (Expert):
Q:
Are there any problems / what are the implications of using VS 2005 to target WM 2003 devices?
A: I haven't had any problem targeting WM 2003 devices with VS 2005. Are you having problems like that, and if so, with which beta version of VS 2005?

DanielMoth (Expert):
Q:
Is there any support for SMS messages in the managed framework in 2005,or do we still have to use dlls made with eVC++?
A: Not in netcf v2.0 but there are managed libraries that ship with WM 5.0 For WM2003, InTheHand has a library. Peter Foot can give you the URL

Ginny Caughey (Expert):
Q:
When a CF application is starting up, what is the best way to get it to display a "Please Wait" message (or splash screen) ? Whenever I try to do this, it never displays when I want it to.
A: If you have a really long-running process in your main app, you can use a separate app to display a splash screen that will close itself automatically on a timer after loading your main app.

PeterFoot (Expert):
Q:
Hi, is there a way, programmatically, to tell the system that the device is in used so it won't turn itself off during the running of the application?
A: You can P/Invoke SystemIdleTimerReset periodically to reset the system timer which will stop it from suspending...

timg_msft (Expert):
Q:
When a CF application is starting up, what is the best way to get it to display a "Please Wait" message (or splash screen) ? Whenever I try to do this, it never displays when I want it to.
A: Robert, David Kline has a great article (https://blogs.msdn.com/davidklinems/archive/2005/08/17/452804.aspx) in his blog (https://blogs.msdn.com/davidklinems/) about exactly this.

DanielMoth (Expert):
Q:
error 193 with hChain = LoadIntChainHandler(_T("ITDriver.dll"), _T("ISRHandler"), (BYTE)dwIrq);
A: Sorry, this has nothing to do with netcf or vsd.

DanielMoth (Expert):
Q:
Peter Foot, Daniel mentioned a library and said you can give me a URL to it...please do...:)
A:https://www.inthehand.com/WindowsMobile.aspx SMS coming soon

DanielMoth (Expert):
Q:
last question b4 the time's up: when changing images on a toolbar, changing menu item text, or changing scroll bar values from inside a delegate(user defined), the app freezes, any ideas?
A: You are probably doing this from a worker thread. You must use Control.Invoke: https://www.danielmoth.com/Blog/2004/10/invoke-cf-and-full-fx.html

AlexYakhnin (Expert):
Q:
Does anybody know if I can upgrade my samsung sph-i700 to WM5.0? I currently have 2003...
A: The upgrades are provided by OEM's or Wireless providers

Ginny Caughey (Expert):
Q:
Does anybody know if I can upgrade my samsung sph-i700 to WM5.0? I currently have 2003...
A: You would need to contact the OEM for questions about WM 5.0 upgrades.

**mikefos_msft (Moderator):
** Thank you for joining us today for our MVP-hosted chat concerning Smart Device Programming with Visual Studio .NET 2003. I’d like to sincerely thank the MVPs and Microsoft representatives who helped out today! Thanks folks!!

If your question does not get answered today, we do apologize and would request that you post the question to the compactframework newsgroup where we can follow up. We hope to see you again for a future chat!

Top of pageTop of page