如何在表格中更改标题行的颜色,以及如何在标题行中放置特定的按钮(框) [英] How to change the color of head line in a form, and put specific button(box) in the head line

查看:86
本文介绍了如何在表格中更改标题行的颜色,以及如何在标题行中放置特定的按钮(框)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我创建一个表单,并将其功能设置如下:

Hi All,

I create a form, and set its features as below :

Form TheForm = new Form();
TheForm.FormBorderStyle = FormBorderStyle.SizableToolWindow;
The.ControlBox = false;


这样我得到的表单具有方形外观,并且表单上没有表单框(按钮),此外,我可以绘制表单以调整其大小.

现在,我的问题如下:
1.如何更改表格标题行的颜色?
(首行是form.text所在的行)
2.如何将特定的框(按钮)放在表格的开头?

请帮帮我.

在此先感谢.


So that I get a form with an outlook of square type, and there is no form box(button) on the form, plus, I can draw the form to resize it.

Now, my question are below :
1. How can I change the color of the form head line ?
(the head line is the line which the form.text is put)
2. How can I put my specific boxes(buttons) on the head line of form ?

Please help me.

Thanks in Advance.

推荐答案

没有简单的方法:在.NET中,您无法直接访问表单的非客户区-标题就是酒吧和边界.

这里对此有一些讨论: http://social.msdn.microsoft.com/forums/zh-CN/winforms/thread/485fb4c5-8430-4cb5-8a4d-ccd7892e403b [自定义NonClient区域c#" [
There is no simple way: In .NET you have no direct access to the non-client area of the form - which is what the title bar and the borders are.

There is some disucussion on this here: http://social.msdn.microsoft.com/forums/en-US/winforms/thread/485fb4c5-8430-4cb5-8a4d-ccd7892e403b[^] - but don''t expect it to be simple to do!

Google can also help, look for "customise NonClient area c#"[^]


这篇关于如何在表格中更改标题行的颜色,以及如何在标题行中放置特定的按钮(框)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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