|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Hiding dialog causes ShowDialog to returnHi there,
I was wondering if there was any way to stop the hiding of a dialog from returning from the ShowDialog function? i.e. If you create your own dialog and put some code in that hides it temporarily during it's use, the ShowDialog function will return the second it is hidden, this is the same for ".Hide()" as well as sending ShowWindow(...SW_HIDE). Many thanks in advance! Nick. Hiding a dialog you have shown with ShowDialog obviously causes it to return
because ShowDialog is Modal (modal dialog is one which blocks input to all other toplevel windows). What you want to do is "Show" the dialog, but to hold a reference to it in your form class, otherwise it will dissapear when it gets disposed (on exit from the method which created it). Hi there,
Yes I understand why it does it, but technically the form has not been closed. As a temporary "fix" I have moved the form offscreen while the user finishes the operation. I was hoping I could have got around it without blocking the calling thread manually but I guess I can't. Many thanks for your advice. Nick. Show quoteHide quote "Robinson" <toomuchspamhaspassed@myinboxtoomuchtoooften.com> wrote in message news:ekmdci$65v$1$8300dec7@news.demon.co.uk... > Hiding a dialog you have shown with ShowDialog obviously causes it to > return because ShowDialog is Modal (modal dialog is one which blocks input > to all other toplevel windows). What you want to do is "Show" the dialog, > but to hold a reference to it in your form class, otherwise it will > dissapear when it gets disposed (on exit from the method which created > it). > > >
VB vs. C# language challenge question
Full Screen connect vb app to sql 2005 express Dropping folder on desk top icon Best way to communicate from Desktop to SQL DB Re: Is VB.NET Stable?? Create Property on the fly edit text in file using streamreader and string.replace Can't Figure Out why this array is out of bounds now! Delete Selected Lines from Text File |
|||||||||||||||||||||||