Ask a questionAsk a question
 

Answerhelp with Shellexecute

  • Friday, November 04, 2005 1:11 AMSteveiwonder Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hiyaz
    i new to this guys and was told to post this here,i'm trying to get shellexecute to run something, just say i wanted to run/open a old text document
    "C:\test.txt"
    i would use this
    ShellExecute(handle, open,"C:\test.txt", NULL, NULL, SW_SHOWNORMAL);
    or
    ShellExecute(handle, open,"C:\test.exe", NULL, NULL, SW_SHOWNORMAL);

    ? correct?
    if so it doesn't work.... it complains about the handle part... i'm new to this command so dont know what your meant to put in "handle"
    Any help would be great.
    thx
    Steve

Answers

All Replies

  • Thursday, November 10, 2005 4:57 PMMartin RichterMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Just use NULL as a window handle if you have non:
    ShellExecute(NULL, "open","C:\test.txt", NULL, NULL, SW_SHOWNORMAL);
  • Tuesday, December 05, 2006 3:17 PMExchangeData Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi All,

     

    I am using ShellExecuteW() in VB6.0. Following is my call:

    IR = ShellExecuteW(0, StrPtr("open"), StrPtr("C:\Rsync1\Redirect.exe"), StrPtr(sParameters), StrPtr(""), 0)

     

    But I want to wait for the application till the Redirect.exe finshes its work.

    Can anybody help me please?

    Regards,

    Kamal...