newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: m35 on April 09, 2010, 07:43:51 PM

Title: HOWTO - Hiding the console on Windows
Post by: m35 on April 09, 2010, 07:43:51 PM
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.
(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)
)
Title: Re: HOWTO - Hiding the console on Windows
Post by: lyl on November 24, 2020, 11:58:26 PM
A good solution! Then, what or where is use of "SW_SHOW" in your code?