[Gambas-user] how to know when a form runnig was invoked from another or not?

Gianluigi bagonergi at ...626...
Thu Mar 16 11:56:24 CET 2017


And do such a thing?

Regards
Gianluigi

2017-03-16 4:32 GMT+01:00 adamnt42 at ...626... <adamnt42 at ...626...>:

> On Wed, 15 Mar 2017 17:32:08 -0400
> PICCORO McKAY Lenz <mckaygerhard at ...626...> wrote:
>
> > how to know when a form runnig was invoked from another or not?
> >
> > i mean:
> >
> > case1:
> >
> > form1 have a click and inside invoke form2.show()
> >
> > case2:
> >
> > only form2 are lauch
> >
> > now in form2 i have a button with a event Click:
> >
> > if are invoked from form1 i need to show anagin form1 and close form2
> > if not, onlt close form2 and terminate program
> >
> > i' was lookin for ojbect management on gambas wiki and only found Me;;
> > Last;; and Me.Parent but none of them helpme...
> >
> > Lenz McKAY Gerardo (PICCORO)
> > http://qgqlochekone.blogspot.com
> > ------------------------------------------------------------
> ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> Surely this is as simple as using Run() instead of show in the "parent"
> form? Set a flag in the Run method to indicate that the "child" was invoked
> from the "parent" and react accordingly.
> e.g.
> CHILD FORM
> Public Sub Run()
>   $bIamBambino=true
>   Me.show() ' or  ShowModal or whatever...
> End
>
> Public Form_Close()
>   If $bIamBambino then
>     ' do whatever
>   Else
>    ' close the application
>   EndIF
>
> PARENT FORM
>   Public Sub SomeButton_Click()
>     Dim fBambono as New FWhatever
>     fBambino.Run()
>   End
>
> ????
>
> bb
>
> --
> B Bruen <adamnt42 at ...3379... (sort of)>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FatherForm-0.0.1.tar.gz
Type: application/x-gzip
Size: 11546 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20170316/ff05513f/attachment.bin>


More information about the User mailing list