compact-framework

.Net Compact Framework 3.5 HTTP POST

◇◆丶佛笑我妖孽 提交于 2020-01-15 03:15:08
问题 I'm writing my first Windows CE app using the .NET Compact Framework v3.5. I need the app to be able to do an HTTP POST to a URL. It appears that the .NET CF does not have System.Web. So, I could use some guidence on how to accomplish and HTTP Posts using the .Net CF. Thanks, Greg 回答1: Does this satisfy your needs? You need to import System.IO System.Net System.Net.HttpWebRequest Try Dim Request As HttpWebRequest = CType(WebRequest.Create("<The server>"), HttpWebRequest) Request

Drawing over a TextBox in .NET Compact Framework

痞子三分冷 提交于 2020-01-14 06:36:06
问题 Is it possible to draw over a TextBox control in .NET Compact Framework? I want to create a watermark over it. I have read this answer. It's currently my best approach, but I do not want to limit myself to displaying the watermark only when the TextBox does not have the focus. I'm ready to try any hack! 回答1: If I were to do this, I'd create a control that derives from TextBox, that way you get all of the base rendering, events, text and selection, yada-yada. I'd then P/Invoke to SetWindowLong

developing applications for windows mobile,c#

浪尽此生 提交于 2020-01-13 19:33:48
问题 i work on visual studio 2008,now i want to create applications for windows mobile in c#. what r d requirements and how to build them??? Do i need any kind of simulators 回答1: Answering your question with right degree of detailing that it deserves is beyond the scope here. So I recommend you to start from here! Windows Mobile Developer Center 回答2: There is a Windows Mobile SDK available for free from Microsoft, however you must use a full version of Visual Studio (not an Express edition). 回答3:

beep in WinCE , it possible ?

陌路散爱 提交于 2020-01-13 10:37:21
问题 is it possible to make beep in WinCE ? i try and i get an error 回答1: The .net framework methods for beeing are not available in the CF version of the framework. The best way to get a beep sound is to PInvoke into the MessageBeep function. The PInvoke signature for this method is pretty straight forward [DllImport("CoreDll.dll")] public static extern void MessageBeep(int code); public static void MessageBeep() { MessageBeep(-1); // Default beep code is -1 } This blog post has an excellent more

ThreadStart.BeginInvoke throws NotSupportedException on Compact framework

Deadly 提交于 2020-01-11 07:01:19
问题 I'm working with threads on a compact framework project and have code that looks something like below. When I try to step into StartThreads(), a NotSupportedException is thrown. This seems a bit wierd, why is the exception thrown on the line calling StartThreads() and not inside, and what is it that's not supported on CF? I think its ThreadStart.BeginInvoke but that's not where the exception is actually being thrown. void SomeMethod() { this.StartThreads(); // <- NotSupportedException is

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

元气小坏坏 提交于 2020-01-11 03:16:07
问题 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

How do you get the current battery level in .NET CF 3.5?

て烟熏妆下的殇ゞ 提交于 2020-01-10 02:14:06
问题 How - or what's the best way - to retrieve the device's current battery level in .NET CF 3.5 on Windows Mobile 5 and 6? 回答1: I think you want to use the Microsoft.WindowsMobile.Status namepsace (specifically the SystemState class. using Microsoft.WindowsMobile.Status; ... BatteryLevel batteryLevel = SystemState.PowerBatteryStrength; BatteryState batteryState = SystemState.PowerBatteryState; See this post for the full code sample. 回答2: You probably want the State Notification Broker class that

Problem using UnhandledException in Windows Mobile app

半城伤御伤魂 提交于 2020-01-07 04:43:06
问题 I have a Windows Mobile program that accesses an attached device through a third-party DLL. Each call to the device can take an unknown length of time, so each call includes a timeout property. If the call takes longer than the specified timeout to return, the DLL instead throws an exception which my app catches with no problem. The problem that I have is with closing the application. If my application has made a call to the DLL and is waiting for the timeout to occur, and I then close the

Why is the previous form blocking the new form?

六眼飞鱼酱① 提交于 2020-01-06 13:00:06
问题 I am trying to open one form from another, closing the original form. This is standard stuff; I've done in doubtless hundreds of times over the years. Yet in this case, it's not working -- the previous form does not close - I see a piece of the new form "shining through" the old, and the caption changes from "Delivery" (original form) to "Find" (new form), but the controls on the "Find" form never display and, in fact, in a few seconds the app crashes, as if all its resources have been

WCF Interceptor On Compact Framework

旧巷老猫 提交于 2020-01-06 08:26:21
问题 I would like to add an interceptor layer to my WCF service to send the Device ID to authenticate the device. I am very very new to WCF Interceptors. Before I take all the time to figure them out, I would like to know if they even work with the Compact Framework. So, do WCF Interceptors work with the Compact Framework and if so are there any special considerations I need to keep in mind as I research them. (Any C# examples of how to do this would be AWESOME!) I am using Visual Studio 2008 SP1.