How can I prevent a VirtualKeyboard from coming up on a particular form? - firemonkey

Delphi 10.3, Firemonkey.
I have a form on which it is a real nuisance to have a virtual keyboard coming up.
(There is a tMemo which does various things on being clicked, and after a couple
of clicks the virtual keyboard arrives.)
How can I prevent this on that particular form please?

Related

Programmatically Press a Game Controller Button on Windows

TLDR
Have a USB Game Controller, searching for a method in any Windows compatible language to press a button on it.
Detail
I have Windows gaming PC and a set of four Ultimarc Ultrasticks built into an arcade cabinet. Each Ultimarc Joystick appears as 16 button device on Windows, because of a shift key feature I have no interest in using. It would eat a button and slow response time. My layout uses 8 buttons, which is exactly how many inputs the joystick has.
However, I'm hopeful I can use the fact that those buttons exist for the device to add a virtual start button to each joystick.
I'm open to using any language, but looking for a method to programmatically press the 9th button on this joystick, which is available as far as windows knows, despite not having a physical input.
I'm familiar with key remappers that create a virtual game pad with their keys mapped to other physical devices, but those come with the complexity of having duplicate joysticks on the system, and don't seem necessary if I can just virtually press this one more button, since all other buttons and axes are mapped as I want.

How to read bar code data behind the scenes?

I have an Argox Barcode Scanner with a USB port, which inputs data like a keyboard wedge. I've tried scanning barcodes with it with notepad open, and it just dumps the values as plain-text into notepad on a new line every time.
I am creating an application which controls some custom electronics, and displays data on-screen at the same time. This application does not have any user-input on the entire form, except for a button which when clicked, takes the user to a login-form, and then onward to an admin control panel to change the way the program behaves. Everything is going to be set up on a PC which behaves like a kiosk, which means there will be no windows interaction by the user, and he will not be allowed any kind of usage on the machine even if he tries to use his keyboard/mouse all he can, except for reading data presented on-screen as interfaced with our custom electronics, or to use the mouse to press the button which invokes the login screen.
Now in this situation, I need to work in a barcode scanner behind the scenes. What I need to do is a user scans a barcode using the reader, and the scanning of the barcode should trigger some code in the background (which does some checking against a database, and then activates something in our electronics, and so on). After the user scans the barcode using the scanner, there is still supposed to be no user-interaction with the program itself.
Does anyone have any ideas how I might accomplish this? I have already thought of using a hidden text-box on the form, but that sounds like a temporary work-around rather than a professional solution. Not to mention if the user were to accidentally click anywhere on-screen with the mouse, or click on the login button, it would take focus away from the hidden text-box, and bringing focus back to it each time programatically is quite a task.
Any help or insight on this would be greatly appreciated.
Thanks.
In case you have not yet noticed why your questions are being closed, you have been giving too broad questions with no specific code to present. please refer to the software development guide of your scanner for better understanding. there's an SDK for motorola barcode scanners and POSfor.net for any brand of scanner. If you tried POS for .net, they have a sample app where the simulated scanner sends the barcode info in a textbox even if you are in a pop up window. or just give instructions to scan the barcode first after going to the specific page or else the user must reopen the page

Prevent the SIP/Soft Keyboard from popping up when a TextBox get focus

In my Windows Phone 7 Silverlight application I have my own custom keypad that I want to use instead of the standard soft keyboard. The problem that I have is that I have not found a way to completely disable or prevent the SIP/Soft Keyboard for my application or for the TextBox component.
Is it possible to disable the soft input keyboard in my application?
Is it possible to prevent the soft input keyboard from popping up when a TextBox get focus?
Can I extend or override any functions in TextBox to make it behave the way I want?
I’ve seen solutions how to hide the keyboard when a certain key is entered by moving focus off the TextBox but I want to prevent it from ever showing up.
My problem is very similar to what's stated on How do I prevent the software keyboard from popping up? and How to prevent keyboard to show in EditText onTouch? but for Windows Phone 7 instead.
I am fully aware that some may think it is stupid to use your own keypad instead of the standard input but I have my reasons for doing it this way and I just want to know if it is possible to achieve what's described.
If you don't want to use the SIP, you don't need a TextBox.
Use a TextBlock and bind it to the input generated by the custom buttons.
Have a look at this blog post http://www.silverlightshow.net/items/Windows-Phone-7-Creating-Custom-Keyboard.aspx
Peter, consider using THIS, with customizations. I'm working in a project where we use a custom keyboard. With some extra codes and customizations I've made a custom softkeyboard, as you can see in the screenshot bellow. Right now, my softkeyboard is working properly, but with some issues to be resolved yet.
My custom WP keyboard problems are:
There's no caret cursor;
The TextBox in my screen is a AutoCompleteBox, and when it opens the completions, my keyboard loses focus, and so I need an extra tap (this is my greates problem now)
WP native keyboard try to slide up when I choose an item within the completions
IsHitTestVisble =false solve your issue

WP7 TextBox focus problem when WebBrowser exists

I ran into a strange issue concerning the usage of the WebBrowser control in windows phone applications. The thing is when you use WebBrowser control it "steals" the focus and prevents setting it to any other control until a user input occurs. The WebBrowser itself doesn't even have to be on the same page as the textbox.
Consider a scenario:
Create an empty application.
Put a WebBrowser and a TextBox on your main page (rootvisual).
Now in the page loaded event (or anywhere else) try to set the focus on the textbox tbx.Focus();
The textbox will theoretically have the focus, the SIP (software keyboard) will slide up ... but the textbox will lack a cursor and you won't be able to type anything.
The same thing happens if you put the textbox on a different page and navigate to it with the appbar without touching anything else after the app starts.
The FocusManager.GetFocusedElement() shows that our textbox indeed has the focus.
How to fix this issue? Very annoying :)
Btw. the problem exists on:
- devices running version 7.0.7004.0 (before NoDo, initial release?)
- devices running NoDo
The problem does NOT exist on:
- devices running Mango
- emulator (7.1 designed for Mango)
Thx for any help.
This is a known problem, and as far as I know there is no way around it, although I've tried (setting focus in a timer, etc).

Detect that the onscreen keyboard has been displayed on Windows Phone 7

Simple question:
How do I detect that the onscreen keyboard has been displayed on windows mobile 7? Is there an event I can add a listener to?
It takes up about half the screen and I want to scroll the view up when it gets displayed...
EDIT:
A comment below indicates more clearly what I'm trying to do: I have a textbox input, and as the user types into it an autocomplete dropdown appears below it (like google suggest). By default, the active control (the textbox) scrolls into view when focussed, and the onscreen keyboard is directly below it. The onscreen keyboard appears in front of my autocomplete dropdown - what I want to do is make the screen scroll a little further up, so there's some room for my dropdown to be shown.
The windows phone UI design guidelines say: "When the keyboard is deployed, the application should scroll to ensure the active edit control and the caret are in view". This happens fine, it's just the non-active dropdown gets hidden behind the onscreen keyboard.
The guidelines also say that an application can choose to show the onscreen keyboard, and can also choose to close it.
At the moment i'm stuck, and I don't think (based on my research and the replies to this question) that it's possible to detect that the onscreen keyboard has been displayed. I'm moving my investigation to see if it's possible to determine the "visible area" of the page (width & height in pixels for example), and combine this with an onfocus for the textbox... not sure if this will prove fruitful though.
Detecting when the virtual keyboard is displayed won't be possible in 7.0, as confirmed by Microsoft's Peter Torr in the WP7 forum on MSDN.
Maybe, as a dirty workaround, you could detect when the position of your text box (or its parent scroll viewer's offset) has changed, as this would indicate that the virtual keyboard has appeared or disappeared.
You can listen to the TextBox.GotFocus and TextBox.LostFocus events to detect when a text box in your application acquires and looses focus.
If an editable element gets focus then the framework will automatically scroll the element into view. So you really shouldn't have to do anything.

Resources