提示询问一个问题的对话框 [英] Prompt for dialog box for asking a velue

查看:55
本文介绍了提示询问一个问题的对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我在表格上有一个按钮,点击一个按钮我想显示一个包含带有确认和取消按钮的文本框的对话框。单击确定按钮我想以第一种形式获取文本框值。

Hi friends,

I have a Button on a form , on click of a button i want to display a dialog box containing textbox with Ok and Cancel buttons. On click of OK button I want to get the textbox value in the first form.

推荐答案

到目前为止您尝试了什么?



以下是一些提示:



1.内部(或公共,如果它适合您的应用)属性。

2.代表们。您可以在对话框窗体中为按钮创建自定义单击事件处理程序,然后在父窗体中处理它。
What have you tried so far?

Here are some pointers:

1. Internal(or public if it suits your application) properties.
2. Delegates. You can create your custom click event handler for the button in dialog form and then handle that in the parent form.


将textbox的modifiers属性设置为public。这样您就可以轻松获得First表格上文本框的价值。



-MT
Set modifiers property of textbox as public. So that you can easily get the value of textbox on First form.

-MT


这篇关于提示询问一个问题的对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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