|
-
Jan 29th, 2008, 08:08 AM
#1
Thread Starter
Fanatic Member
return string from dialog box
I know this is silly but I can't figure out how to do this in a tidy fashion.
If the dialog result is OK then I want to get a string from my dialogbox.
Any ideas
TIA
-
Jan 29th, 2008, 08:10 AM
#2
Re: return string from dialog box
I would create a public property within the form itself. Then you can access the value through the property.
So (Pseudo code since I don't have VS in front of me)
If (MyDialog.ShowDialog() = DialogResult.OK) Then
MessageBox.Show(MyDialog.TextProperty)
End If
-
Jan 29th, 2008, 08:17 AM
#3
Re: return string from dialog box
How do you normally get a string from an object? You get a property value or call a method and get the return value. So... how do you get a string from your form, bearing in mind that a form is an object?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|