您当前的位置: 首页 >  c#

C#输入框InputBox问题

刘一哥GIS 发布时间:2015-03-11 23:44:02 ,浏览量:5

    C#里面没有像VB一样的InputBox,但是像InputBox一样的控件在程序中很实用,这里有两种方法实现:

一、调用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
关注
打赏
1688896170
查看更多评论

刘一哥GIS

暂无认证

  • 5浏览

    0关注

    854博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0475s