compact-framework

File encoding when reading a file with StreamReader

有些话、适合烂在心里 提交于 2019-12-11 05:49:45
问题 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 am now getting garbage....does the original file encoding have to match the StreamReader encoding? I am using compact framework 2.0. I have found this online, but if use this I have read it

Calling C# DLL from ASP on Compact Framework (Windows CE)

空扰寡人 提交于 2019-12-11 05:49:11
问题 I am writing an ASP application on Windows CE that will need to call business logic that exists in a .NET DLL (C#). It appears as though although the Compact Framework allows us to call native code from managed code, the CF doesn't allow us to call managed code from native code. - But, I'm not 100% sure on this. Has anyone had success using COM Interop to call methods from a managed dll from ASP on CF? If so, can you point me to where I can learn how to do it? If not, given that I must use

Get bitmap of an web page using WebBrowser Control in .net compact framework

試著忘記壹切 提交于 2019-12-11 05:46:50
问题 I am trying out to get the bitmap of web page loaded in web browser control, but found that WebBrowser.CreateGraphics() and even WM_PRINT (DrawToBitmap) message response is also missing in .net compact framework. After searching through internet found one of the .net sample code which gets complete web page in bitmap When i tried porting it through compact framework for windows mobile 6.0 found that most of the API and methods missing. How should i go ahead with it... Any help in this regard

Set tab control style on managed TabControl

爷,独闯天下 提交于 2019-12-11 05:41:17
问题 Is it possible to set a tab control style like TSC_BUTTONS on a managed TabControl? Windows CE 6 / .NET CF 3.5 回答1: With the caveat that I'm not specifically done this style change (though I've done plenty of others), according to the docs TCS_BUTTONS is a supported style. Since the managed TabControl is simply a wrapper around the native one, you should be able to P/Invoke SetWindowLong with GWL_STYLE and adjust this (probably in the constructor of a TabControl-derived custom control). 回答2:

Right to Left Layout Property in Below Code

纵饮孤独 提交于 2019-12-11 05:39:00
问题 I am creating my own custom progress bar control for windows CE .Net 2.0 C# Application. Below is the code which works fine the only thing missing is I want to show progress Right to left can anyone help me in modifying this code to get RTL property Code Refering using System; using System.Drawing; using System.Windows.Forms; class CustomProgressBar:UserControl { int min = 0; // Minimum value for progress range int max = 100; // Maximum value for progress range int val = 0; // Current

Create a full screen application

只愿长相守 提交于 2019-12-11 05:29:51
问题 We want our application to run in full screen mode with no title bar on a Win CE 5.0 powered device. The application is being developed using .NET Compact Framework 3.5 (C#). I have followed this tutorial, but I encountered an error. Here is my code: namespace DatalogicDeviceControl { public partial class Form1 : Form { public const int SWP_ASYNCWINDOWPOS = 0x4000; public const int SWP_DEFERERASE = 0x2000; public const int SWP_DRAWFRAME = 0x0020; public const int SWP_FRAMECHANGED = 0x0020;

Tweak timeout period for socket connections on Windows CE

孤者浪人 提交于 2019-12-11 04:54:45
问题 I'm testing how our software handles connection failures. We use socket.BeginConnect with a callback function set. The endpoint IP address and/or port number is deliberately invalid. The callback function gets called after ~21s every time (with timeout and connection failure, of course). I'd like to be able to tweak the timeout up or down for testing or final deployment. According to this MSDN article for Windows CE 5.0, the key HKLM\Comm\Tcpip\Parms\TcpInitialRTT looks helpful. But I've

Get Component's Parent Container in Compact Framework

岁酱吖の 提交于 2019-12-11 04:48:38
问题 I basically need to do the same thing as in: Get Component's Parent Form however in compact framework there is no definition of IDesignerHost Any idea how to do this? EDIT: It is System.ComponentModel.Component derived component that I want to drop on some System.Windows.Forms.Container control. The reason I need to reference to this is that I don't want to manually set Parent Container for my component in each form I will drop component to. 回答1: In the Compact Framework a Form's components

Accesing WinCE ComboBox DroppedDown property (.NET CF 2.0)

£可爱£侵袭症+ 提交于 2019-12-11 04:37:09
问题 I'm implementing custom behavior sub-classing the form controls, but I cannot manage to access the DroppedDown property of the ComboBox. Looking in the help, it's supposed to be supported in CF.NET 2.0: using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Text; using System.Windows.Forms; namespace xCustomControls { public partial class xComboBox : System.Windows.Forms.ComboBox { private ComboBox comboBox1; public

Storage Card Problem In windows mobile

纵然是瞬间 提交于 2019-12-11 04:20:04
问题 I m making windows mobile application, it refers some DLL's but i have some problem here. Imagine my application is installed in storage card related DLL's present in Storage card only, if i launch application it refers some of DLL, now i will remove the storage card, still my application will be running,it will not quit only ultimately it leads to restart of my mobile device.. i do get the divice card remove notification but its in DLL and its c++ code.. if card is removed no DLL will be