在C#应用程序中添加“客户信息"对话框 [英] add a Customer Information dialog box in C# Application

查看:69
本文介绍了在C#应用程序中添加“客户信息"对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在C#应用程序中添加客户信息对话框.

how to add a Customer Information dialog box in C# Application.

推荐答案

第一部分:创建对话框.
1)在解决方案资源管理器中右键单击您的项目.
2)选择添加",然后选择新建Windows窗体".
3)出现对话框时,将名称更改为"CustomerInfoDialog.cs",然后按添加"
4)将控件和代码添加到对话框中.

第二部分:显示对话框:
1)在要弹出对话框的方法中,添加代码:
Part one: Create the dialog.
1) Right click your project in the Solution explorer.
2) Select "Add" then "New Windows Form".
3) When the dialog appears, change the name to "CustomerInfoDialog.cs" and press "Add"
4) Add your controls and code to your dialog.

Part two: Display the dialog:
1) In the method where you want to bring up the dialog, add the code:
CustomerInfoDialog cid = new CustomerInfoDialog();
if (cid.ShowDialog() == DialogResult.OK)
   {
   ...
   }


您可能想在对话框中添加信息,或者在显示后从对话框中获取信息-由于我不知道您要如何使用它,因此我在这里无法为您提供帮助!


You may want to add info to your dialog, or take info from your dialog after display - I can''t help you there since I don''t know what you are trying to do with it!


这篇关于在C#应用程序中添加“客户信息"对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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