Yes, but I mean is a messagebox with some text boxes. . .
so for example 3 text boxes in which inside the text boxes we can put some value and then use the value
The standard MessageBox doesn't have a facility for the user to enter text though VB's InputBox, referred to below by Glen, does contain a single textbox. If you want more than this, then it's not difficult to design your own form which you can pop up (using ShowDialog) in place of the MessageBox. There are also quite a few custom MessageBoxes around if you search on sites such as Code Project.
You Mean like an Input box in VB6 (poss VB.Net never needed it). You can get the VB input box with
using System.Runtime.InteropServices;
// Text for box Title Initalvalue X, Y StrUserName = Microsoft.VisualBasic.Interaction.InputBox("Enter Name", "Test Rig", "", 200, 150);
StrUserName is a String, you can use all sorts ints, floats. I have always found using seperate input boxes is better or easier, problem is if you need them to edit them may be a form could be used.... Glenn
2 answers
Yeah sure it is.
What you want is to use something like
MessageBox.Show("some text", "text for the blue ribbon on top", MessageBoxButtons.okcancel);
messageboxbuttons.okcancel isn't the only one there, just type in the . after messageboxbuttons and pick one that intellisense will suggest.
Hope that helps!
answered one year ago by:
40
301
Yes, but I mean is a messagebox with some text boxes. . . so for example 3 text boxes in which inside the text boxes we can put some value and then use the value
17279
The standard MessageBox doesn't have a facility for the user to enter text though VB's InputBox, referred to below by Glen, does contain a single textbox. If you want more than this, then it's not difficult to design your own form which you can pop up (using ShowDialog) in place of the MessageBox. There are also quite a few custom MessageBoxes around if you search on sites such as Code Project.
You Mean like an Input box in VB6 (poss VB.Net never needed it). You can get the VB input box with
using System.Runtime.InteropServices;
// Text for box Title Initalvalue X, Y
StrUserName = Microsoft.VisualBasic.Interaction.InputBox("Enter Name", "Test Rig", "", 200, 150);
StrUserName is a String, you can use all sorts ints, floats. I have always found using seperate input boxes is better or easier, problem is if you need them to edit them may be a form could be used....
Glenn
answered one year ago by:
329