Is there a way tha a form returns a value? something like …
sub main()
Dim task as new TaskForm()
dim res as integer=0
res = task.opendialog()
end sub
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you use
ShowDialog, you can set the form’sDialogResultproperty to a value. Keep in mind that the form can’t return arbitrary results this way, only the values of theDialogResultenumeration.Otherwise, you’d have to set the form’s
TagProperty and manually retrieve it after the form is closed, but before you discard the reference to it.