compact-framework

playing a stream of PCM audio on .NET CF

I have a .NET CF library that produces PCM formatted data stream (as Stream object) from an MP3 file. I want to make my Windows Mobile phone to play the podcast I decode with that library. How can I play the PCM stream? I have tried PlaySound pinvoke stuff but does not work. It expects the entire song to be in memory as a WAVE file, whic...

Handling Different Resolutions in Visual Studio 2008 for .NET CF

I have a follow-up question to this one. I created a new form, inherited from an existing form, and in the designer I only see: "Visual Inheritance is currently disabled because the base class references a device-specific component or contains P/Invoke". Neither is the case. The base form contains a PictureBox and 2 labels, and even if...

HW-accelerated MP3 decoding in Windows Mobile-s

I have found some native C# libraries decoding MP3-s. I tried one and it did work fine on PC. But when I deployed it on my relatively new and powerful WinMo phone, it could not decode the mp3 files with the speed required for playing them. It was starving on CPU. I expect that most of our recent phones contain HW accelerated MP3 decodin...

XML vs Binary performance for Serialization/Deserialization

I'm working on a compact framework application and need to boost performance. The app currently works offline by serializing objects to XML and storing them in a database. Using a profiling tool I could see this was quite a big overhead, slowing the app. I thought if I switched to a binary serialization the performance would increase, bu...

Why use wcf over web services on .net Compact Framework?

Let us assume I'm using communicating from my mobile device to my server via WCF web service. I could also do this with a standard web service as well. I have read the WCF Guidance for Mobile Developers (http://wcfguidanceformobile.codeplex.com/), the only thing I see there is WCF has SSL support while straight web services do not. No...

The .NET CF ComboBox doesn't have a DropDown event, so what's the alternative?

I'm working on a .NET 3.5 SmartDevice project and I could really use the ComboBox DropDown event, but the .NET Compact Framework version doesn't have it. Is there another way to be made aware of when the list has dropped down? ...

Compact Framework Current Folder....

Hi... How do I know wich is the current folder of an App?? I mean... Is there a way to know where is the exe located from the running code? thanks in advance ...

Windows Mobile App - Play MMS Stream?

I'm trying to write a Windows Mobile app targeting Windows Mobile 6.x that will stream an internet radio stream delivered via MMS protocol (just one feature among other things). Does the .NET Compact Framework have built-in controls or API's that will do this? Or would I need to start looking for a third-party library? I'm a little co...

Resizing and saving an image in WinMobile and .NET CF throws OutOfMemoryException

I have a WinMobile app which allows the user the snap a photo with the camera, and then use for for various things. The photo can be snapped at 1600x1200, 800x600 or 640x480, but it must always be resized to 400px for the longest size (the other is proportional of course). Here's the code: private void LoadImage(string path) { Image...

Eliminating Ugly Switch Statement When Retrieving Resources

I am adding a splash screen to a .NET compact application and am wondering if there's an elegant way to access the correct bitmap (based on screen resolution) for the splash screen. e.g. My resource bitmap properties are named like this... Splash640480 Splash480640 Splash480480 Splash320240 Splash240320 Splash240240 ... etc I tr...

How can you turn on/off bluetooth programatically on .NET CF?

I write my little MP3 player app. I want to allow the user to chose audio output (speaker/headphone or bluetooth headset). How can I turn on/off the bluetooth capabilities of a Windows Mobile phone programatically? Once the connection with the BT headset is made, how can I get notified when the connection is broken/closed/lost? (Once BT...

Windows Mobile App - Play Stream Over MMS Protocol?

NOTE: This question is being reasked because I accidentally clicked Community Wiki in the previous one, and obviously that didn't provide enough incentive in the form of reputation for people to answer it. Here is a link to the old question, please do not duplicate those answers (they weren't exactly helpful anyway): Link to Original Q...

Lazy load forms

I have a .NET CF program (running on a Smartphone) and I have written an options page for it. On the options page I have links to 6 other forms which contain the actual options. When the main form loads it creates the 6 subforms and stores them in a list ready to be launched. The issue with this is the initial creation time required to...

Stop application running in background

I have a .NET application running on a Smartphone. I want a way for the application to close when it is pushed into the background. I.e. if a user presses the off button once itll take them to the desktop. The application is still running in the background though. I want a way to detect that the application is no longer in the foregro...

Is there an alternative for StructLayout "Pack" attribute in Compact Framework?

I would like to do the following: [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct SomeStruct { public byte SomeByte; public int SomeInt; public short SomeShort; public byte SomeByte2; } Is there an alternative since Pack is not supported in the compact framework? Update: Explicitly settin...

Hardware to begin .NET compact framework development

I am interested in starting some development with the .NET compact framework. What hardware devices would you recommend for all around testing? I would like to get two devices, one that has a lot of features and another that is representative of the average device. ...

Windows Mobile and storage location

On a Windows desktop system settings should be saved in the AppData folder for many reasons, including write access without being admin and the possibility to have different settings for different users. But what is the recommended way for Windows Mobile (.NET CF) applications? As far as I know there is just one user, so that argument d...

Is it practical to build an ad-driven Smartphone app? (Compact Framework)

Theoretically, it is possible to embed ads into a winforms app running on a smartphone, with .NET CF. Is it practical to do? Are there ads available in "the right size" for the compact device"? How would I get topical ads? Will I get the volume of ad clickthrough that would justify the engineering effort? How would I get started ...

Hooking up events and what to do with app afterwards

I have a basic SMS interception application on a windows mobile phone, currently this is a console application that hooks up the MessageReceived event of the MessageInterceptor class. Once i've done that my program runs to compleation, my Phone will then display the 'busy circle' untill I do something else but my event handlers still ge...

OpenFileDialog does not browse the folders under .NET CF

I have an WinMo app and I would like to open a file from the storage card. The file is NOT in the root but within the folder structure. I thought OpenFileDialog would do the trick just as it does under regular .NET. But it does not offer me to navigate over the folders. I looks really lame. Or am I just outstandingly stupid? ...