DialogResult

A

Angel Soft

sorry, I have a stupid question
I open a form with ShowDialog because I need a value from this form.
how do I set the result value of this "dialog" form?
DialogResult property do not accept any value.

Tx

Nick
 
H

Herfried K. Wagner [MVP]

Angel Soft said:
I open a form with ShowDialog because I need a value
from this form.
how do I set the result value of this "dialog" form?
DialogResult property do not accept any value.

Add an additional property to the form that holds the return "value".
Inside your form you set the property and check the property when
'ShowDialog' returns.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top