Click here to Skip to main content
15,888,044 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to open images and catlog in photoshop ,lightroom resp. Kindly help me.
Thanks in advance

What I have tried:

using System.Windows.Forms;
using System.Diagnostics

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
Process.Start("mspaint", @"""C:\Desert.jpg""");

}
}
Posted
Updated 28-Mar-16 2:33am

Assuming the user has them installed and configured as the "default app" for .JPG files (which is likely, or he prefers to use a different app) then just omit the exe file:
C#
Process.Start(@"C:\Desert.jpg");
Will do it.
 
Share this answer
 
Comments
Atul 10576159 28-Mar-16 8:34am    
hi,

we r nt depend on dat defult app setting sir. we have to directly open in photoshop or lightroom in photoshop.
Your code runs on the server so the task is being started on the server under an account that doesn't have access to the desktop. You can't launch apps on the client from asp code.
 
Share this answer
 
Comments
Atul 10576159 28-Mar-16 8:39am    
we r creating windows application. by starting this application we have to open image in photoshop/lightroom in photoshop. plz help me ..
F-ES Sitecore 28-Mar-16 8:56am    
Photoshop supports COM so you can automate it from c#, google "automate photoshop c#" and you'll find some examples of how to open images etc. If you just want to lanch the app you might be able to do that from COM, I know you can launch Word etc that way, but it depends what PS supports (I don't have it to can't test).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900