InputBox
Author: usrausra
Creation Date: 8/3/2017 7:18 PM
profile picture

usrausra

#1
In trying Inputbox, I checked the box associated with Microsoft JScript in the .NET framework under .NET References (Editor tab), but the code does not compile. Any comment?
profile picture

Eugene

#2
No wonder it doesn't compile. "Microsoft JScript" doesn't have to do with Inputbox() - add a reference to Microsoft.VisualBasic instead. The correct name of this function is InputBox (in C# case matters) and it resides in Microsoft.VisualBasic namespace. Code below shows how to use it but read on:

CODE:
Please log in to see this code.


However, I'd recommend installing Community Components, restarting WLP, and simply using Input. This wrapper method is an easier alternative that doesn't require adding a reference. And thanks to extension methods, even a "using Community.Components;" isn't required. Check it out:

Wealth-Lab Wiki > Input
profile picture

usrausra

#3
Eugene:
Thank you for your detailed instructions. Without your answer, I would not know the power and convenient of the Community Component.
profile picture

Eugene

#4
You're welcome.
profile picture

usrausra

#5
By the way, the 4th line under Parameter Description of Wealth-Lab Wiki > Input should be
(optional) VPos Distance in pixels of the upper edge of the dialog box from the top of the screen.
profile picture

Eugene

#6
Thanks for the heads-up. Fixed.