[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pnet-developers] Showing a form on Mac OS X
From: |
Rhys Weatherley |
Subject: |
Re: [Pnet-developers] Showing a form on Mac OS X |
Date: |
Thu, 27 Nov 2003 05:46:42 +1000 |
User-agent: |
KMail/1.4.3 |
On Thursday 27 November 2003 01:03 am, Jason King wrote:
> Hello,
>
> Can anyone tell me how to get some modal functionality out of
> System.Windows.Forms and XSharp on Mac OS X? I can only seem to get a form
> displayed if I used Application.Run(myForm), and if I make repeated calls
> to Application.Run(myForm), all subsequent calls seem to create the form
> then destroy it immediately.
"Application.Run" is just a handy shortcut to set a form's "Visible" property
to "true" and then enter the main event loop. Subsequent forms are displayed
by setting "Visible" to "true", since you are already in the main event loop.
Doing this will give you something akin to a modeless dialog box.
> I notice the MessageBox class is defined, but ShowDialog is not yet
> implemented in System.Windows.Forms.
"Form.ShowDialog" is implemented in CVS, and it will wait until the form is
closed or DialogResult is set before returning. I still need to implement
some of the visual aspects of modality (reduced borders, bound to an owner
window, etc), but the basic event stuff is already in place.
Cheers,
Rhys.