Return a value from a class

Post your Gambas programming questions here.
Online
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Return a value from a class

Post by cogier »

Thanks to all regarding this. With a little help from my mate Matt we have come up with the attached.

Thanks to ocoquet for pointing out the fact that you can return a value with Me.Close(1). Very useful :D I have also discovered the '_call()' Special Method.

In this simple program I can now get a value back from a class, indicating which button was pressed, using: -
Public Sub Form_Open()

  Label1.Text = MsgBox("No 1", "No 2")

End
Test2-0.0.2.tar.gz
(11.68 KiB) Downloaded 230 times
Post Reply