Problem when opening Photoshop in C#

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jun 2008
Posts: 147
Reputation: GDICommander is an unknown quantity at this point 
Solved Threads: 19
GDICommander's Avatar
GDICommander GDICommander is offline Offline
Junior Poster

Problem when opening Photoshop in C#

 
0
  #1
Sep 23rd, 2009
Hi, everyone!

I am using Interop.Photoshop.Dll from my C# Windows Forms application. I am using a com object that Adobe Photoshop CS4 provides to use Photoshop in my C# program.

I'm using the ApplicationClass class to launch Photoshop. I have Photosoft CS3 and CS4 on my machine. When I do this:

  1. Photoshop.ApplicationClass app = new Photoshop.ApplicationClass()

It launches Photoshop CS3 and does not launch CS4. Is there someone who knows the cause of this?

P.S: I checked my registry at // HKEY_CLASSES_ROOT\Photoshop.AdobePlugin\shell\open\command and it points to the Photoshop CS4 executable.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,210
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 572
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Problem when opening Photoshop in C#

 
0
  #2
Sep 24th, 2009
Why don't you call Process.Start() instead of using their interop for opening it? If all you're doing is executing it then just start the process.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 147
Reputation: GDICommander is an unknown quantity at this point 
Solved Threads: 19
GDICommander's Avatar
GDICommander GDICommander is offline Offline
Junior Poster

Re: Problem when opening Photoshop in C#

 
0
  #3
Sep 24th, 2009
Unfortunately, I can't call Process.Start() because I will need to get the opened images in Photoshop in my code. So, I need a "pointer" on the application and ApplicationClass can provide it to me.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,210
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 572
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Problem when opening Photoshop in C#

 
0
  #4
Sep 24th, 2009
Zip all of the assemblies Photoshop ships (the interop and related assemblies) so I can take a look at them. This might be a %PATH% issues for installed versions
Last edited by sknake; Sep 24th, 2009 at 8:21 am.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 147
Reputation: GDICommander is an unknown quantity at this point 
Solved Threads: 19
GDICommander's Avatar
GDICommander GDICommander is offline Offline
Junior Poster

Re: Problem when opening Photoshop in C#

 
0
  #5
Sep 24th, 2009
Unfortunately, I cannot send you the assemblies because of the security policies of where I work.

I tried to add the directory path of the Photoshop CS4 executable to the %PATH% variable (because it wasn't here), but it didn't work.

Maybe I will try to uninstall CS3 and see if the ApplicationClass constructor launches CS4, but it is not an acceptable workaround for the user of my program. Any other ideas?
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,210
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 572
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Problem when opening Photoshop in C#

 
0
  #6
Sep 24th, 2009
I was going to decompile the assembly and look how it was determining which application to launch, and how you could change it. I guess you could do that yourself.

Reflector:
http://www.red-gate.com/products/reflector/
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Reply

Tags
c#, cs4, dll, photoshop

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC