如何在Windows窗体应用程序中显示隐藏窗口 [英] How to show a hide window in Windows Form Application

查看:222
本文介绍了如何在Windows窗体应用程序中显示隐藏窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用快捷键在Windows窗体应用程序中显示隐藏窗口.我能够隐藏但无法显示.
建议我该怎么办.

谢谢
Prafulla

I am trying to show the hide window in windows form application using shortcut key.I am able to hide but unable to show.
suggest me how would I do.

Thanks
Prafulla

推荐答案

第一答案
我不知道我是否正确理解您,但是这里有一些链接:

http://stackoverflow.com/questions/8210095/c-sharp-show-hidden-window [^ ]
http://www.techotopia.com/index.php/Hiding_and_Showing_Forms_in_C_Sharp [ http://stackoverflow.com/questions/3351049/show-hidden-window [ ^ ]

第二答案
如何在您的表单中捕获按键:
http://stackoverflow.com/questions/3001237/how-to-catch-key-press-on-a-form-c-sharp-net [ http://www.dreamincode.net/forums/topic/61509-capture-key-pressed / [^ ]
http://www.daniweb.com/software-development/csharp/threads/29646/捕获按键 [ ^ ]
http://stackoverflow.com/questions/1298640/c-sharp-trying-to-capture-the-keydown-event-on-a-form [ ^ ]

希望这三种方法中的任何一种都能对您有所帮助...
FIRST ANSWER
I don''t know if I understood you correctly, but here are some links:

http://stackoverflow.com/questions/8210095/c-sharp-show-hidden-window[^]
http://www.techotopia.com/index.php/Hiding_and_Showing_Forms_in_C_Sharp[^]
http://stackoverflow.com/questions/3351049/show-hidden-window[^]

SECOND ANSWER
How to capture key presses in your form:
http://stackoverflow.com/questions/3001237/how-to-catch-key-press-on-a-form-c-sharp-net[^]
http://www.dreamincode.net/forums/topic/61509-capture-key-pressed/[^]
http://www.daniweb.com/software-development/csharp/threads/29646/capturing-keypresses[^]
http://stackoverflow.com/questions/1298640/c-sharp-trying-to-capture-the-keydown-event-on-a-form[^]

Hope any of those three approaches will help you...


亲爱的
浏览这些链接,您将获得代码

使用C#进行窗口隐藏 [ http://www.techotopia.com/index.php/Hiding_and_Showing_Forms_in_C_Sharp [
Dear
browse these links, you will get the code

Window Hiding with C#[^]

http://www.techotopia.com/index.php/Hiding_and_Showing_Forms_in_C_Sharp[^]


尝试以下操作:
使用
OnKeydown [
Try this:
Use OnKeydown[^] event:
private void OnKeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
     if (e.Shift && e.KeyCode == Keys.H) 
     {
         WindowState = FormWindowState.Minimized;
     }        
}


此处找到了 [ ^ ]


Found it here[^]


这篇关于如何在Windows窗体应用程序中显示隐藏窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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