Retrieving the InputBox width and height

  • Thread starter Thread starter jcrouse
  • Start date Start date
J

jcrouse

Is it possible to retrieve the width and height of an InputBox so I can
mathmatically center it in the current form if the form is not centerscreen?
If so, what are the properties or how is it accomplished? I guess I could
create my own form but would like to not have to.

Thank you,
John
 
* "jcrouse said:
Is it possible to retrieve the width and height of an InputBox so I can
mathmatically center it in the current form if the form is not centerscreen?
If so, what are the properties or how is it accomplished? I guess I could
create my own form but would like to not have to.

That's AFAIK not possible. And even if it was possible, I would write
my replacement if it should be deployed. Currently, there is no way to
check if the user pressed "Cancel" or simply entered no text and pressed
"OK". In localized versions of the .NET Framework, the localized text
for "Cancel" (in German "Abbrechen") doesn't fit on the button and the
button looks horrible.
 
That's AFAIK not possible. And even if it was possible, I would write
my replacement if it should be deployed. Currently, there is no way to
check if the user pressed "Cancel" or simply entered no text and pressed
"OK". In localized versions of the .NET Framework, the localized text
for "Cancel" (in German "Abbrechen") doesn't fit on the button and the
button looks horrible.

To sum up what Herfried said, and what I've said for years: InputBox()
SUCKS! It sucks as bad in .NET as it has in all previous versions of VB. You
shouldn't use it for anything more than quick-and-dirty testing.
 
Jeff,

* "Jeff Johnson said:
To sum up what Herfried said, and what I've said for years: InputBox()
SUCKS! It sucks as bad in .NET as it has in all previous versions of VB. You
shouldn't use it for anything more than quick-and-dirty testing.

Full ACK. In .NET 2.0 InputBox provides improved functionality! It's
possible to determine if the user pressed "Cancel" by checking the
return value ('Nothing' -> user pressed "Cancel").
 
Full ACK. In .NET 2.0 InputBox provides improved functionality! It's
possible to determine if the user pressed "Cancel" by checking the
return value ('Nothing' -> user pressed "Cancel").

Gee, I'm thrilled the VB team expended energy on that.... I'll have to smack
someone around at the next summit.
 
Back
Top