compact-framework

Increasing Windows Mobile 5 Emulator Storage

时间秒杀一切 提交于 2019-12-06 11:12:46
问题 I'm using the Microsoft Sync Framework to synchronize a SQL Server database with a SQL Compact SDF file on the Windows Mobile 5 emulator. We have a 2 gig SD card in the actual device we're deploying on so we'd like to store our database file there. However, when I map a shared folder as the storage card in the Windows Mobile 5 emulator, the SQL Compact engine is not able to create or modify a database file on the mapped storage card because of a bug. So to get past this during development on

OnActivated during constructor

人盡茶涼 提交于 2019-12-06 09:38:49
问题 When during the constructor of a Form I touch specific properties (ie. the Width property), it immediately invokes OnActivated() . I only notice this behavior on my device running Windows Embedded 7 and the .NET 3.5 that comes with it. Here's the code I use to reproduce the issue: static class Program { [MTAThread] static void Main() { new MyForm(); } } public class MyForm : Form { public MyForm() { Width = 100; } protected override void OnActivated(EventArgs e) { MessageBox.Show("Activated!"

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

梦想的初衷 提交于 2019-12-06 07:10:43
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, long lparam) { return 1; } Here is the sample which i was trying to take the window procedure of a form,

AsyncCallback for a thread on compact framework

血红的双手。 提交于 2019-12-06 06:59:55
问题 I need to implement threading to improve load time in a compact framework app. I want to fire off a background thread to do some calls to an external API, while the main thread caches some forms. When the background thread is done, I need to fire off two more threads to populate a data cache. I need the background thread to be able to execute a callback method so I know it's done and the next two threads can be started, but the BeginInvoke method on a delegate is not supported in the compact

Closing GPRS Connections On Windows Mobile

我们两清 提交于 2019-12-06 06:32:55
Is it possible to get all open or cached gprs connections on windows mobile and programmatic force them to close? Ive been looking at connection manager api but cant seem to find methods I to do this. Regards Tony Connection Manager can be notified that you're no longer using the connection by calling ConnMgrReleaseConnection , but that does not forcibly close the connection. It is closed based on the lifetime caching defined in the registry (HKEY_LOCAL_MACHINE\Comm\ConnMgr\Planner\Settings), as well as any info passed in the Release request. (BTW, these APIs are wrapped in the OpenNETCF

Is a mapping library like AutoMapper available on the .NET Compact Framework 3.5?

橙三吉。 提交于 2019-12-06 06:18:35
Is anyone working on a .NET Compact Framework port of AutoMapper or are there any similar mapping libraries for the .NET Compact Framework? Ruben Bartelink You could build on OmuMapper ? (UPDATE: @Omu himself has since built ValueInjecter ). (Obviously there's a strong chance this wont meet many challenges you might place in front of it. Are you really interested in all the AM features? Is size an issue? Any more context you can give?) EDIT: As they've RTW'd over at AutoMapper Maybe now is the perfect time to ask the question in their forum while the eyes of the world are watching. EDIT 2: 5

.net compact framework: Avoid program being started twice concurrently

纵然是瞬间 提交于 2019-12-06 05:37:24
问题 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. 回答1: You have to use a named mutex so it can be used across processes. For whatever (stupid) reason, the CF designers figured CF developers would never need such a thing, so you have 2 options: P/Invoke CreateMutex and the

Referencing private .net assemblies in a subfolder

江枫思渺然 提交于 2019-12-06 05:05:22
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 For other versions of the framework, this is what you would do: http://msdn.microsoft.com/en-us/library/twy1dw1e.aspx For compact, I suggest reading this:

Automated GUI Testing .NET CF (Windows Mobile 5)

北战南征 提交于 2019-12-06 04:54:31
问题 My company is looking into using automated GUI testing for our current app before proceeding to alpha. Our current main focus is robustness testing, one way we want to achieve this is automated UI testing that can be repeated over several hours/days. For our desktop version we've decided on AutomationElement, and I've seen several free open source frameworks. For .NET CF the options seem more limited. I found M-eux Test, but the license fee is a little bit steep. I also found Test Complete 7,

Clear combobox datasource items

吃可爱长大的小学妹 提交于 2019-12-06 04:44:46
问题 Combobox datasource has been assigned with cmbCombobox.DataSource = myCollection where myCollection has type MyCollection: List How can I clear items in combobox? 回答1: When you data bind a control, it will synchronize with that collection. In order to clear the items in your ComboBox set it's DataSource to null. cmbComboBox.DataSource = null; If your combobox is not databound (no DataSource) then you can do cmbComboBox.Items.Clear(); 回答2: http://support.microsoft.com/kb/327895 Me.ListBox1