Hi people, I have certain problem with positioning InputBox forum in Visual Basic. I would like to position this form in right-bottom corner of my screen, but I cannot achive this. I would like to do this dinamicly, so it fit by itself whatever screen resolution or size client has. The code I am using is quite simple: Public Sub inputNumber() Dim Number As Double On Error GoTo ErrorHandler Number = InputBox("Please insert Number", "NA", "", 0, 0) Select Case Number Case Is > 0 MsgBox "Number is bigger then 0" Case Is < 0 MsgBox "Number is smaller then 0" Case Else MsgBox "Number = 0" End Select ErrorHandler: MsgBox "You have not provided number" End Sub Code (markup): Now, the Input Box form is positioned at the left-top corner. Can anyone help me with this problem? Thanks in advance
You need to create your own form (probably border-less) with a text box and label and show it with SHOW_ON_TOP. In this way you have full control over the form. (For example you can verify the input from the user itself.) No need to waste time on trying to position less featured input box. How do you think?
try this Public Sub inputNumber() Dim Number As Double On Error GoTo ErrorHandler Number = InputBox("Please insert Number", "NA", "", Screen.Width - 6000, Screen.Height - 3000) Select Case Number Case Is > 0 MsgBox "Number is bigger then 0" Case Is < 0 MsgBox "Number is smaller then 0" Case Else MsgBox "Number = 0" End Select ErrorHandler: MsgBox "You have not provided number" End Sub Code (markup): or visit below url.... http://www.vbforums.com/showthread.php?p=3738670