让批处理文件最小化 DOS 窗口?

发布于 2024-07-17 20:08:10 字数 136 浏览 8 评论 0原文

所以我又有点喜欢 MS-DOS 之类的东西,但我问自己,如何最小化 DOS 窗口? 任何类型都可以,最小化,缩小到一个小的蓝色块。

我似乎找不到一种方法让它在我的 Windows XP 计算机上运行,​​XP 中真的排除了一切吗?!

So i'm kinda into MS-DOS and such again, but i came to ask myself, How can i minimize a DOS window?
Any kind would be ok, minimalize, shrink to a tiny blue block.

I just can't seem to find a way to let it work on my Windows XP computer, is realy evrything excluded in XP?!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

余生共白头 2024-07-24 20:08:10

您可以使用 start 命令在新的最小化窗口中启动程序:

start /min your_command_here

You can start a program in a new minimised window using the start command:

start /min your_command_here
浪漫之都 2024-07-24 20:08:10

您可以做的一件事是创建一个 Windows 程序,该程序将找到您正在运行的 cmd 窗口的标题,并在该程序中将其最小化。 在 Win32 中,您可以使用 FindWindow 命令获取窗口句柄,然后CloseWindow 将其最小化。 像这样完全未经测试的程序:

int main(int argc, char** argv)
{
    HWND wnd = FindWindow(      
        NULL,
        argv[1]
        );
    CloseWindow(wnd);
    return 0;
} 

在cmd窗口中,您可以将标题设置为您定义的某个字符串(以避免歧义),然后将该名称传递给您的程序:

C:\>title TitleOfWindowToMiniMize

C:\>minimizeWindow TitleOfWindowToMiniMize

One thing you could do is create a windows program that will find the title of the cmd window you are running in and in that program minimize it. In Win32 you would use the FindWindow command to get a window handle, then CloseWindow to minimize it. Something like this totally untested program:

int main(int argc, char** argv)
{
    HWND wnd = FindWindow(      
        NULL,
        argv[1]
        );
    CloseWindow(wnd);
    return 0;
} 

Within the cmd window you could set the title to some string that you define (to avoid ambiguities) and then pass that name to the program to your program:

C:\>title TitleOfWindowToMiniMize

C:\>minimizeWindow TitleOfWindowToMiniMize
风流物 2024-07-24 20:08:10

你不能。 DOS 下不行。 DOS 没有 Windows 的概念。

在 Windows 中,您可以编写一个小程序来查找窗口并向其发送适当的消息,使其最小化。 同样,您也可以最大化或隐藏/显示窗口。

You can't. Not in DOS. DOS has no concepts of windows.

In Windows you could write a little program that will look up your window and send it the appropriate message causing it to minimize. The same way you could also maximize or hide/show your window.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文