windows-mobile

Why is this simple Mobile Form not closed when using the player

北城余情 提交于 2019-12-02 02:24:10
问题 I created this simple sample Form with the close button. Everything is working as expected when NOT using the Interop.WMPLib.dll I've seen other applications using this without problems but why isn't the Form process closed when I just add the line: SoundPlayer myPlayer = new SoundPlayer(); and of course dispose it: if (myPlayer != null) { myPlayer.Dispose(); myPlayer = null; } The Form closes but the debugger VS2008 is still active. The Form project and the dll are still active. If you send

How to connect to a Webservice from a Windows Mobile Device 6.0

筅森魡賤 提交于 2019-12-02 02:20:39
I would like to create a windows mobile application (6.5) which connect to a webservice via GPRS hosted on my server at home. The webservice was tested successfully using a windows application. Can someone please guide me what should I do because I have no idea of how to proceed. Some code will be very appreciated. thanks If the service is a standard XML or WCF service, then simply right-click on the "References" node in the project's tree and select "Add Web Reference" just like you would with a desktop project. This will create the proxy classes for you which you can then use in your

Windows Mobile 5 SDK Button Control

ぃ、小莉子 提交于 2019-12-02 01:45:52
问题 I'm a fairly novice programmer working on my first Windows Mobile application. I see that there is no button control available for my program. I've never created a custom control before, and I understand that is the only way that I can get a button for my application (it is a requirement as per my client). I was wondering if someone could give me a quick walk through on how I would create this. I'm using Visual Studio 2005 with the Windows Mobile 5 SDK, creating an application that is to be

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

Create a .NET Windows Service on Windows Mobile 6.x

一个人想着一个人 提交于 2019-12-01 22:23:34
I would like to create a windows service in .NET that runs on WinMo 6.x.... There r a lot of documentation for how to do that in MFC (and non-MFC) http://msdn.microsoft.com/en-us/library/ms838599.aspx but I can't find any pointers for .NET stuff, is it even doable? Thanks, I'm pretty sure (not 100%) you can only create a native service DLL (which means no .Net for this). A workaround is to create a console app (or a regular app that does everything from its Main method) and drop it in the /Windows/Startup/ folder. Your app will then be started automatically every time the device is reset.

OutOfMemoryException On Mobile Device

左心房为你撑大大i 提交于 2019-12-01 21:41:33
I'm developing an application that uses a mobile device to take a photo and send it using a webservice. But after I've taken 4 photos I am getting an OutOfMemoryException in the code below. I tried calling GC.Collect() but it didn't help either. Maybe someone here could be give me an advice how to handle this problem. public static Bitmap TakePicture() { var dialog = new CameraCaptureDialog { Resolution = new Size(1600, 1200), StillQuality = CameraCaptureStillQuality.Default }; dialog.ShowDialog(); // If the filename is empty the user took no picture if (string.IsNullOrEmpty(dialog.FileName))

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

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