>I placed a code in the deactivate method of a form
>
>if thisform.windowstate=1
> =minimize to tray
>endif
>
>this works when you run the form but when i compile it to an exe it doesn't. Any workaround?
>
>Thanks
Try _screen.windowstate instead of thisform.windowstate - might work.