InputBox in Csharp

Posted by Ddd under C# category on | Points: 40 | Views : 3280
//InputBox in csharp
//add a reference to Microsoft.VisualBasic.dll
//InputBox is a method defined in the Interaction class of Microsoft.VisualBasic namespace

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;
//add this namespace.
using Microsoft.VisualBasic;
namespace WindowsFormsApplication1
public partial class Form7 : Form
public Form7()

private void Form7_Load(object sender, EventArgs e)
string s = Interaction.InputBox("please enter the string", "enter", "", 50, 50);


Comments or Responses

Login to post response