隐藏视窗 [英] Hide window

查看:59
本文介绍了隐藏视窗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何隐藏一个知道他进程ID的窗口?

How can I hide a window knowing his process ID?

我正在编写一个程序,该程序使用"shell"命令打开另一个应用程序(因此,我很容易获得procID).一旦运行,我想通过按程序中的按钮来隐藏或显示它.

I am writing a program which opens another application with the "shell" command (so it's easy for me to get the procID). Once it is running I want to hide or show it when needed by pressing a button in my program...

我该怎么办?谢谢

推荐答案

 

 

这取决于您是否是程序的作者.

It depends on whether you are the author of the program or not.

如果是这样,就可以轻松实现.

If you are this can be accomplished easily.

向该程序发送消息.在该程序中,您将表单子类化.

Do a sendmessage to that program. In that program you are subclassing the form.

该程序侦听所有Windows消息.当它收到您的消息时,它会执行您的请求. Sendmessage同时具有消息类型和命令修饰符,因此您可以选择一些独特的组合.

That programs listens for all windows messages. WHen it receives a message from you it does your request. Sendmessage has both a message type and command modifiers, so it would be for you to pick some unique combinations.

子类化就像窃听[或您更喜欢非法非法窃听].您正在查看流过的每条消息,并丢弃不感兴趣的消息,这些消息占99.99999999999999%.当您正在与之交谈的进程发送唯一的消息ID(不可见/不可见)时,您只需调用不可见例程即可.

Subclassing is like evesdropping [or illegal illegal wiretaps which ever you prefer]. You're looking at every message that flows through and discarding the ones you aren't interested in which is 99.99999999999999 percent of them. When the process you are talking to sends the unique message IDs to be invisible/invisible you simply call the invisible routine.

如果您不编写程序,那么您可能永远都无法获得想要的东西.

If you didn't write the program, well you probably will never get what you want.

 

 


这篇关于隐藏视窗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆