compact-framework

Getting file version info in the Compact Framework

旧街凉风 提交于 2019-12-02 00:05:30
问题 I have some code that needs to be able to find the version number of an assembly, given a string saying where it's located. I can't get this to work: Assembly assembly = Assembly.LoadFrom("\\Program Files\\Microsoft SQL Server Compact Edition\\v3.5\\sqlcecompact35.dll"); throws a System.IO.IOException: File or assembly name '\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlcecompact35.dll', or one of its dependencies, was not found. Yet the file does exist: FileInfo fileInfo = new

Check to see if a Windows Mobile Device is Idle

断了今生、忘了曾经 提交于 2019-12-02 00:01:00
问题 I have a windows mobile 5 program (compact framework 3.5) that I need to be able to detect when the device is idle. Right now I am just checking to see if the backlight is off. Like this: [DllImport("coredll.dll", EntryPoint = "sleep", SetLastError = true)] internal static extern void sleep(int dwMilliseconds); .... //Get the current power state of the system int winError = CoreDLL.GetSystemPowerState(systemStateName, out systemPowerStates); if (winError == 0) { //If the backlight is off,

How to hide my SmartDevice application on startup?

久未见 提交于 2019-12-01 23:11:19
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. 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 form. You could do the same by creating your own message pump (though it's not a straightforward thing to do

How To Set useUnsafeHeaderParsing For .NET Compact Framework

随声附和 提交于 2019-12-01 21:52:43
In my Windows CE 6.0 app, I am communicating with a proprietary web server device that is returning bad header information (more specifically, it's returning NO header information). I believe this lack of header information is the reason why my HttpWebRequest methods are not working properly. I recall that the .NET "regular" Framework allows for us to programmatically configure the System.Net.Configuration assembly to allow for invalid headers (useUnsafeHeaderParsing). Unfortunately, for me, the System.Net.Configuration assembly is not included in the Compact Framework. Is there a similar

Getting file version info in the Compact Framework

扶醉桌前 提交于 2019-12-01 21:18:32
I have some code that needs to be able to find the version number of an assembly, given a string saying where it's located. I can't get this to work: Assembly assembly = Assembly.LoadFrom("\\Program Files\\Microsoft SQL Server Compact Edition\\v3.5\\sqlcecompact35.dll"); throws a System.IO.IOException: File or assembly name '\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlcecompact35.dll', or one of its dependencies, was not found. Yet the file does exist: FileInfo fileInfo = new FileInfo("\\Program Files\\Microsoft SQL Server Compact Edition\\v3.5\\sqlcecompact35.dll"); creates an

OpenNETCF Signature control question

只愿长相守 提交于 2019-12-01 20:45:28
I am using the Signature control in OpenNETCF. It works great for most everything I need. However, I need a way invert the signature and load it back in. It has a call to get the "bytes" for the signature ( GetSignatureEx() ). It returns a byte[] of the signature. This signature can then be loaded back in with LoadSignatureEx() . I can't seem to figure out the system for these bytes. I thought they may be coordinates, but it does not seem so now. If anyone out there knows a way to invert the signature and load it back in, I would be grateful to hear it. Note for others who may care: These

Why is WMDC/ActiveSync so flaky?

和自甴很熟 提交于 2019-12-01 20:44:44
I'm developing a Windows Mobile app using the .NET Compact Framework 3.5 and VS2008, and for debugging using the Device Emulator V3, on Win7, and seem to have constant problems with Windows Mobile Device Centre (6.1) connecting. Using the Emulator Manager (9.0.21022.8) I cradle the device using DMA in WMDC. The problem is it's so flaky at actually connecting that it's becoming a pain. I find that when I turn my computer on, before I can get it to connect I have to open up WMDC, disable Connect over DMA, close WMDC down, reopen it again, and then it might cradle. Often I have to do this twice

OutOfMemoryException When Creating a Large Bitmap in CF.NET

廉价感情. 提交于 2019-12-01 19:40:01
问题 My compact framework application creates a smooth-scrolling list by rendering all the items to a large bitmap surface, then copying that bitmap to an offset position on the screen so that only the appropriate items show. Older versions only rendered the items that should appear on screen at the time, but this approach was too slow for a smooth scrolling interface. It occasionally generates an OutOfMemoryException when initially creating the large bitmap. If the user performs a soft-reset of

OutOfMemoryException When Creating a Large Bitmap in CF.NET

回眸只為那壹抹淺笑 提交于 2019-12-01 19:09:38
My compact framework application creates a smooth-scrolling list by rendering all the items to a large bitmap surface, then copying that bitmap to an offset position on the screen so that only the appropriate items show. Older versions only rendered the items that should appear on screen at the time, but this approach was too slow for a smooth scrolling interface. It occasionally generates an OutOfMemoryException when initially creating the large bitmap. If the user performs a soft-reset of the device and runs the application again, it is able to perform the creation without issue. It doesn't

How to get all processes running in .net cf

若如初见. 提交于 2019-12-01 13:57:44
I want to get a list of all running application in my windows mobile 6.5 from my application. Can anyone tell me how to do this for CF?? You have to P/Invoke the toolhelp APIs . There used to be an MSDN article that covered this (it's a bit long to put it all into a post here, though maybe that's a better idea?). The gist of it can also be found in the SDF source code over on Github . 来源: https://stackoverflow.com/questions/7430982/how-to-get-all-processes-running-in-net-cf