On Fri, 28 Apr 2006 16:56:19 +0700
"Agro Rachmatullah" <[EMAIL PROTECTED]> wrote:

> I tried searching Monodoc for a Window property to detect maximization
> state (Maximized, IsMaximized, etc) but didn't find any. Is there a
> way to do it?

Hi,
try this:

First of all define you own event handler for WindowStateEvent:
...
mainWindow.WindowStateEvent+=stateChanged;
...

then write your code (the following handle the minimize state):

...

        private void stateChanged (object sender, WindowStateEventArgs a){
                Gdk.EventWindowState ews = a.Event;
                WindowState newWs = ews.NewWindowState;
                if(newWs == WindowState.Iconified) {
                        SysTrayIcon.mainWinOnScreen = false;
                        mainWindow.Visible = false;
                }
        }
...

View the WindowState members for all the Widget status !

Bye

-- 

Salvatore ---------------------<|
LAAS --------------------------<|
http://laas.altervista.org ----<|
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to