[Gambas-user] Disable closing window with X?

Laurent Carlier lordheavym at ...626...
Wed Sep 10 17:00:07 CEST 2008


Le mercredi 10 septembre 2008 15:05:17 Ron, vous avez écrit :
> Hi,
>
> is there a way to disable closing a window by using the X in the titlebar?
> or removing the X?
>
> If i use:
> PUBLIC SUB Form_Close()
>
>   STOP EVENT
>
> END
>
> ME.close is also disable ofcourse.
>
> I need it for a login window, I only want to accept closing via a
> buttonpress after some checks...
> Hmm I can add some logic I guess, and only do a stop event when user is
> not auth.
>
> Regards,
> Ron_2nd
>

PRIVATE UserNotAuth AS BOOLEAN

PUBLIC SUB Form_Close()

   if NOT UserNotAuth THEN STOP EVENT

END


Regards,





More information about the User mailing list