Unit Justone |
JustOne v1.2 - A Delphi Component (16 bit version) By: Steven L. Keyser email: 71214.3117@compuserve.com JustOne v1.2 - No changes were made to this source code other than to (3/17/96) change the version number from 1.1 to 1.2. This was done in conjunction with the release of the 32 bit version, whose first version number is also 1.2. JustOne v1.1 - Added the ABOUT property (1/14/96) - Eliminated the AllowMultInst property - Eliminated the EXECUTE property - Added JUSTONE.HLP - Added JUSTONE.KWF Notes: The ABOUT property was added simply as a learning exercise. The EXECUTE property was removed due to an improvement in the component's design. With special thanks to Russ Chinoy, the JustOne component no longer requires any code to be added to the user's application. Dropping the JustOne component onto the startup form is all that is required now to make JustOne work for you. JustOne v1.0 - The basic stuff. (Oct '95) Purpose: JustOne is a component which makes it easy to limit the number of your application's instances to just one. If a second instance of your application starts, the first instance is brought to the front and given the focus (or restored if it was minimized to an icon). The second instance then halts. Credit where credit is due... Some of the source code for this component came from a Help file I downloaded from the Delphi Forum on CompuServe (LDELPHI.ZIP). This Help file, called Lloyd's Delphi Notes (Lloyd Linklater), lists many tips on using Delphi. One of the items addressed is how to add code to your application which will allow just one instance to run. In the Help file, that code is further credited to Pat Ritchey. I took that snippet of code and put it into an easily re-usable component. Additional ideas came from Russ Chinoy (RC Software) on a way to have JustOne perform its function without the user having to put any code into their application. JustOne is released as Freeware. If you use it, you do so at your own risk. Feel free to modify this source code to suit your own purposes. If you enhance JustOne, I'd like to see your work.
Classes |
TJustOne -
Functions |
EnumFunc - ########################################################################
Register - ########################################################################
Types |
Constants |
Variables |
Functions |
Types |
PHWND = ^HWND
TMyDataType = record
Name : string;
end;
Constants |
Variables |