[Gambas-user] pass parameters to another form invoke where?
Fabien Bodard
gambas.fr at ...626...
Fri Aug 9 17:38:59 CEST 2013
Well Tobi I think you need to complete the idea.
in fAuth :
Private $iId as Integer
Public Value as Integer
Public sub Run(Id as integer) as boolean
dim hForm as new hAuth
$iId = Id
return not hForm.ShowModal()
End
Public sub _Load()
'Get UserInfo from $iId and then
txtUser.Text = resultuser
End
Public sub btnValidate_Click()
return
end
Public Sub bntCancel_Click()
return true
endif
'in the main form
if not hAuth.Run(user.id) then print hAuth.Value
2013/8/9 Tobias Boege <taboege at ...626...>
> 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
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Fabien Bodard
More information about the User
mailing list