I have one main form and another which I have to popup in the following code:
private voi开发者_开发问答d barButtonItemEditCopy_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
PopupForm pop = new PopupForm();
pop.Show();
}
and I want when event itemclick happens to lock current form afret pop.Show()
and after closing pop form to continue with the main one. Now when I hit itemclick event the whole function pass and after that I see the popupform and my main form from which I popup is still available.
Assuming PopupForm is a (System.Windows.Forms.Form
) winform. pop.ShowDialog()
would show a modal dialog, and lockup other form till this modal dialog is closed. check here
Try replacing pop.Show();
with pop.ShowModal();
This will lock your original form for any input before you have closed the modal form.
精彩评论