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

Windows 上子进程弹出控制台窗口 #63

Closed
Tracked by #73
ilharp opened this issue Oct 9, 2022 · 4 comments
Closed
Tracked by #73

Windows 上子进程弹出控制台窗口 #63

ilharp opened this issue Oct 9, 2022 · 4 comments
Assignees
Labels
bug Something isn't working roadmap Part of roadmap win
Milestone

Comments

@ilharp
Copy link
Member

ilharp commented Oct 9, 2022

使用以下方法解决:

构建 Console Application 后,启动时调用

import "github.com/gonutz/w32/v2"

func hideConsole() {
    console := w32.GetConsoleWindow()
    if console == 0 {
        return
    }
    _, consoleProcID := w32.GetWindowThreadProcessId(console)
    if w32.GetCurrentProcessId() == consoleProcID {
        w32.ShowWindowAsync(console, w32.SW_HIDE)
    }
}
@ilharp ilharp added bug Something isn't working roadmap Part of roadmap win labels Oct 9, 2022
@ilharp ilharp self-assigned this Oct 9, 2022
@ilharp
Copy link
Member Author

ilharp commented Oct 15, 2022

调研已结束,上述方法不可使用,该问题无解。

将使用类 Bootstrap 方式实现需求。

ilharp added a commit that referenced this issue Oct 15, 2022
@ilharp
Copy link
Member Author

ilharp commented Oct 15, 2022

调研已修正,上述方法可以使用,该问题有解。

将使用上述方法实现需求。

@ilharp
Copy link
Member Author

ilharp commented Oct 15, 2022

Fixed by:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working roadmap Part of roadmap win
Projects
Development

No branches or pull requests

1 participant