Jump to content
azrael_11

List of open delphi IDE

Recommended Posts

How can i take a list of opened Delphi IDE and which one is the active when i do a double click in a .pas file?

 

 

Share this post


Link to post

If you double-click on a file in Windows Explorer that is the active application, so if you have more than one Delphi instance running none of them is active and which one is handed the file probably depends on which one the BDSLauncher app registered as "server" for .pas files finds first. You have no control over that, so do not open the file by double-click, drag it to the IDE instance you want to use to open it.

Share this post


Link to post
8 hours ago, PeterBelow said:

If you double-click on a file in Windows Explorer that is the active application, so if you have more than one Delphi instance running none of them is active and which one is handed the file probably depends on which one the BDSLauncher app registered as "server" for .pas files finds first. You have no control over that, so do not open the file by double-click, drag it to the IDE instance you want to use to open it.

The main reason to seek which Delphi IDE have the "control" to open files is not the double clicking. Is that when i am inside the project i made when i open a form then i get the class name and make with a key compination like ctrl+F1 to open the .pas file of the form.

But when i have two Delphi IDEs open i cant sent it to open in the specific IDE to open instead that it opens in the last instance of Delphi IDE.

 

Is there anyway to open this file at runtime from the specific Delphi IDE that i want and not the last one that opens?

 

Thank you.

Share this post


Link to post
32 minutes ago, azrael_11 said:

s there anyway to open this file at runtime from the specific Delphi IDE that i want and not the last one that opens?

Sure.    Go to the IDE you want the file loaded to and give last focus to it then do your double click business. Most users would want IDE last worked in to get incoming files.  Note not tested across Desktops!     

 

 

Edited by Pat Foley
oops works with 11 readily with DDE patch

Share this post


Link to post
7 hours ago, Pat Foley said:

Sure.    Go to the IDE you want the file loaded to and give last focus to it then do your double click business. Most users would want IDE last worked in to get incoming files.  Note not tested across Desktops!     

 

 

Maybe misunderstood what i write or i write completely wrong.

Let me be more specific.

 

function Tfrm_custom_debug_info.RunCommand(Command: String): Boolean;
var
  full: string;
begin
  full := '/C '+ Command;
  ShellExecute(0, nil, 'cmd.exe', PChar(full) , nil, SW_HIDE);
  Self.Close;
end;

I have this function in my code.

the command which is string is the full path of a .pas file.

 

when the program is in runtime and run this function the .pas file opens in the last Delphi IDE i open.

 

What i want to do here is.

 

  1. Get a list of all DELPHI IDE that running
  2. Somehow when i execute the function above open the .pas file in the DELPHI IDE i want choose from the list i get above.

I think now be more specific.

 

Thank you

 

Share this post


Link to post
8 hours ago, azrael_11 said:

The main reason to seek which Delphi IDE have the "control" to open files is not the double clicking. Is that when i am inside the project i made when i open a form then i get the class name and make with a key compination like ctrl+F1 to open the .pas file of the form.

But when i have two Delphi IDEs open i cant sent it to open in the specific IDE to open instead that it opens in the last instance of Delphi IDE.

 

Is there anyway to open this file at runtime from the specific Delphi IDE that i want and not the last one that opens?

 

Thank you.

Is this project of your's a IDE add-on (wizard or such)? If it is implemented in a design-time package you can use the Open Tools API to open a file instead of leaving the task to Explorer.

Share this post


Link to post
On 10/5/2023 at 1:36 AM, azrael_11 said:

The main reason to seek which Delphi IDE have the "control" to open files is not the double clicking. Is that when i am inside the project i made when i open a form then i get the class name and make with a key compination like ctrl+F1 to open the .pas file of the form.

But when i have two Delphi IDEs open i cant sent it to open in the specific IDE to open instead that it opens in the last instance of Delphi IDE.

 

Is there anyway to open this file at runtime from the specific Delphi IDE that i want and not the last one that opens?

 

Thank you.

You can discover installed Delphi versions, list their running instances (or start a new one) and instruct them to open a file via TAEDelphiVersions. This is exactly what my configurable BDSLauncher is based on, maybe that one will fit your needs without any extra coding.

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

×