How can I disable the parent form when I call a child form?
This code doesn't disable the parent form like I thought it would:
frmChi开发者_如何学JAVAld.ShowDialog()
You can use
frmChild.ShowDialog(Me)
Me - is a parent form
By disable, do you mean just prevent the user from clicking anything in the parent form? If so, then .ShowDialog
is the way to do it - it makes the called form Modal, so that it controls the application's focus until it's closed.
If you're looking to fade the parent window out or do something else to make it obvious that it can't be clicked in, that's more complicated.
Can you elaborate with some detail about what's happening that's not what you expect?
精彩评论