IMG Home PageIMG ProductsProduct DownloadsOrdering InformationTechnical Support and Frequently Asked QuestionsDeveloper's Corner and UtilitiesAbout IMG
CustomersIMG ResellersMedia InformationIMG Events / Trade ShowsUseful LinksIMG Contact InformationIMG Information / Policies
Translate




Modal Input Utility

FOLDER: MODAL

TYPE: Utility / Stand-alone Executable with Source

SOURCE: INCLUDED

LANGUAGE: C / Windows API

IDE: Microsoft Visual C++ 6

This is a simple utility (source included) that provides a mechanism to produce modal input using My-T-Soft. In general, the on-screen keyboard is modeless, in that the user can select at will what they want to have the keyboard focus, and use My-T-Soft to type anywhere they choose. A customer desired to make the keyboard modal, i.e. that your choice was to type with the keyboard, or exit the field and get out of that mode. In keeping with the terminology for dialogs, they wanted a Modal keyboard, i.e. the user must respond and enter some text, or cancel out of that situation (by leaving the input field). After discussing the situation thoroughly, it was determined that modifying My-T-Soft to somehow create this user-input situation made little or no sense - the software has been, and always will be modeless, and adding this feature to the software could only cause trouble or confusion for the user. For example, what would turn this on, and how/when? Plus the point of modal input is that this situation should be application driven, so this capability should not be a feature or option in a virtual (or physical) keyboard. There are just too many variables, and requires too much intelligence on part of the keyboard software - a keyboard is just an input device for the user, not some intelligent software that should be allowed to control where & when or how the user can operate the system.

The Modal utility is ideal for the following situation - the developers kit utilities are being used to bring the keyboard up as needed, and moved off-screen when not needed. When the keyboard is visible, you do not want the user to do anything else with your full screen application - just enter the text and finish with the field. At field exit, the keyboard software is dismissed, and the modal utility is stopped.

For modal input, the real solution was not allowing the user (touchscreen based) a chance to do anything but click on the keyboard. So bringing up a transparent window (WS_EX_TRANSPARENT), that was topmost (WS_EX_TOPMOST), and could not be activated (WS_EX_NOACTIVATE), painting it with the NULL_BRUSH, and covering the whole screen, then positioning it right after My-T-Soft window results in making My-T-Soft Modal. Mouse (touchscreen) clicks to any other part of the screen result in nothing (these are ignored by the Modal transparent window), so only clicking on My-T-Soft does anything useful for the user. Nothing changes the input / keyboard focus when Modal is run, so its presence changes nothing except prevent unwanted mouse input. To dismiss this modal window, running Modal.exe again triggers a message to close the existing process (close window), and the second process does not continue (it simply returns FALSE from WinMain).

To use this effectively, you run Modal.exe at field enter, and run it again at field exit, and you will have My-T-Soft Modal input while the field has the input / keyboard focus.

This example is not only useful, but shows an ideal solution using the developers kit utilities to create a very effective application interface for the end-user.

Version 1.78 Release 2 - 5/4/2007

Copyright © 1993-2007 by Innovation Management Group, Inc.

All Rights Reserved.

My-T-Mouse, My-T-Pen, My-T-Touch, and My-T-Soft are registered trademarks of Innovation Management Group, Inc.


IMG Home PageIMG ProductsProduct DownloadsOrdering InformationTechnical Support and Frequently Asked QuestionsDeveloper's Corner and UtilitiesAbout IMG
CustomersIMG ResellersMedia InformationIMG Events / Trade ShowsUseful LinksIMG Contact InformationIMG Information / Policies