How to set the Windows Mobile 6 IME mode (to numbers only) - windows

In Windows Mobile 5 one of the following methods works to set an input to numbers only:
// Managed
InputModeEditor.SetInputMode(textBox, InputMode.Numeric);
// Native Wrapper
InputModeSupport.SHSetImeMode(textBox.Handle, InputModeSupport.SHIME_MODE.SHIME_MODE_NUMBERS);
In Windows Mobile 6, neither works.
How do you set the IME to "Numbers Only" in WM 6.0 / .NET CF 3.5?

To set IME mode you can use the two methods above, switching based on platform using the SystemSettings class to inform it. If you want to use the SIP instead, you can find the GUID of the WYSIWYG keyboard, or "guess" by enumerating all SIPs and choosing one with "Numeric" in its name. Ultimately though, there is no way to guarantee the numbers only keyboard in code.

Related

Matching Delphi monitor indexes to Windows Desktop numbering [duplicate]

When you press Identify button in Screen Resolution dialog then Windows shows you big white monitor numbers on each monitor. It was easy to find them programmatically together with monitor coordinates in Windows XP (with EnumDisplayDevices) but on Windows 7 it's broken. How can I do that?
EnumDisplayDevices and GetMonitorInfo are not reliable anymore for that purpose in Windows 7.
I tried GetMonitorInfo and then extracting monitor number from MONITORINFOEX.szDevice (I.E. \.\Display2) with no success. Another guy did that too two years ago and claimed that getMonitorInfo has a bug. This bug was marked as fixed by Microsoft without any comments but it still can be reproduced on a win7 machine having latest updates. (Btw, can anybody tell me - maybe this bug is absent on win8 ?)
I tried QueryDisplayConfig from new CCD API but didn't find needed info.
Does anybody know the way?
Windows does not provide a function that allows applications to obtain the numbers used by the display settings app. The numbers themselves are specific only to the display settings app and have no meaning in the system or in the CCD APIs used to query/set the display topology.
The best option is for applications to define their own criteria for assigning an index when prompting the user to select a display.
I have never wanted to know in my Windows applications the number of monitors, but you can call GetSystemMetrics function with parameter value SM_CMONITORS to get the number of display monitors on a desktop.
I call in my Windows applications function GetSystemMetrics mainly with the parameter values SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN, SM_XVIRTUALSCREEN and SM_YVIRTUALSCREEN to avoid opening application windows completely or partly outside the display area. An application window could be nevertheless not visible if the user has extended the display area over multiple monitors, but not all of them are turned on.
The SystemParametersInfo function function with value SPI_GETWORKAREA for uiAction parameter is also very useful to know where an application window can be positioned and how large it can be in width and height on primary screen without being partly hidden by other windows (bars) being always on top.
See also GetMonitorInfo function if more informations from the monitors are required in your Windows application.
For Windows versions supporting WDDM, which Windows 7 does, you can simply use DXGI which is part of DirectX. DXGI allows you to very easily enumerate the existing display adapters, the available display outputs per adapter and the supported display modes per display output. While enumerating there's a lot of additional data you can read out, like handles, identifiers and device names. All of this can easily be used to retrieve the working areas as well. The order in which adapters and outputs are enumerated is defined by the system and matches the order of your configuration screen.
See here for more information: MSDN DXGI Overview

How do I get the Windows display/monitor/screen identity number programmatically? [duplicate]

When you press Identify button in Screen Resolution dialog then Windows shows you big white monitor numbers on each monitor. It was easy to find them programmatically together with monitor coordinates in Windows XP (with EnumDisplayDevices) but on Windows 7 it's broken. How can I do that?
EnumDisplayDevices and GetMonitorInfo are not reliable anymore for that purpose in Windows 7.
I tried GetMonitorInfo and then extracting monitor number from MONITORINFOEX.szDevice (I.E. \.\Display2) with no success. Another guy did that too two years ago and claimed that getMonitorInfo has a bug. This bug was marked as fixed by Microsoft without any comments but it still can be reproduced on a win7 machine having latest updates. (Btw, can anybody tell me - maybe this bug is absent on win8 ?)
I tried QueryDisplayConfig from new CCD API but didn't find needed info.
Does anybody know the way?
Windows does not provide a function that allows applications to obtain the numbers used by the display settings app. The numbers themselves are specific only to the display settings app and have no meaning in the system or in the CCD APIs used to query/set the display topology.
The best option is for applications to define their own criteria for assigning an index when prompting the user to select a display.
I have never wanted to know in my Windows applications the number of monitors, but you can call GetSystemMetrics function with parameter value SM_CMONITORS to get the number of display monitors on a desktop.
I call in my Windows applications function GetSystemMetrics mainly with the parameter values SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN, SM_XVIRTUALSCREEN and SM_YVIRTUALSCREEN to avoid opening application windows completely or partly outside the display area. An application window could be nevertheless not visible if the user has extended the display area over multiple monitors, but not all of them are turned on.
The SystemParametersInfo function function with value SPI_GETWORKAREA for uiAction parameter is also very useful to know where an application window can be positioned and how large it can be in width and height on primary screen without being partly hidden by other windows (bars) being always on top.
See also GetMonitorInfo function if more informations from the monitors are required in your Windows application.
For Windows versions supporting WDDM, which Windows 7 does, you can simply use DXGI which is part of DirectX. DXGI allows you to very easily enumerate the existing display adapters, the available display outputs per adapter and the supported display modes per display output. While enumerating there's a lot of additional data you can read out, like handles, identifiers and device names. All of this can easily be used to retrieve the working areas as well. The order in which adapters and outputs are enumerated is defined by the system and matches the order of your configuration screen.
See here for more information: MSDN DXGI Overview

how to access the large "Identify" digit of a Monitor Display in Windows? [duplicate]

When you press Identify button in Screen Resolution dialog then Windows shows you big white monitor numbers on each monitor. It was easy to find them programmatically together with monitor coordinates in Windows XP (with EnumDisplayDevices) but on Windows 7 it's broken. How can I do that?
EnumDisplayDevices and GetMonitorInfo are not reliable anymore for that purpose in Windows 7.
I tried GetMonitorInfo and then extracting monitor number from MONITORINFOEX.szDevice (I.E. \.\Display2) with no success. Another guy did that too two years ago and claimed that getMonitorInfo has a bug. This bug was marked as fixed by Microsoft without any comments but it still can be reproduced on a win7 machine having latest updates. (Btw, can anybody tell me - maybe this bug is absent on win8 ?)
I tried QueryDisplayConfig from new CCD API but didn't find needed info.
Does anybody know the way?
Windows does not provide a function that allows applications to obtain the numbers used by the display settings app. The numbers themselves are specific only to the display settings app and have no meaning in the system or in the CCD APIs used to query/set the display topology.
The best option is for applications to define their own criteria for assigning an index when prompting the user to select a display.
I have never wanted to know in my Windows applications the number of monitors, but you can call GetSystemMetrics function with parameter value SM_CMONITORS to get the number of display monitors on a desktop.
I call in my Windows applications function GetSystemMetrics mainly with the parameter values SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN, SM_XVIRTUALSCREEN and SM_YVIRTUALSCREEN to avoid opening application windows completely or partly outside the display area. An application window could be nevertheless not visible if the user has extended the display area over multiple monitors, but not all of them are turned on.
The SystemParametersInfo function function with value SPI_GETWORKAREA for uiAction parameter is also very useful to know where an application window can be positioned and how large it can be in width and height on primary screen without being partly hidden by other windows (bars) being always on top.
See also GetMonitorInfo function if more informations from the monitors are required in your Windows application.
For Windows versions supporting WDDM, which Windows 7 does, you can simply use DXGI which is part of DirectX. DXGI allows you to very easily enumerate the existing display adapters, the available display outputs per adapter and the supported display modes per display output. While enumerating there's a lot of additional data you can read out, like handles, identifiers and device names. All of this can easily be used to retrieve the working areas as well. The order in which adapters and outputs are enumerated is defined by the system and matches the order of your configuration screen.
See here for more information: MSDN DXGI Overview

multi language feature support windows phone 7

I just wonder if we could take advantage of multiple language support in windows phone 7, 7.5 in any mean to enhance user's experience. For example says that how I can detect what language user use on the phone (this appear in start up setting) to auto change my app language. Or perhaps, what is a best way to provide user with multiple language support?
You can do this with Resource Files
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff637520(v=vs.105).aspx
There is some value in allowing a user to choose the language themselves, in particular if you want to support a language not supported by the phone, ie Chinese on 7.0
If you go into settings > keyboard, and then add another language it will give you options when the keyboard comes up so that useless autocorrect is no longer useless when typing in another language.
I had the problem of everything I wrote in spanish being autocorrected.. This is especially annoying when it splits your word into 2 as you are forced to retype it.
When adding a second language, you will have an extra button at the bottom of the keyboard so you can switch between lanugages. This changes the dictionaries also.. I believe you can have as many as you like.

How can we disable the default keypad of textbox in silverlight windows phone 7?

i have made my custom keypad so i want to enter the text with my custom keypad. But the problem is that every time when textbox get focus the default keypad pops up.
so how can i fix this or i have to have to opt some patch.
I don't believe this is possible, as the SIP is controlled by the OS, and is shown depending on whether you have a hardware keyboard or not. If you really want to have a custom keypad, you will probably need to design your own data entry controls as well (ie. custom textbox that shows your SIP).
You can't do it the "elegant" way. If you really need this you could build the following:
1. User touches the control (control has focus ... open your custom SIP)
2. immediately switch the focus to a hidden, non textbox control
3. OS SIP will not show if this is done fast enough
Sorry, this is the only way I am aware of :(
A related example: http://www.dreamincode.net/code/snippet5650.htm
This is not possible, in this release anyways. I have also run into a problem with using the default keypad. But there are some options to use a keyboard that is designed for different types of input (ex. Search, Text, etc.).
Check out this article. It gives quite a few options in wp7 when it comes to the keypad. I'm sure one of these could be usefull.
All you have to do is set the InputScope = "" in the textbox control to whatever scopes are available(check article ^).
HTH.
try setting the IsReadOnly property of the testBox to true
Its an Interesting task .
I remember , i did the similar task with Windows Mobile 6 / 5 and Pocket PC 2003 where we have the access to the native API's via pInvoke and disabled the SIP Button . like using SHFullScreen
I think this is not supported in Windows Phone 7 since it is purely managed code .

Resources