windows-mobile

Disable menu bar in Windows Mobile 6.5

天涯浪子 提交于 2019-12-05 08:53:35
I'm porting .NET application from WM5 to WM6.5. Besides new resolution I noticed different UI behavior for start menu and title bar (caption bar). My application needs to work in kind of kiosk mode where user can't exit application and bypass our authentication. For this purpose on WM5 I was hiding start button and close button. I am using following function: SHFullScreen(hWnd, SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON); Hiding buttons kind of works on WM6.5 too, but there is another problem. User can tap on the title bar (menu bar, caption bar - I'm not sure what is proper name for it - the bar

Configure Wifi Settings using C#

那年仲夏 提交于 2019-12-05 06:39:28
问题 How to configure Wifi Settings for a Win Mobile application using C# (compact framework)? So the deal is: Configure the network (SSID for an hiden AP) WPA authentication with TKIP Force user and password (the end-user won't be prompted for authentication) 回答1: Take a look at the Smart Device Framework. It has a NetworkInformation namespace that wrap a large amount of the WZC functionality. I know it will do WEP and WPA with TKIP (as well as open). It allows you to pass in the key material,

How do I force a serial port write method to wait for the line to clear before sending its data?

一曲冷凌霜 提交于 2019-12-05 02:06:49
Here's some background on what I'm trying to do: Open a serial port from a mobile device to a Bluetooth printer. Send an EPL/2 form to the Bluetooth printer, so that it understands how to treat the data it is about to receive. Once the form has been received, send some data to the printer which will be printed on label stock. Repeat step 3 as many times as necessary for each label to be printed. Step 2 only happens the first time, since the form does not need to precede each label. My issue is that when I send the form, if I send the label data too quickly it will not print. Sometimes I get

How do I solve the .NET CF exception “Can't find PInvoke DLL”?

↘锁芯ラ 提交于 2019-12-05 00:47:47
问题 This is to all the C# gurus. I have been banging my head on this for some time already, tried all kinds of advice on the net with no avail. The action is happening in Windows Mobile 5.0. I have a DLL named MyDll.dll. In the MyDll.h I have: extern "C" __declspec(dllexport) int MyDllFunction(int one, int two); The definition of MyDllFunction in MyDll.cpp is: int MyDllFunction(int one, int two) { return one + two; } The C# class contains the following declaration: [DllImport("MyDll.dll")] extern

DataMember could not be found

青春壹個敷衍的年華 提交于 2019-12-04 23:29:31
问题 As I have done my research regarding this problem of mine, I still have no luck in solving my error of Error 1 The type or namespace name 'DataMember' could not be found (are you missing a using directive or an assembly reference?) I have come across a solution stating that I should reference System.Runtime.Serialization but still I am having no luck even when add reference to it. Here is my code: using System; using System.Linq; using System.Collections.Generic; using System.Text; using

WebRequest with POST-parameters in .NET Compact Framework

血红的双手。 提交于 2019-12-04 19:55:15
I'm trying to do an HTTP POST REQUEST on .NET Compact Framework and I can't get it working. This is what I got: public static string DoPost(string url) { // initialize from variables string responseString = string.Empty; ASCIIEncoding encoding = new ASCIIEncoding(); //// UTF8Encoding encoding = new UTF8Encoding(); HttpWebResponse response; byte[] data = encoding.GetBytes("dummy"); StreamReader reader; HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); //do the processing SetRequestProperties(request, "POST"); // SETTING METHOD TO POST HERE request.GetRequestStream().Write

C# .NET Compact Framework, custom UserControl, focus issue

会有一股神秘感。 提交于 2019-12-04 18:41:59
I have a custom UserControl (a label and a textbox). My problem is I need to handle the key down, key up events to navigate between controls in the form ( .NET Compact Framework textbox, combobox, etc). With the controls provided by the .NET Compact Framework framework it works, but when I reach a usercontrol written by me, that control don`t get focus (the textbox inside get the focus) so from this usercontrol I cannot navigate because in the panel I don't have any control of who have focus. A little mock up : Form->Panel->controls -> on keydown event (using KeyPreview) with a foreach I check

GPS in windows mobile

别说谁变了你拦得住时间么 提交于 2019-12-04 15:33:37
How would I go about obtaining the GPS cordinates in a windows mobile application? The sample app that comes with the SDK doesnt seem to work. I also have the wm 6.5 SDK which I heard had GPS stuff but I cant find it. Let me know if you have any good examples. Go with GPS.Net . It's an excellent library, very easy to use and compatible with a whole pile of hardware implementations. We used it for Windows Mobile and Windows Xp/Vista versions of an application. As of WCE 5.0 microsoft includes a gps intermediate driver which sits in front of the devices gps device and provides an api for

ListView Headers Don't Show Up

删除回忆录丶 提交于 2019-12-04 15:13:45
问题 I am doing a windows mobile application 6.1. I dragged in a listview and went to columns and added columns to my list view. When I run the listview they do not show up. I then tried to add them through C# code on page load with the follow code. ColumnHeader header = new ColumnHeader(); header.Text = "gkgag"; header.Width = 100; header.TextAlign = HorizontalAlignment.Center; listView1.Columns.Add(header); this does not work either. Why don't they show up? 回答1: You must use detailed view for

System.Threading.Thread replacement in UWP / Windows 10 mobile

自作多情 提交于 2019-12-04 15:03:11
In UWP, how can I access the thread object? I want to change the name of the main thread and additional thread that I will manage. I also want to check if the current thread is the main thread afterwards. I'm targeting to windows 10 mobile. The following code example works for desktop, but not for phone (getting 'System.DllNotFoundException'): [DllImport("kernel32.dll")] static extern IntPtr GetCurrentThread(); Thanks. You should use Tasks instead of threads. https://msdn.microsoft.com/en-us/library/system.threading.tasks.task%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396 As about renaming of