Click here to Skip to main content
16,005,080 members
Home / Discussions / C#
   

C#

 
GeneralRe: executing a program by double clicking on a file shown in list view ( C# ) Pin
Gianpaolo Barci13-Oct-08 4:48
Gianpaolo Barci13-Oct-08 4:48 
GeneralRe: executing a program by double clicking on a file shown in list view ( C# ) Pin
SeMartens13-Oct-08 5:00
SeMartens13-Oct-08 5:00 
Generalexplaining better my program Pin
Gianpaolo Barci13-Oct-08 5:22
Gianpaolo Barci13-Oct-08 5:22 
GeneralRe: executing a program by double clicking on a file shown in list view ( C# ) Pin
Dave Kreskowiak13-Oct-08 5:01
mveDave Kreskowiak13-Oct-08 5:01 
GeneralRe: executing a program by double clicking on a file shown in list view ( C# ) Pin
Gianpaolo Barci13-Oct-08 5:29
Gianpaolo Barci13-Oct-08 5:29 
GeneralI tried another method!!! Pin
Gianpaolo Barci13-Oct-08 4:59
Gianpaolo Barci13-Oct-08 4:59 
AnswerGetting really close the answer!!!! Pin
Gianpaolo Barci13-Oct-08 7:11
Gianpaolo Barci13-Oct-08 7:11 
GeneralRe: Getting really close the answer!!!! Pin
SeMartens13-Oct-08 21:23
SeMartens13-Oct-08 21:23 
Hi,

it's me again. Sry, for didn't answering yesterday, was on my way home.

Okay, so opening the file is not the problem. The problem is to get the path and name of the file to open. So let me guess that you doing something like this.

public string getFullPath(string sPath) {
   string sFileName = lvFiles.SelectedItem[0].Text;
   return System.IO.Path.Combine(sPath, sFileName);
}

private void executeFile(TreeNode nodeCurrent) 
{
   Process.Start(getFullPath(nodeCurrent.FullPath));
   Process.Start(String.Format("\"{0}\"", getFullPath(nodeCurrent.FullPath)));
}


If you are doing this, you get an error from the compiler? Did you include the Namespace (using System.Windows.Forms)? Or rewrite it to

private void executeFile(System.Windows.Forms.TreeNode nodeCurrent) {
  ...
}


Does this solve your problem?

Regards
Sebastian
QuestionHow to read a DLL written in VB.NET in C#. Pin
MegaBlasterX13-Oct-08 4:16
MegaBlasterX13-Oct-08 4:16 
AnswerRe: How to read a DLL written in VB.NET in C#. Pin
Abhijit Jana13-Oct-08 4:32
professionalAbhijit Jana13-Oct-08 4:32 
GeneralRe: How to read a DLL written in VB.NET in C#. Pin
MegaBlasterX13-Oct-08 21:22
MegaBlasterX13-Oct-08 21:22 
AnswerRe: How to read a DLL written in VB.NET in C#. Pin
Dave Kreskowiak13-Oct-08 4:57
mveDave Kreskowiak13-Oct-08 4:57 
GeneralRe: How to read a DLL written in VB.NET in C#. Pin
MegaBlasterX13-Oct-08 21:21
MegaBlasterX13-Oct-08 21:21 
GeneralRe: How to read a DLL written in VB.NET in C#. Pin
Dave Kreskowiak14-Oct-08 1:41
mveDave Kreskowiak14-Oct-08 1:41 
Questionwsdl command error when accessing https Pin
George_George13-Oct-08 3:58
George_George13-Oct-08 3:58 
AnswerRe: wsdl command error when accessing https Pin
N a v a n e e t h13-Oct-08 7:06
N a v a n e e t h13-Oct-08 7:06 
GeneralRe: wsdl command error when accessing https Pin
George_George14-Oct-08 2:38
George_George14-Oct-08 2:38 
QuestionwebBrowser reading ms word docs Pin
panoskatws13-Oct-08 3:44
panoskatws13-Oct-08 3:44 
Questionplugin for IE Pin
mahdi shahbazi13-Oct-08 2:51
mahdi shahbazi13-Oct-08 2:51 
AnswerRe: plugin for IE Pin
N a v a n e e t h13-Oct-08 3:01
N a v a n e e t h13-Oct-08 3:01 
Questioncount times together Pin
redspiderke13-Oct-08 2:42
redspiderke13-Oct-08 2:42 
AnswerRe: count times together Pin
N a v a n e e t h13-Oct-08 2:56
N a v a n e e t h13-Oct-08 2:56 
AnswerRe: count times together Pin
Simon P Stevens13-Oct-08 3:01
Simon P Stevens13-Oct-08 3:01 
AnswerRe: count times together Pin
KaptinKrunch13-Oct-08 3:06
KaptinKrunch13-Oct-08 3:06 
QuestionHow to get OS name? Pin
S a n d y13-Oct-08 2:37
S a n d y13-Oct-08 2:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.