Get Values From Dialog Vb Net

[Solved] Get Values From Dialog Vb Net | Vb - Code Explorer | yomemimo.com
Question : get values from dialog vb.net

Answered by : dead-dolphin-jj1hq5vy09cg

Private Sub ShowOptionsForm() Dim options = New frmOptions ' Did the user click Save? If options.ShowDialog() = Windows.Forms.DialogResult.OK Then ' Yes, so grab the values you want from the dialog here Dim textBoxValue As String = options.txtMyTextValue.Text End If
End Sub
'Now inside of your dialog form, you need to set the result Windows.Forms.DialogResult.OK
'when the user clicks the button that corresponds to the OK action of the dialog form, like this:
Public Class frmOptions Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click ' Set the result to pass back to the form that called this dialog Me.DialogResult = Windows.Forms.DialogResult.OK End Sub
End Class

Source : https://stackoverflow.com/questions/20551203/how-to-get-values-from-a-dialog-form-in-vb-net | Last Update : Wed, 06 Jul 22

Answers related to get values from dialog vb net

Code Explorer Popular Question For Vb