CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Location
    BC, Canada
    Posts
    116

    Making application invisible

    Hello,

    I would like to start another application from my own application for instance by the command
    system ("aaa.exe");
    but I want the new application (aaa.exe) to be invisible such that the user is unaware that another application started.

    I only have access to the .exe file of the new application (aaa.exe).

    Does anyone know how to accomplish this?

    Thanks!

  2. #2
    Join Date
    May 2000
    Location
    Toronto, ON, Canada
    Posts
    3,573
    Hi,

    Try using CreateProcess and set STARTUPINFO member wShowWindow to SW_HIDE.

    See
    Code:
    BOOL CreateProcess(
      LPCTSTR lpApplicationName,                 // name of executable module
      LPTSTR lpCommandLine,                      // command line string
      LPSECURITY_ATTRIBUTES lpProcessAttributes, // SD
      LPSECURITY_ATTRIBUTES lpThreadAttributes,  // SD
      BOOL bInheritHandles,                      // handle inheritance option
      DWORD dwCreationFlags,                     // creation flags
      LPVOID lpEnvironment,                      // new environment block
      LPCTSTR lpCurrentDirectory,                // current directory name
      LPSTARTUPINFO lpStartupInfo,               // startup information
      LPPROCESS_INFORMATION lpProcessInformation // process information
    );
    in MSDN.
    Regards,

    Emanuel Vaduva

  3. #3
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    Take a look at this FAQ for an example of 'CreateProcess()'...

  4. #4
    Join Date
    Aug 2002
    Location
    BC, Canada
    Posts
    116
    Very nice! Thanks guys.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured