Copyright: JustOne Copyright ® '95, '96 by S.L.Keyser


Contents
 JustOne [image]   v1.2

Overview

JustOne is a component which when added to your application, makes it easy to limit the number of your app's instances to just one.  If a second instance of your application is started, JustOne brings the first instance to the front, gives it the focus, and then shuts down the second instance.  If the first instance of your application is minimzed to an icon when the second instance starts, JustOne will even 'restore' the first instance to it's normal window state.

Using JustOne

Installing the JustOne component (16 bit)

Installing the JustOne component (32 bit)

JustOne is Freeware

Contacting the author

Version info


Using JustOne
Using JustOne  v1.2	see also

JustOne is simple to use.

Simply drag the JustOne component from your component palette and drop it onto your startup form.  That's all there is to it.

When you run your application, the JustOne constructor will go out and look to see if a previous instance of your application is running.  If so, the first instance of your app is brought to the front and the second instance is halted.

If your application's first instance was minimized to an icon, it will be 'restored' as it is brought to the front.

If you are upgrading from v1.0 (16 bit only)...

If you load an application into the Delphi IDE, and that application is already using JustOne v1.0, you may be prompted with a message dialog box indicating there are missing properties.  This is okay... just click the 'IGNORE' button.

Also, you will need to remove the code from your application which caused JustOne to execute under v1.0.  This is usually in your Form.Create procedure. Remove the line you added which probably looked like JustOne1.Execute;.


Installation
16 bit Version Installation	see also

JustOne is installed into your component pallette like any other component.  As individual preferences vary, you may place the following files where you generally keep similar file types.

File	Description

JUSTONE.PAS	The source code for JustOne.  You can use this to compile your own JUSTONE.DCU file.

JUSTONE.DCR	This is the resource file which contains the JustOne icon which appears in your component palette and on your forms.

JUSTONE.DCU	This is the compiled unit.  When you 'ADD' to your component palette, this unit is the source of what gets added to your component library (COMPLIB.DCL).  (If you wish, you may choose to not use this DCU file.  That being the case, you can compile your own using the JUSTONE.PAS file.)

JUSTONE.HLP	This is a Windows help file for the 16 bit version.

JUSTONE.KWF	This is a key word file which enables you to access the JustOne Help file by pressing the F1 key from within Delphi.

For detailed help on installing components, please refer to page 68 of your Delphi User's Guide*.  The section, Customizing the Delphi Visual Component Library (VCL),  explains this process.

For detailed help on installing the keyword file, please refer to page 80 of your Delphi Component Writer's Guide*.  The section, Merging the Help indexes, explains this process.

* Delphi 1.0 documentation (Windows)


Freeware
JustOne is Freeware	see also

JustOne is provided as Freeware.  Feel free to use it as you wish, but you do so at your own risk.

Credit Where Credit Is Due - 32 bit version

As soon as my copy of Delphi 2.0 arrived, I tried to recompile JustOne into a 32 bit component. I quickly learned that JustOne used API calls and one Systems Unit constant (hPrevInst) which were no longer supported.  I posted a note in the Delphi Forum on CompuServe seeking assistance with the hPrevInst issue.  Within 2 hours Pat Richie (see below) responded with an easy work around. My thanks.

Credit Where Credit Is Due - 16 bit version

Some of the source code for the 16 bit version of this component came from a Help file downloaded from the Delphi Forum on CompuServe (LDELPHI.ZIP).  The 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 that Help file, the code is further credited to Pat Ritchey.  My contribution was simply to place the code into a reusable component.

Additional Thanks

Additional thanks go to Russ Chinoy (RC Software) for sharing his enhancements which have been included since release 1.1.


author
Contacting the Author	see also

Please feel free to share your enhancements to JustOne.  It is a simple component with a simple task, but there's always room for improvement.

Send your comments and ideas to:

Location	Address

CompuServe address:	71214,3117

Internet e-mail:	71214.3117@compuserve.com

Enjoy,

Steve Keyser

=== Las Vegas ===


version info
Version Info	see also

Version	Description

v1.2	Added a 32 bit version.  The 16 bit version has no changes to it other than this help file. The 32 bit version, on the other hand, is a major rewite of the code.  Earlier versions of JustOne relied on API calls which do not exist under WIN95 and on a Systems Unit constant which no longer exists in Delphi 2.0.  While the code between the 16 bit and 32 bit versions is significantly different, the use and end results are the same.  March 17, 1996

v1.1	Streamlined the use of the component.  It is no longer necessary to 'EXECUTE' the component from your code to make it work.  Added a help file and a key word file.  Eliminated the 'AllowMultInst' property and the 'Execute' property.  Added an 'About' button property which shows in the Object Inspector.  January 14, 1996

Backward compatibility

v1.0	Initial release.  October 1995


PG7
Contents

>	Using JustOne

Installing JustOne (16 bit)

Installing JustOne (32 bit)

JustOne is Freeware

Contacting the Author

Version Info


PG8
Contents

Using JustOne

>	Installing JustOne (16 bit)

Installing JustOne (32 bit)

JustOne is Freeware

Contacting the Author

Version Info


PG9
Contents

Using JustOne

Installing JustOne (16 bit)

Installing JustOne (32 bit)

>	JustOne is Freeware

Contacting the Author

Version Info


PG10
Contents

Using JustOne

Installing JustOne (16 bit)

Installing JustOne (32 bit)

JustOne is Freeware

>	Contacting the Author

Version Info


PG11
Contents

Using JustOne

Installing JustOne (16 bit)

Installing JustOne (32 bit)

JustOne is Freeware

Contacting the Author

>	Version Info


Installation
32 bit Version Installation	see also

JustOne is installed into your component pallette like any other component.  As individual preferences vary, you may place the following files where you generally keep similar file types.

File	Description

JUST1_32.PAS	The source code for JustOne.  You can use this to compile your own JUSTONE32.DCU file.

JUST1_32.DCR	This is the resource file which contains the JustOne icon which appears in your component palette and on your forms.

JUST1_32.DCU	This is the compiled unit.  When you 'ADD' to your component palette, this unit is the source of what gets added to your component library (CMPLIB32.DCL). (If you wish, you may choose to not use this DCU file.  That being the case, you can compile your own using the JUST1_32.PAS file.)

JUST1_32.HLP	This is a Windows help file for the 32 bit version.

JUST1_32.KWF	This is a key word file which enables you to access the JustOne Help file by pressing the F1 key from within Delphi.

For detailed help on installing components, please refer to page 43 of your Delphi User's Guide*.  The section, Customizing the component library, explains this process.

For detailed help on installing the keyword file, please refer to page 80 of your Delphi Component Writer's Guide*.  The section, Merging the Help indexes, explains this process.

* Delphi 2.0 documentation (Windows 95 & Windows NT)


PG13
Contents

Using JustOne

Installing JustOne (16 bit)

>	Installing JustOne (32 bit)

JustOne is Freeware

Contacting the Author

Version Info