|IMG Developer's Kit: Developer's Kit Guide and Technical Documentation; Version 1.79; User's Guide|
|Prev||Chapter 7. Language and Platform Examples||Next|
TYPE: Example integration in J# (J Sharp)
IDE: Visual Studio .NET 2003
Welcome to the J# Example set for Developers!
J# Examples / DLL of DevKit - This is an add-on to the Developer's Kit for IMG's My-T-Soft to allow J# Developer's to access & Use the Developer's Kit directly from J#.
Microsoft J# Version Notes
This was built in Microsoft Visual Studio.NET 2003, .Net Framework version 1.1 for maximum compatibility if you open the project in later versions of Visual Studio.NET, just say OK, etc. to convert to the current version you are running.
NOTE: The J# project cannot be run in older version of Visual Studio.NET.
Files & Notes
MYTSOFTJSHARP.vjsproj - Microsoft Visual Studio.NET J# project file
MYTSOFTJSHARP.vjsproj.user - Microsoft Visual Studio.NET Project User Options
Form1.resx - resource file
Form1.jsl - main form class which can all the controls and event handling for the controls
InputBox.jsl - class which create a dialog that allows the user to enter the path of a file into a textbox and returns the path to the caller
AssemblyInfo.jsl - class used to control general information about the assembly
Running the application under Windows XP, Windows 2000 Professional
Prerequisites: .NET Framework version 1.1 or later with the Visual J# .NET Redistributable Package 1.1
a. You should find the folder JSHARP in default install location of the My-T-Soft product (My-T-Soft, My-T-Touch, My-T-Pen). If folder is not found then follow the installations instructions under Sec. 2. Navigate to .\JSHARP\MYTSOFTJSHARP\bin\Release
b. Click on MYTSOFTJSHARP.exe to run the application
Running the code under Windows XP, Windows 2000 Professional
Prerequisites: Visual Studio.NET 2003 or later with the Visual J# .NET Redistributable Package 1.1
a. You should find the folder JSHARP in default install location of the My-T-Soft product (My-T-Soft, My-T-Touch, My-T-Pen). If folder is not found then follow the installations instructions under Sec. 2. Navigate to .\JSHARP\MYTSOFTJSHARP
b. Click on MYTSOFTJSHARP.vjsproj to open the project
c. Click on Debug->Start from the menu to run the application.
Compiling the Dll code under Windows XP, Windows 2000 Professional
a. You should find the folder JSHARP in default install location of the My-T-Soft product (My-T-Soft, My-T-Touch, My-T-Pen). If folder is not found then follow the installations instructions under Sec. 2. Navigate to .\JSHARP\MYTSDLL
b. Click on MYTSDLL.csproj to open the project
c. Click on Build->Build Solution from the menu to create the dll. The dll can be found in the .\JSHARP\MYTSDLL\bin\Release folder.
Some of the features assume that the Developer's Kit has already been "installed". If the "Send Text Thru" or the "External Control" examples are not operating properly, then install the DevKit:
Start Menu | Programs | My-T-???? | Install Developer's Kit
The appropriate Project name (MYTSOFTJSHARP.vjsproj) should be run from a "JSHARP" folder under the install directory of matching product.
The source code & derived executable are provided at no cost as useful & instructional materials to developers & system integrators incorporating IMG software. Because no licensing fee has been tendered, there is no technical support offered for this software, source code, or its capabilities to solve a particular problem.
There is a fair amount of error checking, but every possibility has not been addressed. If the default installation of all components has been done, then the operation should be straightforward & error free. If there are operational problems, then it is assumed that as a J# developer, fixing the error will not be a problem. You may contact IMG at "firstname.lastname@example.org" or check our website "http://www.imgpresents.com" for any news or updates, but technical support is not offered for the Developer's Kit utilities - source code is provided, and should be referenced.
Once in the Visual Studio.NET Environment, simply click Debug then Start from the menu to engage the form & start Operation. Click on buttons to see operational features, "Stop" operation and review J# Form / Properties / Controls & Properties / Class code, etc. See MTSDLL.csproj for source code of C# based DLL.
Note - this DLL has been generalized - see the MTSDLL for the "future" of this DLL.
If the MYTSDLLCS.DLL is not found in the current directory or in the application path where MY-T??, is installed, a InputBox will appear to "ask" for its location, enter the full path including the filname into the textbox and hit Enter.
Buttons / Text Fields
Launch - This will launch the appropriate product based on the project loaded. By default (See DLL Source code) My-T-Soft is attempted, if it fails, then My-T-Touch is attempted, if it fails, then My-T-Pen is attempted. If these fail, then it is assumed the default install locations have not been used, and the LaunchFromCurrentMTS function is called with the current directory, and the parent folder (i.e. the folder that contains the JSHARP folder) is used as the location of the product. If the My-T-Soft keyboard is NOT launched, either:
a) Modify the source code to fit your requirements
b) Run the My-T-Soft product directly...
Close - this will Close the running keyboard software
Minimize to Button - will send the message to minimize to button
Open from Button - will send the message to open from the button state
MoveWindow / text fields X & Y - enter appropriate values in the text fields, and click on button to move keyboard window to that (Top/Left) X, Y location
Set Cursor Position / text fields X & Y - this will move the cursor (mouse cursor) to X, Y location
Save Settings - Saves the current configuration / panels open on the keyboard software
Save Position - Saves the Top/Left X, Y position of the keyboard software
Restore Settings - restores the saved panels & position
Restore Position - restores X, Y location (Top/Left) of keyboard software with current configuration preserved
Send Text Through My-T-Soft - This is an advanced feature of the My-T-Soft version - the J# example does not back support My-T-Touch or My-T-Pen, although this could work with some modification - this is left as an exercise for the developer. The compatibility issue revolves around the way the keystrokes are sent - the example here uses the embedded codes ([Tab], [Enter], [F1]), and this is only supported in the SDSTRM32.EXE, which only operates with My-T-Soft Version 1.50 and above (or NT/2000 versions).
This is grayed out in the My-T-Touch and My-T-Pen versions (Enabled = False) earlier than 1.70. In order to operate properly, the Developer's Kit must have been installed (to ensure the SDSTRM32.EXE file is in the Install directory). By clicking on the Send button, the text in the left-hand text field will be sent through to My-T-Soft - the default [Tab] moves the keyboard focus to the right text field, and the rest of the text is typed. In order for My-T-Soft to type via this mechanism, the cursor must have previously been over the keyboard window, or must be moved over the keyboard window to "engage" the appropriate window & keyboard focus code in My-T-Soft. See Developer notes / source code for SDSTRMTS for other details. Note that using the Set Cursor Position option, this can be forced with a FindWindow / GetWindowRect with the Windows API or MoveWindowMTS and SetCursorPosMTS.
Configuration On-the-fly - Select the appropriate panels and/or size, click on Configure and the keyboard software will reconfigure itself based on the checked panels / size. Note that the position is dependent on current position, and how the new configuration will fit on screen.
See External Control & notes on CPYCNMTS.C for a much stronger level of control which includes positioning.
External Control - For proper operation, the Developer's Kit MUST be extracted (installed).
The files KYBD.CFG, EDIT.CFG, NUM.CFG, and MACRO.CFG must be in the installation directory. If you want to modify the default "configurations", refer to the notes of CPYCNMTS (Copy & Configure My-T-Soft) in the Developer's Kit. Essentially, the configuration & position must be saved - Save Position / Save Settings. Then the KEYBOARD.KBF can be copied to the "saved" configuration (e.g. COPY KEYBOARD.KBF NEW.CFG). Call 'CopyConfigureMTS("NEW.CFG")' to establish this configuration instantly...
Keyboard Config - Uses KYBD.CFG
Edit Config - Uses EDIT.CFG
Num Config - Uses NUM.CFG
Macro Config - Uses MACRO.CFG
Toggle off-screen or reconfigure - this uses the FWCTLMTS approach. Logic is: if "on-screen", move "off-screen" if "off-screen" used CopyConfigure approach to establish new configuration.
My-T-Soft J# Examples
Version 1.78 - August 9, 2005
Copyright 2004-2005 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.