开发者

VB.NET Disable Parent Window on Show

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜