[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 966
  • Last Modified:

AllocConsole() question

Hi, is it possible to hide the console window that pops up when you make a call to AllocConsole?  Thanks.

-Matt
0
matthewsmith
Asked:
matthewsmith
  • 2
  • 2
1 Solution
 
alechkoCommented:
Try to call ShowWindow in your application to bring it to the top after you to allocate the console.
0
 
matthewsmithAuthor Commented:
I could use ShowWindow() to hide the console window if I had a handle to the console, but how would I get the handle?

-Matt
0
 
NickRepinCommented:
Obtaining a Console Window Handle (HWND)
Article ID: Q124103
0
 
NickRepinCommented:
If I'm not wrong, you have to wait (Sleep) some time between AllocConsole() and attempt to find the console window.
0
 
matthewsmithAuthor Commented:
Thanks for the help all.  It's kind of annoying to have the console window flash when starting up the gui app, but hey, it works.  Thanks again. :)
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now