HOWTO - Hiding the console on Windows

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?

HOWTO - Hiding the console on Windows

Postby m35 » Sat Apr 10, 2010 2:43 am

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)
Posts: 171
Joined: Wed Feb 14, 2007 12:54 pm
Location: Carifornia

Return to newLISP and the O.S.

Who is online

Users browsing this forum: No registered users and 1 guest