compact-framework

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

时光总嘲笑我的痴心妄想 提交于 2019-12-10 15:54:09
问题 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 and call BeginInvoke() on the run() method of each update to run it in the background. My update class has some events that are used to update a progress bar etc.

XAML & Windows Mobile (.Net Compact Framework)

对着背影说爱祢 提交于 2019-12-10 15:12:47
问题 Is there any support for XAML on the Windows Mobile? 回答1: maybe you could check out this project over there at sourceforge. it provides some kind of basic xaml support to create windows mobile UI´s. 回答2: Not from Microsoft, no. Windows CE R3 added a Silverlight (XAML) engine, but it's for native code only, and it's not yet propagated into any WinMo images. 来源: https://stackoverflow.com/questions/1650688/xaml-windows-mobile-net-compact-framework

C# .NET 3.5 CF on Windows CE, Changing row background color in a DataGrid

丶灬走出姿态 提交于 2019-12-10 14:34:45
问题 I am using C# .NET 3.5 CF developing for Windows CE. I am working on a dataGrid and need to know how to change the background color of a row on the dataGrid. Thanks in advance 回答1: You have to manually draw it. Here's a blog article describing "selecting" a row, which is just painting it with a different color. 来源: https://stackoverflow.com/questions/7163481/c-sharp-net-3-5-cf-on-windows-ce-changing-row-background-color-in-a-datagrid

Insert takes too long, code optimization needed

本小妞迷上赌 提交于 2019-12-10 12:16:40
问题 I've some code I use to transfer a table1 values to another table2 , they are sitting in different database. It's slow when I have 100.000 records. It takes forever to finish, 10+ minutes. (Windows Mobile smartphone) What can I do? cmd.CommandText = "insert into " + TableName + " select * from sync2." + TableName+""; cmd.ExecuteNonQuery(); EDIT The problem is not resolved. I'm still after answers. 回答1: 1] You can set the following parameters in your connectionString string connectionString =

Can anyone tell me were I am making mistake in the snippet

瘦欲@ 提交于 2019-12-10 11:28:03
问题 public partial class Form1 : Form { [DllImport("coredll.dll")] static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); const int GWL_WNDPROC = -4; public delegate int WindProc(IntPtr hWnd, uint msg, long Wparam, long lparam); public Form1() { InitializeComponent(); WindProc SampleProc = new WindProc (SubclassWndProc); SetWindowLong(this .Handle , GWL_WNDPROC, SampleProc.Method .MethodHandle.Value.ToInt32()); } public int SubclassWndProc(IntPtr hwnd, uint msg, long Wparam,

Lambdas, closed-over variables, display classes, serializability, and prevalence layers

a 夏天 提交于 2019-12-10 11:19:53
问题 I've implemented a prevalence layer for Compact Framework (including a BinaryFormatter -like serializer). I'd like to be able to serialize the compiler-generated classes that result from such things as lambdas and iterators where appropriate, so that if (for example) a lambda and its closed-over variables (that is, the display class instance) is added to an event on a serializable object, and all the closed-over variables are serializable, then the resulting object graph is still fully

Windows Mobile - 2 Way Call Recording (C#)

南楼画角 提交于 2019-12-10 11:15:42
问题 I need to implement 2 way (caller and receiver) call recording on Windows Mobile. I have gone through many forums and articles saying that it's hardware limitation and is not possible on all phones. I have downloaded one application from http://www.resco.net/pocketpc/audiorecorder/ which is running perfect on my phone and has 2 way recording capability. Is there any possibility of implementing same using .NET CF 2.0 (managed or unmanaged. although, managed is prefered.). EDIT: I found this

Get Host-IPs of wireless network

南笙酒味 提交于 2019-12-10 11:13:22
问题 Possible Duplicate: Get all IP-Hosts in Lan from mobile device How can I get programmaticaly all the hosts in a wireless network? I know the wlan I'm working in and I am connected to it. Now I want to show a list of the hosts (or at least their IP-Addresses). How can I accomplish this, and are there special points if I work on windows mobile with compact framework and want to do that? 回答1: There are lots of ways. For example: ARP: http://msdn.microsoft.com/en-us/library/aa366358%28VS.85%29

Referencing private .net assemblies in a subfolder

落花浮王杯 提交于 2019-12-10 10:49:24
问题 In Visual Studio 2008 I can add a project reference and set Copy Local property to true. As result the referenced assembly will be copied to the same folder the main assembly is build to. But what if I want to have all referenced assemblies in a subfolder near the main assembly? Something like this: .. myApp.exe Libs myLib1.dll myLib2.dll Data myDatabase.sqlite PS: This is the smart device application build against .NET Compact Framework 3.5 回答1: For other versions of the framework, this is

c# integer validation compactframework

大憨熊 提交于 2019-12-10 09:23:01
问题 Using the .Net Compact Framework 2.0, how can I validate an integer ( Int32.TryParse is not supported on the Compact Framework)? 回答1: What do you mean by "validate"? Do you mean parse without throwing? static bool TryParse(string s, out int value) { try { value = int.Parse(s); return true; } catch { value = 0; return false; } } 回答2: static bool TryParseImpl(string s, int start, ref int value) { if (start == s.Length) return false; unchecked { int i = start; do { int newvalue = value * 10 + '0