compact-framework

"Getting started" questions for NUnit (or NUnitLite) and .NET CF

I have an existing VS 2005 Std .NET Compact Framework application that I want to do some major refactorings on. Currently there is no unit testing in place, but I want to add this before messing with the code. I have no practical experience with unit testing, even though I know the theory (just never got around actually implementing it; ...

Custom Control to show an Image: move the image inside

Hi! I'm developing and C# app for Windows Mobile. I have a custom control with OnPaint overrided to draw an image that the user moves with the pointer. My own OnPaint method is this: protected override void OnPaint(PaintEventArgs e) { Graphics gxOff; //Offscreen graphics Brush backBrush; if (m_bmpOffscreen == null) //Bit...

The custom tool 'msdiscocodegenerator' failed

I get this error when attempting to reference a Web Service in my Compact Framework application. Hunting through Google seems to indicate it's a common occurance, but there's been no useful suggestions as to what causes it, and how to fix it. I can successfully access the web service from a WinForms application by adding a Service Refere...

Serial port in Compact framework - RTSEnable and DtrEnable

How are RTSEnable and DtrEnable used? I am finding that some balances can communicate with my app but others can't even though the settings match. (baud rate, parity, data bits, stop bits and handshake) The serial port settings are saved in the configurations file and the idea is to support different combinations of the possible setting...

HTTP Progress in .Net Compact Framework

I'm working on an application that makes a lot of HTTP "Web Services" requests, some of which can be rather large XML files. Right now the HTTP request is made on a second thread, so the GUI/Form is not locked up. But it is still unable to give the user feedback as to the progress of the request. I've been using the HTTPWebRequest clas...

c# Compact Framework Not Supported Exception on Math.Sinh

Hi! I'm devolping on Compact Framework 2.0 SP1 and when I try to use Math.Sinh it throws me a Not Supported Exception If I can't use this function, is there any other alternative? Thanks! ...

Changing user password through .net CF application

Our user password expire every so often, and we need a way for a user to set a new password inside the CF application( CF2.0 WIncE5.0, HP thin client). Any ideas? My guess that I will have to use P/Invoke, and links would be appreciated. THanks much! ...

Cab Replace ALL FILES vs Replace one file

when the user clicks on cab file to update the app, I would like them to have the option to NOT replace all the files each time. Even though there are 2 choice in the dialogue that comes up, YES and YES TO ALL will replace ALL the files. ...

DataContractSerializer missing from the .NET Compact Framework

It appears that the DataContractSerializer isn't available in the .NET Compact Framework. I found this quite surprising, as I consider DataContractSerializer to be the Holy Grail of serialization, and one of the most widely useful classes introduced in .NET 3. Is there a way to get the same functionality under the Compact Framework, tha...

Different mscoree.dll entry points on the desktop & on a device?

In a smart device project I'm trying to Pinvoke a function that should supposedly be available in mscoree.dll. The associated definition is as follows: [DllImport("mscoree.dll", EntryPoint = "#29")] internal static extern int Object_GetHashCode(object obj); You'll find this with Reflector in the internal class EE in mscorlib.dll. Note...

How to determine the type of Windows Mobile device?

We have a Windows Mobile application which is currently running on Symbol (now Motorola) devices. We use the manufacturer's SDKs in order to do things like register barcode scans. We now need to make the software work with Intermec devices. I already have the scanning code abstracted behind an interface so all I need to do is wrap the ...

.net compact framework "Target framework"

With normal .net applications in the properties window you can change the .net framework of your application from 3.5 to 2.0. I'm looking for something like that for a pocket pc application, because I get an error on my pocket pc that my app requires a newer version of .net. and I can't find it anywhere in the properties. ...

Keypress event is triggered twice for a single ENTER button press in Windows CE

During development i have observed that certain PDAs with Windows CE and possibly Windows Mobile too are sending the Enter key twice in the key pressed event thus i execute twice the code that lies under the control's key press event for the return button. I suspect that this is a hardware bug and i would like to ask how you resolved it...

Determine transfered data size for a web service call in .NET CF

Hi, I'm developing a .NET CF client application and using web services for data transfer. I'm using SharpZipLib to compress transfered datasets so I know the size of the transfered byte array. I wonder is there an easy way to determine to complete request size (html headerder, soap envelops and the real data) for a single call. I reall...

ListView Checkbox toggles with Item Activation

I'm using a ListView in Compact Framework v3.5 that has the Checkboxes property set to true. The behavior I would like is that when an item is activated that the corresponding checkbox is toggled on/off. Searches through the Compact Framework newsgroups have found multiple postings bemoaning the exact behavior I want; the posters were a...

Serial Port ReadLine vs ReadExisting or how to read the data from serial port properly.

I am reading data from serial port. The data comes off the scale. I am now using Readline() and getting data dropped even after I removed DiscardInBuffer(). What is the proper way to read the data from the serial port? There are so few examples online that I feel it's like some holy grail that no one has figured out. Any help please? ...

serialport.Write() - how to format bytes properly

I am required to talk back to the scale by making it PRINT programmatically. The manual states that the print command is simply P ended with carriage return. I use the following code: Byte[] bytes = {80, 13}; _sp.Write(bytes,0,bytes.Length); But every other time I get ES code back from the scale which means error but it still prints...

Workaround for MethodBase.GetCurrentMethod() on Compact Framework 3.5

I want use a Linq IQueryable Toolkit in project on .NET Compact Framework. The Linq capabilities in CF is little bit shapred - i.e.: IQueryable interface is not available. So I've found third party libraries, which implements missing functionality what I need. Now I have problem with missing method "MethodBase.GetCurrentMethod()". There...

File encoding when reading a file with StreamReader

I am now having an issue where Celsius symbol gets read as C instead of °C. Looks like the encoding the culprit. I tried to do this: using (StreamReader sr = new StreamReader(this._inFilePath,System.Text.Encoding.Unicode ,true)) instead of using (StreamReader sr = new StreamReader(this._inFilePath)) but I a...

Converting file encoding after reading StreamReader in Compact Framework

I read the text file line by line, so far so good. I just use this: using (StreamReader sr = new StreamReader(this._inFilePath)) { string line; int index = 0; // Read and display lines from the file until the end of // the file is reached: ...