Blogroll

LightBlog
Responsive Ads Here

12.13.2013

Promt Textbox C#

public void ShowMyDialogBox()
{
   Form2 testDialog = new Form2();

   // Show testDialog as a modal dialog and determine if DialogResult = OK. 
   if (testDialog.ShowDialog(this) == DialogResult.OK)
   {
      // Read the contents of testDialog's TextBox. 
      this.txtResult.Text = testDialog.TextBox1.Text;
   }
   else
   {
      this.txtResult.Text = "Cancelled";
   }
   testDialog.Dispose();
} 
atau dengan add references VB (Microsoft.VisualBasic), dengan contoh penggunaan adalah :
Microsoft.VisualBasic.Interaction.InputBox("jumlah", "stok", "0", -1, -1); 





1 komentar: