[Mono-winforms-list] disappearing forms

Stifu stifu at free.fr
Fri Apr 24 09:46:03 EDT 2009


Please file a bug about this (http://mono-project.com/Bugs).
If no one beats me to it, I'll confirm later whether this also happens on
Linux.


noda wrote:
> 
> Hello, I've a very annoying problem with Mono 2.4 that is easy to
> reproduce:
> 
> - When updating an object in the form (a textBox for example) using a
> listener or when catching special events like form closing, the form
> sometimes completely disappear from screen (but is still present in the
> taskbar). Refreshing, Updating or Showing it has does not make it visible
> after that. Clicking 1 time in the taskbar icon to minimize it then again
> to restore it makes it visible again, but it's really annoying!
> 
> I've remarked that this occurs when another form is present in the screen,
> and not when the form is alone (see simple example below):
> 
> - I create a new Form in VS c# express 2008 (empty, I add nothing to it)
> - I bind a function on the FormClosing event:
> 
>        private void Form1_FormClosing(object sender, FormClosingEventArgs
> e)
>         {
>             if (MessageBox.Show("quit?", "quit",
> MessageBoxButtons.OKCancel) == DialogResult.Cancel)
>             {
>                 e.Cancel = true;   // cancel closing the window
>             }
>         }
> 
> This code makes the form disappear sometimes when closing it and clicking
> "cancel".
> But this one never makes it disappear:
> 
>        private void Form1_FormClosing(object sender, FormClosingEventArgs
> e)
>         {
>                 e.Cancel = true;   // cancel closing the window
>         }
> 
> 
> I also experienced this problem as said earlier when updating the textbox
> of a form in a listener (TraceListener, that was my log window).
> 
> Is there a way to avoid this problem? I found no information on this issue
> and it's strange as it's really easy to reproduce but maybe it only occurs
> on windows? (only tested mono 2.4 on windows).
> 
> This problem is not present in MS.Net
> 
> 
> Thanks for your help!
> 
> Yohan
> 
> EDIT: I've made some further tests, and in fact when the Forms disappears,
> it's always after MessageBox dialogs have been displayed (with
> MessageBox.Show()). After removing the MessageBox, the windows never
> disappear, so the problem is surely related to the MessageBox or the way
> it behaves.
> 

-- 
View this message in context: http://www.nabble.com/disappearing-forms-tp23211895p23216781.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.



More information about the Mono-winforms-list mailing list