C#输入框InputBox问题
生活随笔
收集整理的這篇文章主要介紹了
C#输入框InputBox问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
C#里面沒有像VB一樣的InputBox,但是像InputBox一樣的控件在程序中很實用,這里有兩種方法實現(xiàn):
一、調用VB里的InputBox
首先添加引用Microsoft.VisualBasic,然后在命名空間中引用(using Microsoft.VisualBasic;)。
舉個實例:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Microsoft.VisualBasic;namespace 輸入框 {public partial class Form1 : Form{public Form1(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){string s = Interaction總結
以上是生活随笔為你收集整理的C#输入框InputBox问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ENVI扩展工具:利用波段运算修改NaN
- 下一篇: ArcGIS Engine开发模板及C#