如何为Windows窗体创建标题? [英] How to create a header for windows forms ?

查看:105
本文介绍了如何为Windows窗体创建标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要所有数据输入表单的标题.

含义,包含保存/更新",打印"(有时),关闭"按钮的面板
对于我的应用程序的每个数据输入位置.这样我就不需要一次又一次地创建这些按钮,而可以为这些按钮编写一个类或方法.

谢谢,提前.

I need a header for all of my Data Entry Forms.

meaning, Panel containing SAVE/UPDATE, PRINT(Sometimes), CLOSE buttons
for every data entry places of my application. So that i don''t need to create those buttons again and again and can write a class or a method for those buttons.

Thanks, in advance.

推荐答案

您好!
您所要做的就是使用这些按钮创建一个表单,并创建一个内部方法来处理这些调用,然后简单地从该基本表单中继承任何数量的表单!

如果这是您要寻找的内容,则将该线程标记为答案.
Hi there !
All you have to do is to create a form with these button and make an internal methods to handle these calls ,Then simply make any number of forms that inherts from that base form !

if this is what you are looking for then mark this thread as answer..


您所描述的正是用户控件的用途.您可以创建一个用户控件,其中包含您要重复的所有控件.对于按钮,每个按钮都应引发一个事件,以便它可以与其父窗体进行交互.您只需将此用户控件放在每个需要它的表单上,并根据需要处理表单上的事件即可.
What you are describing is exactly what User Controls are for. You can create a user control that holds all the controls you wish to repeat. For buttons, each one should raise an event so that it can interact with its parent form. You just place this user control on each of the forms that need it and handle the events on the form as they need to be.


这篇关于如何为Windows窗体创建标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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