compact-framework

What's the best way to create a Windows Mobile application with multiple screens in C#

十年热恋 提交于 2020-01-03 19:40:11
问题 I am creating a Windows Mobile Application in C# and Visual Studio 2008. The application will have 5-6 main 'screens'. There will also be bar (/area) with information (e.g. a title, whether the app is busy, etc) above the screens, and a toolbar (or similar control) below the screens with 5-6 buttons (with images) to change the active screen (i.e. the screens will share the top bar and toolbar) What is the best way to implement this? Use multiple forms, and just include the toolbar and top-bar

What is the right way to invoke a button's click event?

扶醉桌前 提交于 2020-01-03 05:14:23
问题 Here: http://msdn.microsoft.com/en-us/library/hkkb40tf(v=VS.90).aspx, it says that, to call a button's click event from another button, you can/should do it this way: button1.PerformClick(); However, in my situation (VS 2003. NET 1.1), this doesn't compile (admittedly, the link above specifies VS 2008, but it does not have a link to the pertinent info for prior versions, as msdn often does). This compiles: private void btnPrint_Click(object sender, System.EventArgs args) { if (this

How to push data to a .NET CF client?

淺唱寂寞╮ 提交于 2020-01-02 04:43:11
问题 Although polling a webservice is possible, do you know of another method to push changes to a mobile client except using the exchange server mail transport? 回答1: As Mark Seemann worte: I once did a POC of a client notification system for .NET CF when I was in the Microsoft Dynamics Mobile team. At the time I didn't find any Out-Of-The-Box solutions that could do this and I didn't want to piggyback on the Exchange Server connection since the intended users didn't have a AD account and most

Remove readonly in Compact Framework

最后都变了- 提交于 2020-01-02 02:02:27
问题 What is the preferred way to remove the readonly attribute of a file in Compact Framework as we don't have a File::SetAttributes? 回答1: You could use the OpenNetCF Smart Device Framework, which has a FileHelper class that implements the SetAttributes function. Or if you don't want to go that route, you could PInvoke the native SetFileAttributes method. 回答2: This also works: FileInfo fileInfo = new FileInfo(path); FileAttributes attributes = fileInfo.Attributes; if ((attributes & FileAttributes

Upload file to server in Windows mobile C# project

狂风中的少年 提交于 2020-01-01 18:14:07
问题 We have a setup of server and windows mobile device as a client. In server CSI script ready to accept single file from client. In Desktop we have use WebClient.UploadFile method to upload file to server, but in windows mobile this isn't implemented, till now we haven't found any alternative method to achieve same. Thanks in advance. Ramanand 回答1: When using the .NET Compact Framework, you can use System.Net.HttpWebRequest instead of WebClient , which isn't supported on .NET CF. Since

Simulate Keyboard Event on Windows Mobile

ぃ、小莉子 提交于 2020-01-01 16:58:31
问题 Please refer to the screenshot below: The datetime control is a Compact Framework DateTimePicker, the numbered buttons are stndard Button controls. Clicking on the arrow of the DateTimePicker displays a calendar control allowing the suer to select a date. However if the user clicks on any part of the selected Text date it is highlighted and can be amended using either the hard keys or the on-screen keyboard. I'm trying to emulate this functionality with my standard buttons. I've have tried

How do you hide a column in a datagrid using the .net compact framework 3.5

血红的双手。 提交于 2020-01-01 12:12:09
问题 I have a DataGrid that is using a DataReader as its datasource. I want to hide the first column of the datagrid. I am using the .net compact framework 3.5. I can find examples for windows forms but the api is changed enough that they don't work. 回答1: You can set the column style width to 0 or -1 . DataGridTableStyle ts = new DataGridTableStyle(); ts.MappingName = "Order"; // Order date column style DataGridColumnStyle cust_id = new DataGridTextBoxColumn(); cust_id.MappingName = "cust_id";

Javascript Interpreter for .NET

给你一囗甜甜゛ 提交于 2020-01-01 10:07:34
问题 I've got a scenario where I need to run a Javascript interpreter in a .NET application. This is going to be running on Windows Phone 7, so it needs to be Compact Framework-compliant and because it probably won't be pre-packaged for Windows Phone source could help there. Also the licensing can be an issue. We looked at using Jint which is under an MIT license, but it uses Antlr, which is under a BSD license (as I understand it Jint is in non-compliance for not redistributing the Antlr

display images in datagrid with Compact Framework

走远了吗. 提交于 2020-01-01 06:55:35
问题 is it possible to display an image in a datagrid cell? i'm currently working with compact framework 3.5. any tips on that? 回答1: Like the other posters have commented, you're required to roll your own. Luckily, this isn't too difficult. In my application, I needed a way to draw a 16x16 icon in a particular column. I created a new class that inherits from DataGridColumnStyle , which makes it easy to apply to a DataGrid via a DataGridTableStyle object. class DataGridIconColumn :

Anti aliasing DrawLine on CE

心不动则不痛 提交于 2020-01-01 06:28:27
问题 I am drawing a line to a Graphics object in Windows CE using C#.NET 3.5. The code I am using looks like this: e.Graphics.DrawLine(new Pen(Color.FromArgb(11, 118, 200), 2), x1, y1, x2, y2); This works however looks terrible due to jaggies etc. Is there anyway I can draw anti aliased lines? From what I can tell the Graphics object doesn't support this natively but is there anyway to "cheat" this effect using some trickery? 回答1: A fast trick if you're drawing on a solid color background, you can