No subject


Thu Oct 26 19:20:09 CEST 2017


This program shows the transport of data from one form to the other.=20
To get the program going, you need: Two forms F1 and F2. On F1 you need 2=20
textboxes and 1 commandbutton. On F2 you need 2 textboxes and 4=20
commandbuttons.=20

The code for F1:=20
' F1.class=20

STATIC PUBLIC SUB Main()
  DIM hForm AS Form
  hForm =3D NEW F1
  hForm.show
END

PRIVATE hNew AS F2

PUBLIC SUB Button1_Click()
    hNew =3D NEW F2(textbox1.text)
    hNew.Show
    ME.hide
END

PUBLIC SUB _new(OPTIONAL t$ AS String)
  Textbox2.Text=3Dt$
END
The code for F2:=20
' F2.class:=20

'Here the data arrive from F1=20
'the parameter has TO be OPTIONAL,
'otherwise it would be impossible to
'initialize an instance of this class
'without a parameter=20
PUBLIC SUB _new(OPTIONAL t$ AS String)
    Textbox1.Text=3Dt$
END

'Here some data are added to the text of F1=20
PUBLIC SUB Button1_Click()
textbox2.text =3D Textbox1.Text & "Miller !"
END

PUBLIC SUB Button3_Click()
textbox2.text =3D Textbox1.Text & "Smith !"
END

PUBLIC SUB Button4_Click()
textbox2.text =3D Textbox1.Text & "Mayr !"
END

'Here it goes back to F1
PRIVATE hNew AS F1

PUBLIC SUB Button2_Click()
    hNew =3D NEW F1(textbox2.text)
    hNew.Show
    ME.Close
END


Am Montag, 28. Februar 2005 17:01 schrieb Naveen Agarawal:
> Hello
>
> I am trying to write a small application using mysql and gambas. I have g=
ot
> three forms. First form is a login form which asks the user to login using
> a user name and a password. It opens another form if the user gives corre=
ct
> user name and password. In the second form I have a combobox to be
> populated with a field in a table. My problem is that the variable conn
> which I defined in the first form is not visible in second and third form.
> I have added the line Private conn as new connection as the first line. A=
ny
> solution?
>
> Thanks in advance
>
> Thomas Kleindienst <t.kleindienst at ...20...> wrote:
> Hello List!
>
> Is there any possibility to write a blob into a database?
>
> I've binary information (it's a png-file) in a
> byte[]
> array. I want to store this in my database as a blob, but I don't know how
> to do it with gambas...
> Any help appreciated...
>
> btw... Is there a possibility for
> image or picture
> to load the image not from file but from
> byte[] ?
>
> Thanks and regards,
>
> Thomas
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
> Every body has his shares of ups and downs but one should never say no to
> life.
>
> ---------------------------------
> Do you Yahoo!?
>  Yahoo! Mail - You care about security. So do we.




More information about the User mailing list