compact-framework

How can you tell if you're on the Main UI thread? (In CF)

Now unfortunately due to the fact that WinCE Usb Device Arrival / Removal exposes itself via WindowsMessages I have to ensure that a certain (non-UI) component is not created on a background thread. I would like to assert this via an exception but am lacking the code for the assertion. This component creates a MessageWindow* and uses it...

MessageWindow - How can I tell if it has been destroyed?

I'm working with C# and CF and I need to use a MessageWindow to intercept Windows Messages. There may be scenarios where the MessageWindow dies unexpectedly. This is a problem for me as the messages it is receiving are kinda important and i'd like to log the fact the Window has died. Unfortunately I don't see any way (at least not in M...

How do you find the number of rows in a DataGrid using .net compact framework?

How do you find the number of rows in a DataGrid using .net compact framework? ...

System.Drawing.Imaging.ColorMap equivalent on .NET Compact Framework

I have a need to use a ColorMap object in .NET Compact Framework but from what I can tell it is not available. Need some ideas on how to best workaround this limitation. ...

Efficient way to swap any given two colors in image using .NET Compact Framework

Is there an efficient way to take and image and be able to replace a given color with another given color using .NET Compact Framework? For example, to replace white with black or vice versa? ...

Playing YouTube videos in a Windows Mobile application

I am working on an application for Windows Mobile 6 (or maybe 5) that plays YouTube videos. Well, it should play YouTube videos (and control/query the player about status changes, current frame/time, etc.) After scouring the web for quite some time now (and a few trials), I still couldn't find a way to do this. The options I know of are...

DateTimePicker on .Net Compact Framework - Is it possible to edit the year using the popup keypad?

I'm working on an windows mobile application built using c#/dotNet in visual studio. There is a form with a DateTimePicker control. I can use the popup keypad to edit the day and month but it doesn't work for the year. Has anyone else had this problem? Any way to fix it? ...

Windows service for windows mobile

Hi, Can we write a windows service for windows mobile (Compact framework) which shall be activated on device start. Can you pl. provide link to resource / sample code for the same. Thanks. ...

How do I programmatically select a tab on a .NET CF TabControl?

With the .NET Framework 2.0/3.5 TabControl, I can programmatically select a tab using the SelectedTab property as shown in the code below: //toggles between tabPage1 and tabPage2 private void button1_Click(object sender, EventArgs e) { if (tabControl1.SelectedTab == tabPage1) tabControl1.SelectedTab = tabPage2; else ...

HttpWebRequest and SSL in .NET CF 3.5

We're making some calls to some very simple JSON web services in .NET CF 3.5 / Windows Mobile 6 and it appears that we've run into this bug: http://blogs.msdn.com/andrewarnottms/archive/2007/11/19/why-net-compact-framework-fails-to-call-some-https-web-servers.aspx Is it really almost two years later and this isn't fixed? Seems like a pr...

How do you hide a column in a datagrid using the .net compact framework 3.5

I have a DataGrid that is using a DataReader as its datasource. I want to hide the first column of the datagrid. I am using the .net compact framework 3.5. I can find examples for windows forms but the api is changed enough that they don't work. ...

Mysql connectivity from POcket pc application using .netcf 2.0

Hi, We are developing an order taking system in PDA using C# in .netcf 2.0. So we are having mysql server as our back end. Is that the web service is the only way to connect mysql with PDA? Or is any other methods available..? ...

Hosting a WebService/WCF on Windows Mobile Device?

I'm interessted in writing an application that is running on windows mobile. I've allready a winform application that is hosting an WCF service. I wan't to port the application to windows mobile (6.0) and up. MSDN is hosting an article about WCF on Compact Framework, but it says hosting is not an option yet. Do i have to write it all by...

Compact Framework Non Culture Specific Exception Messages

Hi Everyone, I have created an application in Compact Framework 2.0 This application is being used in many various counties and cultures. My Issue is that any and all exceptions are logged, but they are appearing in the culture of the device, in some cases this means i am unable to read them. Any help or suggestions will be appreciat...

HOWTO: Call Managed C# Interface From Unmanged C++ On WindowsCE Compact Framework

I have extensive unmanaged Windows CE 5 C++ code that provides a UI that I want to use in a new product by combining it with a large amount of newer business and communications logic written in managed C# on Windows CE 6 and the Compact Framework. The UI may know about the business logic, but I want the business logic ignorant of the UI...

How can I achieve non-infinite receive and send timeouts on a socket under Compact Framework?

On full .Net Framework I use the following code: socket.SetSocketOption( SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, readTimeout); socket.SetSocketOption( SocketOptionLevel.Socket, SocketOptionName.SendTimeout, writeTimeout); However, Windows Mobile does not support this and throws exceptions. I am currently in the...

How to do Alpha Blending at design time for a Compact Framework Control

I'm designing a Compact Framework Control that supports transparency and for the runtime version of the control everything works just find doing the platform invoke on this API: [DllImport("coredll.dll")] extern public static Int32 AlphaBlend(IntPtr hdcDest, Int32 xDest, Int32 yDest, Int32 cxDest, Int32 cyDest, IntPtr hdcSrc, Int32 ...

What is the DataGrid MappingName for a non DataTable DataSource?

I am able to Bind my DataGrid in .NET 3.5 CF to a List() but I am unable to format the columns by specifying their width. Below is the code that looks like it should work but does not. I am pretty sure that I am not setting the MappingName correctly as all tutorials tell you to set it to the name of your DataTable but I am not binding t...

Annoying message when I start a debug session in the Windows CE 4.1 emulator

I have to maintain an old Compact Framework application written for Windows CE 4.1 in Visual Studio 2003 (sigh!). It's the German localized version of Visual Studio 2003. Every time i start a debug session in the WinCE emulator, I get this message on the virtual device: "Microsoft .NET CF 1.0 DE-String ist bereits installiert. Mö...

Adding files to project from Code while in design mode

Hi What I am trying to do is add resx files (or ant other file) to the project when I change a property on a form/control while in design time. I looked at orientation aware control from Clarius that does exactly this but I looked at their dll with reflector and can't seem to find out how to do this. Thanks ...