VB.NET Inputbox - How to identify when the Cancel Button is pressed?

Posted by The Sasquatch on Stack Overflow See other posts from Stack Overflow or by The Sasquatch
Published on 2010-05-27T18:23:06Z Indexed on 2010/05/27 21:11 UTC
Read the original article Hit count: 169

Filed under:

I have a simple windows application that pops up an input box for users to enter in a date to do searches.

How do I identify if the user clicked on the Cancel button, or merely pressed OK without entering any data as both appear to return the same value?

I have found some examples of handling this in VB 6 but none of them really function in the .NET world.

Ideally I would like to know how to handle the empty OK and the Cancel seperately, but I would be totally ok with just a good way to handle the cancel.

© Stack Overflow or respective owner

Related posts about vb.net