Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console window stays open when running a compiled Win32 GUI EXE #127

Open
timsneath opened this issue Jan 4, 2021 · 0 comments
Open

Console window stays open when running a compiled Win32 GUI EXE #127

timsneath opened this issue Jan 4, 2021 · 0 comments
Labels
blocked Waiting on an external issue to be resolved bug Something isn't working

Comments

@timsneath
Copy link
Contributor

When you execute a compiled Win32 (non-console) application such as the Notepad example, the console application that launches it remains visible.

In #126, @ilopX suggests a clever workaround technique to patch the console executable with the same header that you'd get from the /SUBSYSTEM:WINDOWS linker command in Visual Studio. This solution makes me slightly nervous due to the brute force nature of hot-patching binaries.

For completeness, another approach that doesn't require patching executables is to add this to the first line of your main() function:

  ShowWindow(GetConsoleWindow(), SW_HIDE);

although I concede that this generates a very quick flash as it loads and immediately closes the console window.

This also feels like a good feature request for the Dart compiler, to solve this without the downsides of either of our proposals.

Opening this issue to explore solutions to this problem.

@timsneath timsneath added the bug Something isn't working label Jan 4, 2021
@halildurmus halildurmus added the blocked Waiting on an external issue to be resolved label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Waiting on an external issue to be resolved bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants