windows-mobile

Milliseconds in DateTime.Now on .NET Compact Framework always zero?

守給你的承諾、 提交于 2019-12-09 14:34:49
问题 i want to have a time stamp for logs on a Windows Mobile project . The accuracy must be in the range a hundred milliseconds at least. However my call to DateTime.Now returns a DateTime object with the Millisecond property set to zero. Also the Ticks property is rounded accordingly. How to get better time accuracy? Remember, that my code runs on on the Compact Framework, version 3.5. I use a HTC touch Pro 2 device. Based on the answer from MusiGenesis i have created the following class which

Fullscreen app in wince 6.0 c#

醉酒当歌 提交于 2019-12-09 10:31:11
问题 I have my app and want to make it run in full-screen mode, no task-bar. I found out how to hide the windows bar but when I start my app it doesn't cover the space of the windows task-bar, despite this last is hidden. I found this but it didn't work. I couldn't find examples of this regarding to wince. I have FormBorderStyle = None , and WindowsState = Maximized SOLUTION: I find a way of doing it. An important tip is to have the WindowState = Normal (it took me some time to find this problem).

VS2008, Windows Mobile Installer project

此生再无相见时 提交于 2019-12-09 06:54:50
问题 I'm using Visual Studio 2008 Professional Edition. I wrote an application for Windows Mobile and I would like to create the installer for this application. How does it do? 回答1: You'll need to package your application up in a CAB file. To do this is quite easy - you just create a new "Smart Device CAB Project" (New Projet->Other project types->Setup and Deployment). To start with - specify that you want the output from your application's exe project to go in the Application Directory, along

How do you get the current directory in compact framework?

陌路散爱 提交于 2019-12-09 02:29:43
问题 How do you get the current directory where your app is running? 回答1: 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); } } } 回答2: Try this: Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); 回答3: Public Shared Sub WriteDBStatus(ByVal strString As String) Try Dim FILE

How to format a number with thousands separator in C/C++

走远了吗. 提交于 2019-12-08 14:09:11
问题 I am trying to do this simple task. Just to format a number using C or C++, but under Windows CE programming. In this environment, neither inbue nor setlocale methods work. Finally I did this with no success: char szValue[10]; sprintf(szValue, "%'8d", iValue); Any idea? 回答1: Here's one way - create a custom locale and imbue it with the appropriately customised facet: #include <locale> #include <iostream> #include <memory> struct separate_thousands : std::numpunct<char> { char_type do

Problems using ImageHelper to resize images on OpenNetCF with HTC T3333

两盒软妹~` 提交于 2019-12-08 13:40:51
问题 I use the class ImageHelper who was quoted in the article of Chris Tacke to resize large images on Compact Framework, using OpenNetCF.Drawing namespace. In many devices that have Windows Mobile 6.5 version Embebbed the class worked perfectly. However in some devices with the Windows Mobile version 6.1 (robust Honeywell equipment) and HTC T3333 (Touch2) throws an exception "0x887b0005". Is there any limitation on the use of this device? There is an alternative to solve this problem? 回答1:

How to kill a process in Windows Mobile?

天涯浪子 提交于 2019-12-08 11:04:32
问题 In a Windows Forms application I kill a process like this: Process[] ps = Process.GetProcessesByName("DataWedge"); foreach (Process p in ps) p.Kill(); How can I do it in the Windows Mobile operating system? (This sample doesn't work on Windows Mobile.) 回答1: You need to enumerate the Processes running on the device in order to get it's process ID. Once you've got the processId you can just do: Process process Process.GetProcessById(processId); process.Kill(); Here's an article that deals with

How to get Process in windows mobile

心不动则不痛 提交于 2019-12-08 10:56:06
问题 i want to get the running process in .net compact framework windows mobile.. i want to kill the running process.. but i know process.GetProcessesByName() function is present in desktop, but for mobile its not supported i think so.. please let me know how to kill the presently running process in c# windows mobile. Thanks 回答1: Hey i found answer here it is Process.GetCurrentProcess().Kill(); .net CF is crazy :-) 来源: https://stackoverflow.com/questions/1475662/how-to-get-process-in-windows

Using virtual com port on windows mobile

白昼怎懂夜的黑 提交于 2019-12-08 10:42:06
问题 I have a windows mobile device which is running windows CE 5.0. I want to now connect a hardware to the USB port and communicate with the hardware by configuring it as a virutal com port and writing/reading bytes to/from it. Do i have to write a virual com driver for the windows mobile device? Please note that the hardware device that is just a device which sends/receives bytes.. Can i simply use the SerialPort class of .net framework? How will i know the COM port to which the device is

Microsoft Visual Studio 2012 new mobile phone project

邮差的信 提交于 2019-12-08 10:28:22
问题 I'm new in Visual Studio. Installed Microsoft Visual Studio Professional 2012 (Version 11.0.50727.1 RTMREL). Need to create windows mobile 6.5 application. When I go to File > New > Project I cannot find Windows Mobile in the list of templates. I tried installing Windows Mobile 6.5 Development Tool Kit still doesn't show up. Any ideas? 回答1: Yes, you need either Visual Studio 2005 or 2008 and better than the Express edition. Then you need to install the Windows Mobile 6 SDK or the Windows