[Gambas-user] pass parameters to another form invoke where?

Tobias Boege taboege at ...626...
Fri Aug 9 16:00:55 CEST 2013


On Fri, 09 Aug 2013, PICCORO McKAY Lenz wrote:
> i need to invoke another from from main form, but need to pass one
> parameter, how can i do that?
> 
> i have tho following code in main form, where i cant pass parameters to the
> "FAuth" form that invoke?:
> 
> ' create a instance of the another form, that have tow input text, id and
> password
>     fauth = New FAuth
> ' verify that user already wirte some input
>     If fauth.ShowModal() Or Not inputcodigo Or Not inputid Then
>         Return
>     Else
> ' if user already wirte some input, then let doit
>        ....
>     Endif
> 

In FAuth you can write:

Public Sub MyShowModal(theParameter As ...)
  ' Do something with theParameter
  Me.ShowModal()
End

Then you would do in FMain:

hAuth = New FAuth
hAuth.MyShowModal(...)

instead of using hAuth.ShowModal() directly.

Regards,
Tobi




More information about the User mailing list