compact-framework

Compact Framework - how to wait for thread complete before continuing?

I have some code for starting a thread on the .NET CF 2.0: ThreadStart tStart = new ThreadStart(MyMethod); Thread t = new Thread(tStart); t.Start(); If I call this inside a loop the items complete out of order. How do introduce a wait after t.Start(), so that the work on the thread completes before the code continues? Will BeginInvoke/...

Getting DirectoryNotFoundException when trying to Connect to Device with CoreCon API

I'm trying to use the CoreCon API in Visual Studio 2008 to programmatically launch device emulators. When I call device.Connect(), I inexplicably get a DirectoryNotFoundException. I get it if I try it in PowerShell or in C# Console Application. Here's the code I'm using: static void Main(string[] args) { DatastoreManager dm = n...

Zip library options for the Compact Framework?

My requirements: Support .NET Compact Framework 2.0 and Windows Mobile 6.0 devices. Only need to unzip the contents to a directory on a storage card. Creation of zip files is not required. Must be able to use in corporate/commercial software. Can be open source, but not have GPL or other viral license. I've seen the Xceed Zip for CF ...

Center text output from Graphics.DrawString()

I'm using the .NETCF (Windows Mobile) Graphics class and the DrawString() method to render a single character to the screen. The problem is that I can't seem to get it centered properly. No matter what I set for the Y coordinate of the location of the string render, it always comes out lower than that and the larger the text size the g...

Compact Framework/Threading - MessageBox displays over other controls after option is chosen

I'm working on an app that grabs and installs a bunch of updates off an an external server, and need some help with threading. The user follows this process: Clicks button Method checks for updates, count is returned. If greater than 0, then ask the user if they want to install using MessageBox.Show(). If yes, it runs through a loop an...

Whats the best way of finding ALL your memory when developing on the Compact Framework?

I've used the CF Remote Performance Monitor, however this seems to only track memory initialised in the managed world as opposed to the unmanaged world. Well, I can only presume this as the numbers listed in the profiler are way short of the maximum allowed (32mb on CE 5). Profiling a particular app with the RPM showed me that the total ...

Has anyone used NUnitLite with any success?

I've recently started work on the Compact Framework and I was wondering if anyone had some recommendations for unit testing beyond what's in VS 2008. MSTest is ok, but debugging the tests is a nightmare and the test runner is so slow. I see that NUnitLite on codeplex is an option, but it doesn't look very active; it's also in the roadma...

Alpha blending colors in .NET Compact Framwork 2.0

In the Full .NET framework you can use the Color.FromArgb() method to create a new color with alpha blending, like this: Color blended = Color.FromArgb(alpha, color); or Color blended = Color.FromArgb(alpha, red, green , blue); However in the Compact Framework (2.0 specifically), neither of those prototypes are valid, you only get:...

How can I get the name of the executing .exe?

The Compact Framework doesn't support Assembly.GetEntryAssembly to determine the launching .exe. So is there another way to get the name of the executing .exe? EDIT: I found the answer on Peter Foot's blog: http://peterfoot.net/default.aspx Here is the code: byte[] buffer = new byte[MAX_PATH * 2]; int chars = GetModuleFileName(IntPtr....

Compact Framework - Is there an MVC framework/library available?

I've found an article on this subject by a Microsoft employee, but has anyone implemented a more robust framework for this? Is there a lightweight framework for WinForms that could be ported easily? I'd like to get up to speed fairly quickly and avoid producing a framework/library of my own to handle this when someone smarter has already...

Compact Framework - how do I dynamically create type with no default constructor?

I'm using the .NET CF 3.5. The type I want to create does not have a default constructor so I want to pass a string to an overloaded constructor. How do I do this? Code: Assembly a = Assembly.LoadFrom("my.dll"); Type t = a.GetType("type info here"); // All ok so far, assembly loads and I can get my type string s = "Pass me to the cons...

.Net Compact Framework scrollbars - horizontal always show when vertical shows

I am new to the .Net Compact Framework and have been unable to find an answer via Google. Gasp! Yes, it's true, but that is part of why stackoverflow is here, right? I have a form that is longer than the screen, so a vertical scrollbar appears as expected. However, this appears to force a horizontal scrollbar to appear as well. (If I sc...

Compact Framework - Lightweight GUI Framework?

Winform on CF is a bit heavy, initialising a lot of windows handles takes serious time and memory. Another issue is the lack of inbuilt double buffering and lack of control you have over the UI rendering means that during processor intensive operations the UI might leave the user staring at a half rendered screen. Nice! To alleviate thi...

3rd Party UI components for .net Compact Framework?

I have a .Net compact framework application with a frankly unimpressive UI. My win32 app uses Dev Express components and looks great, but I can't find anything similar for the compact framework. Can anyone recommend components that will jazz up my UI? Does such a thing exist, oram I going to have to owner draw my components or even wo...

How can I expose only a fragment of IList<>?

I have a class property exposing an internal IList<> through System.Collections.ObjectModel.ReadOnlyCollection<> How can I pass a part of this ReadOnlyCollection<> without copying elements into a new array (I need a live view, and the target device is short on memory)? I'm targetting Compact Framework 2.0. ...

IRAPIStream COM Interface in .NET

I'm trying to use the OpenNETCF RAPI class to interact with a windows mobile device using the RAPI.Invoke() method. According to the following article: http://blog.opennetcf.com/ncowburn/2007/07/27/HOWTORetrieveTheDeviceIDFromTheDesktop.aspx You can do the communication in either block or stream mode. I have used block mode before, bu...

MAC address in Compact Framework

How can I get the MAC Address using only the compact framework? ...

Transmiting data throught the Serial Port

I'm working with the SerialPort class in the Compact Framework, but I can't recive more than 2047 bytes. Exists any limit for the amount of bytes that I can recive? or How can I setup the object? I was trying with the WriteBufferSize and ReadBufferSize properties but they didn't work. ...

What's the best way to embed video in a Windows Mobile 6 application?

App needs to run on the .Net Compact Framework v.3.5. Video can be any format, but I do need to be able to know when it's finished playing, so I can start another one. I'm hoping for a method that doesn't involve unmanaged code, if possible. ...

Determine Installed Compact Frameworks (and SP) Version

What's the best way to determine which version of the .NET Compact Frameworks (including Service Packs) is installed on a device through a .NET application. ...