compact-framework

.net compact framework: Avoid program being started twice concurrently

How can I avoid that a user starts the same program twice? The current implementation tries to do that using "FindWindow", but since it takes some time before the program opens the first window, users regulary manage to start the program twice, causing errors etc. ...

Properties for custom control using in .NET Compact framework

Hi, I could able to display my custom controls properties in the property window (using EditorBrowsable() attribute). But I have another property which has class as it's return type. So the same property appearing in the window as read only format. I need property it should take the class values at design time just like, Font Name=...

Uninstall_Init / Uninstall_Exit How do i get access to them in C#

To get your windows mobile certified one of the requirements is that you implement these functions to get certified. I personally would love to use these functions to clean up the application data folder. I have been searching the Internet and i was only able to find a sample that was based on c++ / vb( link ) and is from 2004. Is there...

How to make a transparent Image in CF 2.0 without third party libraries?

Hello, is there a way, to make a picture transparent in CF2.0? I have to lay a small Image over a textbox, but it has to be transparent so the User can see the text anyway. Do you have an Idea? Thank you very much twickl Edit: Thanks for your answers, I will check those links out! To complete my Post, here is what I´m trying to do:...

Fast method to rotate image in .NET Compact Framework in C#

Is there a fast way to rotate images in .NET Compact Framework. I've found ways to do 90, 180,270, rotations but would like to be able to rotate images free form in similar speed. ...

Properly handling network timeouts on Windows CE

I'm trying perform a relatively basic TCP socket send/receive operation on Windows CE using the .NET Compact Framework. I'm trying set the timeout value so that reads/writes on a slow connection timeout instead of blocking forever. On the full framework I'm able to simply set the ReceiveTimeout and SendTimeout properties on the Socket ...

How to get the path of app(without app.exe)?

I want to get the path of my app like: "\\ProgramFiles\\myApp", I try to use the following code: string path = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase; But it returns a path which has "\\myapp.exe" at the end. I also tried: string path = System.IO.Directory.GetCurrentDirectory(); But it throws an “No...

Databinding a list in c# on Compact Framework

I'm currently learning to develop for the .net compact framework using c# in VS2008 and have a databinding query. The list binds fine in Form1_Load, however when I add additional people to the list they don't appear in dataGrid1 (although if I remove and re-add the binding they do appear). Is there something that I need to do after I ad...

What's the best method of Encryption whilst using ProtoBuf?

I've migrated my database on my mobile device away from VistaDB because it's just too slow. I'm now using ProtoBuf instead to create a series of flat files on a Storage Card, the only issue is there's obviously no encryption. Which encryption method works best with ProtoBuf? I'm basically serializing a collection of data entities to a f...

Specify client certificates in HttpWebRequest in .NET Compact Framework 2.0

I'm trying to specify a client SSL certificate using an HttpWebRequest. In the full framework version of my application I am able to simply use the ClietnCertificates collection property to add my client certs. Unfortunately, this property does not exist on the compact framework. Are there any other ways I could accomplish this? Mayb...

Developing a winforms application for both a tablet PC and WindowMobile

I'm developing an application for a Windows based tablet PC. This application is pretty much a port of an application I already developed on a Windows Mobile device using .NET CF. I want to write the application from scratch, taking advantage of all of the knowledge I've gained in software development. I'd also like to write this new ...

Accessing Cookies From Webbrowser Control

Hi There, I have a Windows mobile 6 application that contains a Webbrowser control to navigate some intranet sites. Is it possible to somehow access the know cookies that are being set by pages as they are displayed in browser control? Since the compact frame work haw no ObjectScripting method I cant figure any work around that could d...

C# CF2.0 - System.Activator and Internal classes

I've got a data provider that contains a collection of entities. I only want to be able to create a new entity through the data provider. I.e, to create a new record I need to use: Entity entity = Provider.AddNew(); enity.set_Properties... etc My issue is that if I set my entities to Internal, System.Activator cannot create an Instan...

HOW DO I: Pass aggregated data between unmanaged and managed code using a COM interface in the .NET Compact Framework V2?

I have a COM interface in my unmanaged C++ project that my managed C# code can find and use successfully. Currently, all the interface methods use simple type arguments like UINT and DOUBLE. What I want to do is to aggregate data into a single structure that my C# code can create and pass through the COM interface to my unmanaged C++ c...

Datagrid CurrentRowIndex returns -1??

This seems quite odd. I have a Datagrid (.net 3.5 cf) that I bind to either a List or Inventory[]. When I click on a row and then hit a button to perform an action when I bind to a List CurrentRowIndex is -1. When I bind to Inventory[] and perform the same action CurrentRowIndex comes back with the selected row why is that?? grdBat...

Cluster size in .NET Compact Framework

I'm trying to programatically determine the cluster size of a storage card, using C# / .NET Compact Framework, on Widows Mobile. For desktop Windows there's the GetDiskFreeSpace() function, but it doesn't exist in coredll.dll/Windows Mobile. Is there any other way I could find out the size of the cluster for a storage card? ...

C# - Determine if List<T> is dirty?

I am serializing Lists of classes which are my data entities. I have a DataProvider that contains a List. I always modify items directly within the collection. What is the best way of determining if any items in the List have changed? I am using the Compact Framework. My only current idea is to create a hash of the List (if that's po...

.net OutOfMemory exception

While making some final tests of a class-library that I'm writing for Windows Mobile (using Compact Net Framework 2.0), I ran into an OOM-exception. Basically, my library loads first a dictionary-file (an ordinary text file with a word list) and thereafter another file based upon the dictionary (I call it KeyMap) which size is more or ...

Get Modem Info in .Net Compact Framework

I am using .Net Compact Framework on a Windows Mobile 6 environment and I need to get a list of modems and the serial port that they're attached to. In the full .Net Framework it can be easily done using System.Management.ManagementObject class; but, unfortunately this is not available in .NET Compact Framework and I haven't found any o...

How can I identify which control I am in (vb.net cf)

Hello I have an issue with dynamic, runtime controls. I create a group of controls per record to display on a form. I add the record ID as a tag on each of the controls to identify which record they belong to. While rCONT.Read Dim txtphome As New TextBox txtphome.Name = "phone" + rCONT.Item("pcontID").ToString txtphom...