Home About Contact Privacy Terms Disclaimer
TECHAntena
Last Updated On: January 28, 2017
Editor: Adeeb C

VB.Net Input Box with Example

Category: Programing,VB.NET
Tags

The VB.Net input box is a dialog box where the user can insert the values. The Input Box contains OK and cancel buttons, an optional title, and input field.

The value inputs to the box of entry can be assigned to a variable.

You may use the input box as shown below.

 Dim a As Integer = InputBox("Enter the value")

The above code will show the input box as shown below.

VB.Net Input Box

Example Program

Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim a As Integer = InputBox("Enter the Radius")
Label2.Text = 2 * 3.14 * a
End Sub
End Class