cancel
Showing results for 
Search instead for 
Did you mean: 

Create TextBox Pop up in Code Section using VB

NoePichot
Level 2
Hi,  i recently create a simple code in VB for launch a MessageBox (pop up) just by adding :  Dim Buttons As MessageBoxButtons = MessageBoxButtons.Ok MessageBox.Show(input,caption,Buttons)   I know that i have to declare method, global variable... in the GLOBAL CODE SECTION I want to create a TEXTBOX, (a pop up with a text field within).   I truly need help !!! Best regards,    Noé P  
2 REPLIES 2

John__Carter
Staff
Staff
Noé - you need to do some research on .Net development, there are thousands of examples out there. But remember BP is not an IDE, and you'll soon get frustrated trying to develop custom code in BP. It's far easier to get things working in something like Visual Studio and then paste into BP.

Hitesh__Mhatre
Level 4
Hi, Add System.Windows.Forms.dll referance and take one code stage where Message and Title should be input text and Result should be Output text and use below code:     Result="""" Dim Form as new System.Windows.Forms.Form Form.Text = Title Form.Size = New System.Drawing.Size(500,150)   Form.FormBorderStyle =System.Windows.Forms.FormBorderStyle.FixedDialog Form.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Dim ConfigLabel as new System.Windows.Forms.Label ConfigLabel.Text = Message ConfigLabel.Location = New System.Drawing.Point(50,20) ConfigLabel.Width=350 Form.Controls.Add(ConfigLabel) Dim TextInput as new System.Windows.Forms.TextBox TextInput.Text = """" TextInput.Location = New System.Drawing.Point(50,50) TextInput.Width=400 Form.Controls.Add(TextInput) dim OKButton as new System.Windows.Forms.Button OKButton.Location = New System.Drawing.Point(350,70) OKButton.Width = 100 OKButton.Text = ""OK"" OKButton.DialogResult = System.Windows.Forms.DialogResult.OK Form.AcceptButton = OKButton Form.Controls.Add(OKButton) Dim ButtonResult As System.Windows.Forms.DialogResult ButtonResult=Form.ShowDialog() If ButtonResult=1 Then     Result=TextInput.Text else     Result="""" end if