当前位置:编程学习 > C#/ASP.NET >>

一个很简单的问题InputBox()这函数怎么用哈

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 WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            
        }
      
        private void Form1_Load(object sender, EventArgs e)
        {
            textBox1.Text = Interaction.InputBox.show("输入对话框", "参数", "100", -1, -1);
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            
        }
    }
}
错误 1 “Microsoft.VisualBasic.Interaction.InputBox(string, string, string, int, int)”是一个“方法”,这在给定的上下文中无效 C:\Users\晓洁forever\Desktop\WindowsFormsApplication1\Form1.cs 23 41 WindowsFormsApplication1
这是怎么回事!!!!!!!!! --------------------编程问答-------------------- textBox1.Text = Interaction.InputBox("输入对话框", "参数", "100", -1, -1);
--------------------编程问答-------------------- 把.show去掉 --------------------编程问答-------------------- 谢谢了LZ的 我是新手刚接触C#,我还有个问题这为什么有的XXBox要加.show有的就不加呢? 
比如说 MessageBox.show()而InputBox不要加呢?? --------------------编程问答-------------------- 因为 InputBox 是从 VB 演变过来的。
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,