vb.net 如何创建一个用户可以输入文本的可视化基本对话框
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21854102/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to create a visual basic dialog box that users can input text
提问by Harry Jones
I have a program that lets users create very basic images with a picture and a greeting. I want the user to be able to select the text.
我有一个程序,可以让用户创建带有图片和问候语的非常基本的图像。我希望用户能够选择文本。
Public Sub setText(ByVal aMessage As String)
fmessage.Text = aMessage
This is the method i want to invoke. How do I create a dialog box that lets users input what they want so that fmessage
holds that value?
这是我要调用的方法。如何创建一个对话框,让用户输入他们想要的内容,以便fmessage
保存该值?
回答by TylerDurden
You want an InputBox
I think
你想要一个InputBox
我认为
http://msdn.microsoft.com/en-us/library/6z0ak68w(v=vs.90).aspx
http://msdn.microsoft.com/en-us/library/6z0ak68w(v=vs.90).aspx
dim myValue as String = InputBox("Enter Value", "Enter Value", "Please Enter Value")