compact-framework

.NET Compact Framework with Visual Studio 2010?

谁说胖子不能爱 提交于 2019-12-20 12:32:29
问题 NET Compact Framework with Visual Studio 2010? I have Visual Studio 2003, but i want change to one IDE. 回答1: Joel Fjordén has a blog post on how to Open and Build .NET Compact Framework Projects in Visual Studio 2010. In short, his approach involves editing the project file and copying the .NET Compact Framework v3.5 targets files to the .NET v4 directory. As alluded to earlier, Microsoft web pages note the following: Because Visual Studio 2010 does not support mobile application development

Disable compiler optimisation for a specific function or block of code (C#)

此生再无相见时 提交于 2019-12-20 11:24:26
问题 The compiler does a great job of optimising for RELEASE builds, but occasionally it can be useful to ensure that optimisation is turned off for a local function (but not the entire project by unticking Project Options > Optimize code ). In C++ this is achieved using the following (with the #pragma normally commented out): #pragma optimize( "", off ) // Some code such as a function (but not the whole project) #pragma optimize( "", on ) Is there an equivalent in C#? UPDATE Several excellent

Disable compiler optimisation for a specific function or block of code (C#)

拜拜、爱过 提交于 2019-12-20 11:24:10
问题 The compiler does a great job of optimising for RELEASE builds, but occasionally it can be useful to ensure that optimisation is turned off for a local function (but not the entire project by unticking Project Options > Optimize code ). In C++ this is achieved using the following (with the #pragma normally commented out): #pragma optimize( "", off ) // Some code such as a function (but not the whole project) #pragma optimize( "", on ) Is there an equivalent in C#? UPDATE Several excellent

Building Compact Framework applications with VS2010 (without VS2005)

你。 提交于 2019-12-20 11:06:26
问题 I want to perform a .NET CF 2.0 build using VS2010. I know it's not supported "normnally," but I've seen this answer: ( .NET Compact Framework with Visual Studio 2010? ) ...and I want to use that approach. The blog post cited there says I need to modify the .csproj files for the .NET CF projects, to point to a particular Microsoft.CompactFramework.Common.targets . But I don't have that file. I figured I needed to install the Windows Mobile 6 Standard SDK to get it. I tried installing it and

How to add image icon to title bar and hide bottom bar in Compact Framework.?

你说的曾经没有我的故事 提交于 2019-12-20 07:25:15
问题 1) I want to add an logo(Image) in the Form Header. How do I do that ? 2) In the windows phone a bottom bar appears with the sign of a keyboard. How do I remove this bar as I am using my custom keyboard. ? Title Bar 回答1: The bottom bar can be 'removed' by removing (set to null) the mainmenu of the form. The caption bar (top bar) can not be latered easily, it is shared between all windows on the Windows Mobile device. The screen shot shows a windows mobile screen of windows mobile 6.x before 6

Why am I getting, “Unable to connect to the remote server”?

白昼怎懂夜的黑 提交于 2019-12-20 05:47:22
问题 This err msg is the next one I get after resolving “NotSupportedException” as noted here I don't even reach the break point in the server code (set on the first line of the method that should be getting called). This is the relevant server code: [Route("api/PlatypusItems/PostArgsAndXMLFileAsStr")] public async void PostArgsAndXMLFileAsStr([FromBody] string stringifiedXML, string serialNum, string siteNum) { string beginningInvoiceNum = string.Empty; // <= Breakpoint on this line string

How do you resize a Bitmap under .NET CF 2.0

余生颓废 提交于 2019-12-20 05:42:38
问题 I have a Bitmap that I want to enlarge programatically to ~1.5x or 2x to its original size. Is there an easy way to do that under .NET CF 2.0? 回答1: One "normal" way would be to create a new Bitmap of the desired size, create a Graphics for it and then draw the old image onto it with Graphics.DrawImage(Point, Rectangle) . Are any of those calls not available on the Compact Framework? EDIT: Here's a short but complete app which works on the desktop: using System; using System.Drawing; class

Pocket PC: Draw control to bitmap

 ̄綄美尐妖づ 提交于 2019-12-20 05:09:31
问题 Using C#, I'm trying to draw an instance of a control, say a panel or button, to a bitmap in my Pocket PC application. .NET controls has the nifty DrawToBitmap function, but it does not exist in .NET Compact Framework. How would I go about painting a control to an image in a Pocket PC application? 回答1: DrawToBitmap in the full framework works by sending the WM_PRINT message to the control, along with the device context of a bitmap to print to. Windows CE doesn't include WM_PRINT , so this

Thread-safe invoke on NET CF

假如想象 提交于 2019-12-20 04:23:36
问题 I have a background thread running that fires events, but how can I ensure a thread safe invocation of these events using NET CF? I would use ISyncronizeInvoke on the NET platform, but I can't find this on NET CF. I'm sure there are an equivalent available.... or? 回答1: The Compact Framework does have Control.Invoke / BeginInvoke , although I believe it's limited to the EventHandler delegate (with any other delegate throwing an exception at execution time). Assuming your actual instance of

How to hide my SmartDevice application on startup?

笑着哭i 提交于 2019-12-20 03:38:10
问题 I made a SmartDevice application that runs on startup and I want it to be hidden at first launch. I've tried this.Hide() , this.Visible = false and ShowWindow(Handle, SW_HIDE) in Form Load() event and InitializeComponent() with no luck. Any help will be appreciated. 回答1: The CF automatically calls Show on the Form passed to Application.Run. There is no avoiding that without avoiding the call to Application.Run. The SDF has an Application2.Run that takes a parameter to tell it to not show the