类似于C#中的Windows任务栏 [英] Something like windows taskbar in c#

查看:190
本文介绍了类似于C#中的Windows任务栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好
我想模拟c#中的Windows任务栏.
我想在表单的底部放置一个条(我是指主表单).当我打开新表单时,将表单名称放置在酒吧上,当我打开另一个新表单时,将新表单名称放置在酒吧上,然后...
另一方面,当我单击栏上的表单名称时,相关的表单将处于活动状态.
我该怎么办?
谢谢

Hello
I want to simulate something like windows task bar in c#.
I want a bar on bottom of a form (i mean mainform) .when i open new form,the form name place on bar and when i open another new form,the new form name place on bar and ...
In other hand ,when i click on the form name on bar,that related form be active.
What can i do?
Thank you

推荐答案

MDI父级将提供几乎类似的功能.您可以看一下.

尽管如果您在应用程序中寻找真实"任务栏,则需要捕获控件框的单击,并将窗口最小化到任务栏.我相信这将需要捕获Windows消息.当我们单击窗口上的最小化按钮并使用WndProc捕获它时,请查看发送了什么消息.

最大化应该很容易.只需获取点击坐标,然后调整大小并调整点击窗口的焦点即可.
An MDI parent would provide almost a similar functionality. You can have a look at it.

Although if you are looking for a "real" taskbar in your application, you would need to trap the controlbox click and minimize the window into your taskbar. I believe it would need trapping windows messages. Check out what message is sent when we click on the minimize button on a window and trap it using WndProc.

Maximizing should be easy. Just get the click coordinates and resize and focus the clicked window.


这篇关于类似于C#中的Windows任务栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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