HOWTO - Hiding the console on Windows

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Post Reply
m35
Posts: 171
Joined: Wed Feb 14, 2007 12:54 pm
Location: Carifornia

HOWTO - Hiding the console on Windows

Post by m35 »

I have the newLISP web server locally serving up custom RSS feeds generated by a little newLISP cgi script. Of course having the newLISP server console window lingering on screen isn't very nice, so I found an easy fix. Add this to the httpd-conf.lsp script, and your newLISP web server console window will happily run in the background.

Code: Select all

(import "kernel32.dll" "GetConsoleWindow")
(import "user32.dll" "ShowWindow")
(constant 'SW_HIDE 0)
(constant 'SW_SHOW 5)

(setq hwndConsole (GetConsoleWindow))
(if-not (zero? hwndConsole)
    (ShowWindow hwndConsole SW_HIDE)
)

lyl
Posts: 44
Joined: Sun Mar 25, 2018 5:00 am

Re: HOWTO - Hiding the console on Windows

Post by lyl »

A good solution! Then, what or where is use of "SW_SHOW" in your code?

Post Reply