compact-framework

Why is this SqlCeCommand ExecuteReader call failing?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 06:40:45
问题 I adapted my code below from "Microsoft .NET Compact Framework" by Wigley and Wheelwright: SqlCeConnection cn = new SqlCeConnection(@"Data Source=\My Documents\Traffic.sdf"); String sSQL= "SELECT CarID, Reg, Location FROM Cars"); SqlCeCommand cmdSelect = new SqlCeCommand(sSQL, cn); cmdSelect.CommandType = CommandType.Text; SqlCeDataReader dtr = cmdSelect.ExecuteReader(CommandBehavior.Default); // It's "cmd." instead of "cmdSelect." in the book, but that doesn't compile while (dtr.Read()) {

How can I solve the “The OutputPath property is not set for this project” err?

送分小仙女□ 提交于 2019-12-23 05:27:04
问题 In my Windows CE app, I have been trying to change all project references from "Any CPU" (or "AnyCPU") to "x86" To do so, I've hand-edited the .csproj file (Project > Properties... only has "Any CPU" available as an option, no "x86" (or anything else). Now that I've dont that, though, I get, " The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='Debug' Platform='AnyCPU' " Where the

Can I turn off the automatic single instance feature in Windows Mobile 6?

痴心易碎 提交于 2019-12-23 04:57:23
问题 Windows Mobile 6 single instances applications by default can I turn off or override this behavior? This is needed if one needs to automatically restart or self update an application. 回答1: Alex Feinman describes how it works, and how to get around it, in this blog post 回答2: This is needed if one needs to automatically restart or self update an application. This doesn't answer your question, but instead of that I launch a separate restarter or updater process. 来源: https://stackoverflow.com

Why can't my .NET CF application find a DLL In the same directory as the executable?

泪湿孤枕 提交于 2019-12-23 03:14:11
问题 I have a .NET CF 1.1 application that has been running perfectly fine for years. Occasionally, I get a help desk ticket with the following error message (generic): Method not found: MethodName AssemblyNamespace.Class The DLL is there, and it's the same version as my other devices. What could change that would make it not find the method. Does this error imply that the assembly was loaded, or did it break before that even happened? Does it matter how I added the reference in Visual Studio

problem parsing with XMLReader (using ReadSubTree)

こ雲淡風輕ζ 提交于 2019-12-23 02:34:40
问题 Im trying to build a simple XML to Controls parser in my CF application. In the code below the string im trying to parse looks like this: "<Panel><Label>Text1</Label><Label>Text2</Label></Panel>" The result i want with this code would be a Panel with two labels. But the problem is when the first Label is parsed the subreader.Read() returns false in the ParsePanelElementh method, and so it falls out of while statement. Since im new into XMLReader i must be missing something very simple. Any

How to tell if any form from my app is in foreground

…衆ロ難τιáo~ 提交于 2019-12-23 02:28:30
问题 I'd like my compact framework application to show a notification bubble ONLY when it's running "in the background". The application has several forms which may or may not be visible at any time. I'd like the notification handler (which runs on background separate thread) to be able to tell if any form from my application is currently visible on the screen. Is there a simple way to do this that I'm missing? 回答1: You can always monitor when the Forms and Processes change from your app and act

Is it worth to install the Compact Framework on storage card?

回眸只為那壹抹淺笑 提交于 2019-12-22 17:37:50
问题 Since our application grows, we need more space on our Windows CE devices. We installed SD-Cards. Running our applications from the sd card is slow and there are some heavy issues with demand-paging if you run the apps from persistent paths. The only option we see is to install the Compact Framework on the SD cards to free some memory. Is it worth to install it there? Will we get performance problems? 回答1: It really depends on what value you're using for "worth". Installing the CF onto a

Does the compact framework 3.5 support System.Runtime.Serialization?

孤街浪徒 提交于 2019-12-22 08:20:04
问题 I am writing a library which is a set of classes meant to be shared between many different .NET applications, including at least one which uses the .NET compact framework. I have been making these classes use the [DataContract] attribute with a bunch of [DataMember]s so that they are easy to serialize and deserialize using the DataContractJSONSerializer. I have been searching the web to try to find out if this functionality (DataContractAttribute, DataMemberAttribute, and

How to add a button to a compact framework DataGrid?

橙三吉。 提交于 2019-12-22 07:28:07
问题 Is it possible to add a button to a column in the DataGrid for the compact framework? So far the only thing I can find is you can add textbox and that's it. What would be a good alternative to a DataGrid that can allow other controls? 回答1: You can use the DataGrid's public Rectangle GetCellBounds(int row, int col); with public event EventHandler CurrentCellChanged; public DataGridCell CurrentCell { get; set; } or public event MouseEventHandler MouseMove; public HitTestInfo HitTest(int x, int

Using a X509 Certificate in .Net Compact Framework for Client Authentication HTTPRequest

懵懂的女人 提交于 2019-12-21 14:24:14
问题 I'm working in Windows Mobile 6 and would like to have client authentication when talking to a Apache webserver. I have a certificate in my local certificate store and it should be rather straightforward: X509Store myStore = new X509Store("MY", StoreLocation.CurrentUser); myStore.Open(OpenFlags.ReadOnly); X509Certificate2Collection certificates = myStore.Certificates; X509Certificate2 clientcertificate; foreach (X509Certificate 2certificate in certificates) { clientcertificate = certificate;