windows-mobile

To close or not to close connection in database

大憨熊 提交于 2019-12-01 15:58:14
I work with Windows-Mobile and Windows-CE using SqlCE and I dont know what better to do. To open connection when the program open, run any query's... update...delete database and close the connection after the program close? Or open connection run any query's..update...delete database and close the connection immediately? Nice. The answers are all over the place. Here's what I know from experience and interacting with the SQL Compact team: Closing the connection flushes the changes you've made, otherwise the engine waits for the flush period before doing it. It's a good idea to close the

Getting the size (free, total) of a Windows Mobile phone drive using C#

与世无争的帅哥 提交于 2019-12-01 12:58:02
问题 How do I get the size (free, total) of any drive on a Windows Mobile phone using C#? I need to do this with code running on the device (not on a connected PC). 回答1: I've rewritten the answer based on a better understanding of the question, but without losing any of my original answer for those who find this question. Getting the size from code running on the device The answer is simple: P/Invoke GetDiskFreeSpaceEx directly (example here) or use a third-party library that does it for you. I'm

Fullscreen application WM6 C#

血红的双手。 提交于 2019-12-01 07:39:22
Can anyone point me in the direction of how to create a full screen application in C# for Windows Mobile 6? I'm trying to achieve a similar display to applications such as Tom Tom where all the OS elements such as the Start/Task bar are hidden and my application completely fills the screen. I'm using VS 2008 with .Net 3.5 Thanks in advance! OneSHOT I don't know if it's any different in WM6, but in WM2003 I was able to "hide" the taskbar etc by simply setting WindowState to Maximized on all the forms in my application. Like what Matt Hamilton said, but form personal experience sometimes on (

CordovaStarter-x.x.x.zip not found with phonegap for windows mobile

雨燕双飞 提交于 2019-12-01 06:26:12
I was going through the getting started guide for windows phone in phonegap ( cordova ) and I completed Download and install Windows Phone SDK Download the latest copy of Cordova and extract its contents The next step is * copy the file CordovaStarter-x.x.x.zip to the folder : \My Documents\Visual Studio 2010\Templates\ProjectTemplates* I could not find the zip file with cordova, which I downloaded. Could anyone please help me out. CordovaStarter-x.x.x.zip is a template , to start with phonegap-windows. If it is missing in your downloaded content you can create it. Open the file lib\windows

error RC2176 : old DIB in res\icon3.ico; pass it through SDKPAINT?

流过昼夜 提交于 2019-12-01 05:06:04
问题 what is this Error, and how to resolve it? I am using Visual studio 2005 for Smart device MFC developement, Is upgrading to 2008 can solve my problem. Error 85 error RC2176 : old DIB in res\icon3.ico; pass it through SDKPAINT Thanks 回答1: this might help you: http://www.axialis.com/tutorials/vistaicons.html It looks like vista icons now use PNG headers. The error is slightly false though as its not an old DIB its just a header it doesn't recognize, PNG. How was that icon created? Long ago

Column width of a DataGrid in a Windows Mobile Application

一世执手 提交于 2019-12-01 04:53:17
I'm having problems trying to adjust the width of a column of a datagrid. I used the answer posted here , but I can't solve it. I'm using a List of objects as a datasource. In this simple example, I have just created a smart device application, and just added a datagrid. Then my code is this one: public Form1() { InitializeComponent(); List<Prueba> lista = new List<Prueba>(); lista.Add(new Prueba("uno", "dos")); lista.Add(new Prueba("tres", "cuatro")); dataGrid1.DataSource = lista; DataGridTableStyle tableStyle = new DataGridTableStyle(); tableStyle.MappingName = lista.GetType().ToString();

What is the DataGrid MappingName for a non DataTable DataSource?

与世无争的帅哥 提交于 2019-12-01 03:52:38
问题 I am able to Bind my DataGrid in .NET 3.5 CF to a List() but I am unable to format the columns by specifying their width. Below is the code that looks like it should work but does not. I am pretty sure that I am not setting the MappingName correctly as all tutorials tell you to set it to the name of your DataTable but I am not binding to a DataTable so I am not quiet sure what to do. grdBatch.DataSource = InventoryItems; DataGridTableStyle tableStyle = new DataGridTableStyle(); tableStyle

How do you get the current directory in compact framework?

懵懂的女人 提交于 2019-12-01 02:49:26
How do you get the current directory where your app is running? You could try this: using System.IO; using System.Reflection; namespace Utilities { static public class DirectoryHelper { static public string GetCurrentDirectory () { return Path.GetDirectoryName (Assembly.GetExecutingAssembly ().GetName ().CodeBase); } } } Try this: Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); Public Shared Sub WriteDBStatus(ByVal strString As String) Try Dim FILE_NAME As String = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase) + "\DBStatus" Dim sr As IO

Column width of a DataGrid in a Windows Mobile Application

时光毁灭记忆、已成空白 提交于 2019-12-01 02:08:58
问题 I'm having problems trying to adjust the width of a column of a datagrid. I used the answer posted here, but I can't solve it. I'm using a List of objects as a datasource. In this simple example, I have just created a smart device application, and just added a datagrid. Then my code is this one: public Form1() { InitializeComponent(); List<Prueba> lista = new List<Prueba>(); lista.Add(new Prueba("uno", "dos")); lista.Add(new Prueba("tres", "cuatro")); dataGrid1.DataSource = lista;

How to attach Messages from a Form shown with ShowDialog to Application2?

徘徊边缘 提交于 2019-11-30 22:56:21
I am trying to use the code in this article that lets you know when your app is idle.. This code works great if your application has only one form. You call Application2.Run(myOnlyForm) on it and all messages get routed through the filters in Application2. However if at any point you call mySecondForm.ShowDialog() that dialog does not get its messages filtered through Application2. Is there any way (with out bad side effects) to get the messages on mySecondForm to go through the `Application2' event filters? I have tried: Changing mySecondForm.ShowDialog to Application2.Run(mySecondForm) .