We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Form as vbmodal

Hi Clay. Can you please tell me how to show/load a form in modal state.

2 Replies

CB Clay Burch Syncfusion Team June 28, 2002 08:33 AM UTC

You use the ShowDialog methon of the Form class. The online help has this code snippet showing how you can use this methods.... Dim testDialog As New Form2() ' Show testDialog as a modal dialog and determine if DialogResult = OK. If testDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK Then ' Read the contents of testDialog's TextBox. result.Text = testDialog.TextBox1.Text Else result.Text = "Cancelled" End If


VB Vipul Bhatt June 28, 2002 09:34 AM UTC

> You use the ShowDialog methon of the Form class. The online help has this code snippet showing how you can use this methods.... > > > Dim testDialog As New Form2() > > ' Show testDialog as a modal dialog and determine if DialogResult = OK. > If testDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK Then > ' Read the contents of testDialog's TextBox. > result.Text = testDialog.TextBox1.Text > Else > result.Text = "Cancelled" > End If > Yes got it. Thanx Clay.

Loader.
Live Chat Icon For mobile
Up arrow icon