compact-framework

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

亡梦爱人 提交于 2020-01-06 07:25:08
问题 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 without changing your application logic. 回答1: Without changing the logic? You really can't (unless there is a hardware or firmware fix). I'd guess the

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

孤街浪徒 提交于 2020-01-06 07:25:06
问题 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 without changing your application logic. 回答1: Without changing the logic? You really can't (unless there is a hardware or firmware fix). I'd guess the

Detecting idle time in .NET CompactFramework Applications

£可爱£侵袭症+ 提交于 2020-01-06 07:17:09
问题 We want to activate a process if the user does not interact for 2 mins with our compact framework application running on our custom built devices. I found an excellent C# sample code of Code Project(http://www.codeproject.com/KB/cs/ApplicationIdle.aspx) but it is not supported for compact framework as this code depends on Timers Class and Application.Idle events. Can someone suggest me how to detect idle time? 回答1: This blog entry is exactly what you need. (Archived version: http://web

SendFile over TCP/IP .NET CF

大城市里の小女人 提交于 2020-01-06 06:53:06
问题 I would like to send a file ("Label.prn") from a Windows Mobile 6.5 Device to a printer. This happens over TCP/IP. I have realized this application as a test on a normal Desktop-Client. It is very simple and easy. Just send the file over the TCP Socket and the printer does its job. Here is the desktop client demo (works just fine): private void buttonSend_Click(object sender, EventArgs e) { TcpClient client = new TcpClient(AddressFamily.InterNetwork); client.Connect(IPAddress.Parse("192.168.1

Paint datagrid row in color in WinCE

僤鯓⒐⒋嵵緔 提交于 2020-01-06 06:20:35
问题 how can I paint all rows in a datagrid with the value of field "age" = 30 in red? I work in WinCE. Thanks for any help! 回答1: try something like. I set Datagrid1.Datasource = Datatable1.DefaultView where Datatable1 is a Datatable that contains a column named "Age" Sorry, is in VB Private Sub paintColors() Dim vI As Int64 DataGrid1.SelectionBackColor = Color.OrangeRed Dim vI As Int64 = 0 For vI = 0 To Datatable1.DefaultView.Count - 1 If Datatable1.DefaultView.Item(vI)("Age") = 30 Then DataGrid1

how to read files from uncompressed zip in c#?

时间秒杀一切 提交于 2020-01-06 05:15:08
问题 I´m creating a PDA app and I need to upload/download a lot of small files and my idea is to gather them in an uncompressed zip file . The question is: It´s a good idea to read those files from the zip without separating them? How can I do so? Or is it better to unzip them? Since the files are not compressed my simple mind points that maybe reading them from the zip it´s more or less as efficient as reading them directly from the file system... Thanks for you time! 回答1: Since there are two

Programmatically creating a connection string for mapping an Entity Framework Code-First model with an existing Sql Server Compact database

北城余情 提交于 2020-01-05 07:38:36
问题 I've successfully mapped an Entity Framework Code-First data model with an existing Sql Server Compact database by a declarative approach using app.config but it would be great if I could build such connection programmatically with perhaps the help of the EntityConnectionStringBuilder (System.Data.EntityClient) class. Unfortunately this approach is not working as the [DbContext].Connection.ConnectionString is not accepting most of its properties. Here's the actual working code with the faulty

How to enumerate reminders windows mobile is showing?

房东的猫 提交于 2020-01-05 07:22:04
问题 Windows Mobile can show different kind of user notifications, like this: How can I enumerate through the reminders, windows mobile is showing to the user? 回答1: By P/Invoking CeGetUserNotificationHandles followed up by a call to CeGetUserNotification. The SDF already has it wrapped with Notify.GetUserNotificationHandles follwed by a call to GetUserNotification with each of those handles. 来源: https://stackoverflow.com/questions/2206910/how-to-enumerate-reminders-windows-mobile-is-showing

Random native exception from .NET Compact Framework 3.5 application

爱⌒轻易说出口 提交于 2020-01-05 04:10:08
问题 I have an application written wholly in C# on the .NET 3.5 compact framework that seems to be crashing at random moments with native exceptions. My application never logs any of these exceptions it just quits. Sometimes my application can run for hours or you can start it and 5 minutes later it will crash! I have been storing up the dump files that are sometimes produced but having difficulty understanding what the problem is because I lack debug symbols for the dll that is throwing

Change file creation time on compact framework

人盡茶涼 提交于 2020-01-04 14:15:34
问题 I need to set file creation time after I download it using sockets. In CF FileInfo.CreationTime is readonly. I tried to use P/Invoke solution from this topic, but it won't work: I get error 6 (Invalid handle). According to MSDN first parameter for SetFileTime() must be a handle, while in the topic mentioned it is string, and somebody says that it works for him. What am I doing wrong? If I need to use handle, how can I get this handle in CF and how should I change SetFileTime() declaration?