Jump to content
Ian Branch

Single Instance of Dephi IDE?

Recommended Posts

Hi Team,

D10.2.3

Is there any way to make the Delphi only open a single instance and if I try to open it again it won't and/or goes to the already open instance?

I keep forgetting it is open and minimised whilst I work on other things and then click unthinkingly on the shortcut. :-(

Regards & TIA,

Ian

Share this post


Link to post

You can write an IDE plugin for this that switches to the existing instance, then quits the new one.

 

But first you have to define "single instance", and how to set instances apart.

 

For instance, I know many Delphi developers that run Delphi with various registry tree starting points. Or run  one with admin privileges and the other without. Or run one as user A and another as user B. Are those different instances?

 

A much simpler trick might be to look at the windows task bar: is there already a Delphi icon on it? Click on it and see which instances are running.

Share this post


Link to post

After I run for the first time an app I often use I pin it to the taskbar (Windows 10) and then I click only on this icon.

Left click will open it, if it's closed, and switch to if it's open.

Middle click will open every time a new instance.

  • Like 1

Share this post


Link to post
6 minutes ago, Cristian Peța said:

After I run for the first time an app I often use I pin it to the taskbar (Windows 10) and then I click only on this icon.

Me too!!

Share this post


Link to post

A plugin would probably not be the best solution because that would always prevent multiple instances of the IDE. I think pinning it to the taskbar is a simple solutin that should work.

 

Otherwise I would write a program that checks if the IDE is running and if yes, brings it to the foreground, if no starts it. And then instead of starting the IDE start that program. (But basically that's the same as pinning the IDE to the taskbar.)

Share this post


Link to post

Hi Guys,

Thank you for your inputs.

It's the simple things...  I have always worked with a Delphi shortcut, or two, or three on the desktop.  It has just become a reflex to go to it an click.

Remove the short cut and put it on the Task Bar?  I will give it a try.  Have to watch those automated fingers roaming around the desktop looking for the shortcut. ;-)

I understand developers may want to have multiple copies open at the same time, can't really see why but that reflects what I do and how I work.

I still think a switch to disable multiple copies to be open, or not, would be handy.  Unfortunately my skills don't extend to writing plug-ins and interacting with the IDE.

Thanks again Guys,

Ian

Share this post


Link to post
53 minutes ago, Ian Branch said:

I still think a switch to disable multiple copies to be open, or not, would be handy. 

File feature request at Quality Portal an post the link back here.  I know many that would find such switch handy.

Share this post


Link to post
3 hours ago, Ian Branch said:

I understand developers may want to have multiple copies open at the same time, can't really see why

I'm working on some project, a colleague calls and has a question about a different project. To be able to answer this question, I need to look at the source code of that project. So I open another instance of the IDE, to open that project without losing the current one.

Sometimes this results in several instances running, not just two, because while looking up something another question came up. My record was 5.

 

Yes, that's not a good way to stay concentrated and I try to deter them from interrupting. It just doesn't work very well...

Edited by dummzeuch

Share this post


Link to post
6 hours ago, Ian Branch said:

And GExperts complains on the second and subsequent instances... 😉

Not in my installations. I turn that off whenever I get it.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×