compact-framework

MAC address in Compact Framework

百般思念 提交于 2019-12-01 06:12:18
问题 How can I get the MAC Address using only the compact framework? 回答1: 1.4 of the OpenNETCF code gets the information from the following P/Invoke call: [DllImport ("iphlpapi.dll", SetLastError=true)] public static extern int GetAdaptersInfo( byte[] ip, ref int size ); The physical address (returned as MAC address) I think is around about index 400 - 408 of the byte array after the call. So you can just use that directly if you don't want to use OpenNETCF (why though? OpenNETCF rocks more than

Sql Server Ce 3.5 Identity insert

情到浓时终转凉″ 提交于 2019-12-01 06:06:48
问题 got an issue with identity columns in Sql Server CE when using Server explorer, in VS2008, executing the following script SET IDENTITY_INSERT testTable ON; Insert into testTable (id,name) values (1,'Something') SET IDENTITY_INSERT testTable ON; sends the follow message error 'The Set SQL construct or statement is not supported.' but then inserts the row fine ?!?!?! anyway, when I try to do the same thing through C#, giving that script as a command text it fails saying the error was in the

.NET Compact framework - make scrollbars wider

好久不见. 提交于 2019-12-01 05:05:17
问题 Is there some way, how to make scrollbar wider in winforms for .net compact framework? I want to be application finger-friendly, but the scrollbars are very narrow for people with not-small fingers. EDIT: The problem is with built-in scrollbars in components like ListView, DataGrid, etc... Windows Mobile 6.0, .NET Compact Framework 3.5 Thanks. 回答1: I haven´t checked that, because I have no device but rumor has it that you can change the Size per Regstry Settings: [HKEY_LOCAL_MACHINE\SYSTEM

What is the DataGrid MappingName for a non DataTable DataSource?

与世无争的帅哥 提交于 2019-12-01 03:52:38
问题 I am able to Bind my DataGrid in .NET 3.5 CF to a List() but I am unable to format the columns by specifying their width. Below is the code that looks like it should work but does not. I am pretty sure that I am not setting the MappingName correctly as all tutorials tell you to set it to the name of your DataTable but I am not binding to a DataTable so I am not quiet sure what to do. grdBatch.DataSource = InventoryItems; DataGridTableStyle tableStyle = new DataGridTableStyle(); tableStyle

How can I run my Windows CE project from within Visual Studio (2003)?

◇◆丶佛笑我妖孽 提交于 2019-12-01 03:01:18
问题 I'm working on a legacy app that needs to be continued in VS 2003; I cannot effectively debug it, though, because when I try to run it, I get the following dialog: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Deploy Choose the device to target. If the .NET Compact Framework is not already on the selected device, it will be deployed along iwth your application. Pocket PC 2002 Emulator Pocket PC Device Windows CE .NET Device Windows CE .NET Emulator (Default) ~~~~~~~~~~~

How do you get the current directory in compact framework?

懵懂的女人 提交于 2019-12-01 02:49:26
How do you get the current directory where your app is running? 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); } } } Try this: Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); Public Shared Sub WriteDBStatus(ByVal strString As String) Try Dim FILE_NAME As String = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase) + "\DBStatus" Dim sr As IO

Debug .NET Compact Framework app locally (without emulator or device)

拥有回忆 提交于 2019-12-01 00:04:36
I am currently in the preparation phase for a new project that will be developed with .NET Compact Framework (2.0 or 3.5, we'll see) and will run on a custom Windows CE 6 hardware. There is, however, one thing I can't get to work: Debugging seems to be possible only with a physical device or with the emulator. But when I just start the app from explorer, it runs happily on my desktop (because, of course, the CF is installed on my development machine. So, the actual question is: How can I debug my .NET CF app on my desktop system with the app running on the desktop CF framework? Or is this not

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

徘徊边缘 提交于 2019-11-30 22:56:21
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' event filters? I have tried: Changing mySecondForm.ShowDialog to Application2.Run(mySecondForm) .

C# - Code compiler for .NET & CF.NET

邮差的信 提交于 2019-11-30 21:57:27
I've a same project that need to be compiled with .NET and Compact .NET Framework. It is possible to create a C# compiler that will compile my project with both framework ? Some feature aren't present in CF.NET Framework so I created it by myself (creating classes having exactly the same name & options that in .NET Framework. If I decore this classes with an attribute like [CF35] it's possible to parse the project and : Use this class when compile the project using CF.NET Ignore this class when compile the project using .NET ? Thanks for all constructive answers. [EDIT] I know the solution

Compact Framework - Get Storage Card Serial Number

时光总嘲笑我的痴心妄想 提交于 2019-11-30 21:51:08
Morning all, How would I go about getting the serial number of the storage/sd card on my mobile device? I am using C#.Net 2.0 on the Compact Framework V2.0. Thanks. The Smart Device Framework provides a mechanism to get SD Card serial numbers and manufacturer IDs. I'm not on a machine that I can get the syntax for you but I believe you can use the System.IO namespace to get IO based attributes. First get a DirectoryInfo to the storage card. (I'm not 100% on the code here, you may need to test, I'll update it if I can get to my machine) public DirectoryInfo GetStorageCard() { DirectoryInfo