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


C# (.NET) Example

FOLDER: CSHARP

TYPE: Example integration in C# / .NET

SOURCE: INCLUDED

LANGUAGE: C# / .NET Framework

IDE: Visual Studio .NET 2003

C# Examples / DLL of DevKit

Welcome to the C# Example set for Developers!

This is an add-on to the Developer's Kit for IMG's My-T-Soft to allow C# Developer's to access & Use the Developer's Kit directly from C#.

Microsoft C# 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 C# project cannot be run in older versions of Visual Studio.NET.

Files & Notes

MYTSOFT.csproj - Microsoft Visual Studio.NET C# project file

MYTSOFT.csproj.user - Microsoft Visual Studio.NET Project User Options

Form1.resx - resource file

InputBox.resx - resource file

App.ico - icon file

Form1.cs - main form class which can all the controls and event handling for the controls

InputBox.cs - 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.cs - class used to control general information about the assembly

C# Developers:

Running the application under Windows XP, Windows 2000 Professional

Prerequisites: .NET Framework version 1.1 or later.

a. You should find the folder CSHARP 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. 1. Navigate to .\CSHARP\MYTSOFT\bin\Release

b. Click on MYTSOFT_CS.exe to run the application

Running the code under Windows XP, Windows 2000 Professional

Prerequisites: Visual Studio.NET 2003 or later.

a. You should find the folder CSHARP 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. 1. Navigate to .\CSHARP\MYTSOFT

b. Click on MYTSOFT.csproj to open the project

c. Click on Debug->Start from the menu to run the application.

Operation

The appropriate Project name (MYTSOFT.csproj) should be run from a "CSHARP" folder under the install directory of matching product.

**********************************************************

DISCLAIMER

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 C# developer, fixing the error will not be a problem. You may contact IMG at "devkit@imgpresents.com" 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 C# 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.

Operation Notes

Load Event

If the MYTSDLLCS.DLL is not found in the current directory or in the application path where MT??, 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 CSHARP 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

-or-

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 C# 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 C# 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.


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


As seen in ...

Yahoo!finance