More text boxes in one inputbox? - vb.net

I was wondering if there's a way to use more text boxes in a single inputbox?
So for example, I call an inputbox when a button is pressed and I want it to say something like this:
-Name: (textbox)
-Adress: (textbox)
Ok
Cancel
Where both strings can be read. Is it possible?
Thanks in advance.

No, this is not possible.
You can create a custom form for this task. To allow a non-blocking use, you could use a callback delegate or an event that is raised whenever the user closes the form.

As Nico said, not possible without creating a custom form (easy enough to do). Or you could just call input box twice.

Related

Capital Only Edit Control

Having a bit of a problem doing this and not sure of it can be done. I have an edit control that a user types into, I would like for the input to be all in capital letters. I tried having a custom action on the edit control to get the property, convert to capital letters and set the property again each time a letter is set but it does not work. I guessed it wouldn't but no harm in trying..:)
Has anyone else solved this? I would like to do it without having a button to press if possible. The dialog in question is a twin dialog if that helps at all.
Thanks for your help
It's not possible using the native built-in Windows Installer UI. The underlying MaskedEdit Control is primitive. There are no events to tie into to validate and modify as the characters are entered. You can only ToUpper() the property when the user clicks Back or Next.
The alternative would be to go with an external UI handler which is a lot of learning and work.

VB.NET Recreating the console.readline function in a form application

I am building a text based game, and thought of using a form instead of a console as i usually do.
So i started rebuilding a console - i created 2 text boxes, one as output and one as input.
I got the following problem while doing this:
In a console application you can use console.readline() in line.
E.g.: Dim str as String = console.readline()
now i need this effect in the form application, where i wait for the user pressing enter in the input box and getting the text he wrote.
E.g.: I ask for the character name and the user has to type it in the input box, now i need the name he typed in some way.
EDIT:
i guess i will need some way to wait for a event to raise without blocking the ui thread.
I appreciate any help solving this, Mylo.
To use the form as a console, you need to have your readLine method to wait for the event of the user hitting enter in the TextBox control, to do it without blocking the UI thread you need to use multithreading (hard) or tasks (difficult, easy with async programming), it's not an easy feat, so i think is better to use an old thrustworthy System.Console for this job.
However if you want to give it a try, there are some third party controls that may do it, like this one: http://www.codeproject.com/Articles/9621/ShellControl-A-console-emulation-control, there are others in Code Project so you may want to dig deep there and find one that you like.
Edit
This is a small async loop, note that i use also await.
do
await Task.Delay(100)
loop while (ReadingLine)
I think you're greatly overthinking this, my friend. The textbox is called TextBox1, on default.
So, to capture the data inside the text box, you say:
Dim someIdentifier As String = TextBox1.Text
And now you've captured the data in a variable, just like when you would capture it using
Console.ReadLine()

How to use Mouseout Function in VBA with a condition Check?

Hi I have a VBA application with a combobox selection option.One of the combobox option is Other which when user select that option an invisibled label will pops up and prompt the user to fill the txtOther control.now my question is how I can get rid of the prompted label and make it to invisible after user fill the txtOther and move(focused)in other control?
here is a shot of my app:
Thanks for your time and help
It depends on how often or when you want the check to be done. I couldn't find a good reference to show you all of this, but you can view your VBE.
Within the code behind your userform you can use events for the text box.
If you want the check done every time you leave the text box:
Use the TextBox_Exit event.
If you want it to fire whenever the contents are changed, used TextBox_Change. There's lots of options, but based on your explanation I'd probably use Exit.
This answer shows some syntax examples for using the Textbox_Exit event.

Is it possible to have an extension library dialog box within a repeat control?

I'm running with an 8.5.3 UP1 server and I have a need to have many dialog boxes (for confirmation purposes) for a whole bunch of "action buttons" on an xpage. The code for these dialog boxes is almost exactly the same with the exception of the confirmation message being different and the client-side JS function they are calling if the Yes button is selected.
Since I really hate repeating code over and over, I was wondering if it is at all possible to put a xe:dialog control within a repeat control and specify the message and function call from an array of values? I know I can't compute the ID of the dialog control and without that I'm not sure how I would reference the dialog to open and close it.
Any ideas? Thanks
Yes, this is possible.
Make sure that you specify that the dialog box's property for keepComponents is set to False. You don;t have to do anything special for opening or closing the dialog box, just use whatever ID you give the dialog box in you client-side action to open the dialog box in the repeat such as XSP.openDialog('#{id:myDialog}')
The XPages renderer will automatically calculate the correct ID names for you.

Hide main form initially...Possible? (VB language)

Is there a way to start a Windows Forms in (VB language) application with the main window not visible? Then later on when an external event occurs, I want to display the form.
How can I accomplish this?
Thanks.
Hint: See the 'Visible' property.
Initially you just put:
Load SuperAmazingForm
..then when you want to display the form, simply call its Show method as normal.
Doing it this way allows you to interact with the form's objects without the user being aware of it.
It depends on if you are doing this in Excel/Word or Access. If you are using Excel/Word then the Load MyForm syntax works. However, Access uses it's own variation of the standard UserForm. To load a form hidden you can do:DoCmd.OpenForm "MyAccessForm", WindowMode:=acHidden.