CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Posts
    26

    Question Console Application to No-Console Application

    Hello,
    I have crated console based application project in vc++. After completing I realize I should hide the console of app. It is an exe running in background and another exe takes data from through socket programming.

    To hide the console as my exe starts I used
    Code:
                           HWND hWnd = GetConsoleWindow();
                           ShowWindow( hWnd, SW_HIDE );

    But it does not hide console immediately.

    When I click on exe; first console gets visible then these lines get executed and hide it. But I don't want to load console. Because currently I am able view the console for few seconds or milliseconds. I want it to be completely silent ( or invisible).

    Is there any way ???

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Console Application to No-Console Application

    Move your code to a windows service.

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