Skip to content

How to hide/mimize console  #5

Open
@fprijate

Description

@fprijate

Deno has an compile option --no-terminal (which should work on win, but it doesn't).

github isue #21091

So i tried :

import { GetConsoleWindow } from 'https://win32.deno.dev/0.4.1/System.Console';
import {
   SW_HIDE,
   ShowWindow,
} from 'https://win32.deno.dev/0.4.1/UI.WindowsAndMessaging';

function hideConsole() {
   ShowWindow(GetConsoleWindow(), SW_HIDE);
}

console.log('before');
setInterval(() => console.log('after'), 5000);

hideConsole();

Console is still open.

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions