[Gambas-user] Cancel the closing of a WebForm

Bruce Steers bsteers4 at gmail.com
Tue Dec 1 15:35:01 CET 2020


You need to use the name of the object not the object type.
Try this..

Public Sub WebForm2_Close()
:)

On Tue, 1 Dec 2020 at 08:31, Mayost Sharon <sharon at 455.co.il> wrote:

> On Mon, 30 Nov 2020 21:27:40 +0100, Benoît Minisini wrote
> > Le 30/11/2020 à 21:20, Mayost Sharon a écrit :
> > > Hello
> > >
> > > How to prevent a window WebForm2 closing by clicking the X on the left
> side of the WebForm2
> > >
> > >
> > > In WebForm1 When I press a button I display WebForm2 as follows
> > >
> > > Export
> > >
> > >
> > > Public Sub WebButton1_Click()
> > >
> > >      Webform2.ShowModal(Webform1)
> > >
> > > End
> > >
> > >
> > > How to cancel close WebForm2 by the X on the side
> > >
> > > Thanks
> > >
> >
> > You have to cancel the Close event with STOP EVENT.
> >
> > Regards,
> >
> > --
> > Benoît Minisini
> >
> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
>
>  I tried, inside WebForm2 at the event Close
>
> Public Sub WebForm_Close()
>
>   Stop Event
>
> End
>
>
> It does not work, still the WebForm2 closes when I press the X button
>
> Thanks
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201201/55cd1b25/attachment-0001.htm>


More information about the User mailing list