[Gambas-user] Code issue - dynamic form creation
Benoit Minisini
gambas at ...1...
Tue Jan 25 11:17:20 CET 2005
On Monday 24 January 2005 00:29, Øystein Selbekk wrote:
> Hi.... Im a Gambas Newbie, and an really old VB dev.
> Im trying the following:
> Dynamic creation of forms like this:
> dim DynNewFrm as new MyFrm
> DynNewFrm.show
> Works Great!
> When my code has done this 2 or 3 times, i would like to write data to say
> form nr 2. This form has a special public ID ex. MyFrm.MyID=5. In VB i do
> like this:
> for i = 0 to forms.count -1
> if forms(i).name = "MyFrm" then
> if forms(i).MyID = 5 then
> forms(i).MyOtherData="This is the one!"
> end if
> end if
> next i
>
> I cant seem to find a forms collection in Gambas.... How do i solve this?
> Anyways: So far Gambas is really impressing! Gooooooood job everyone!
>
> Regards Oystein Selbekk
>
DIM hWindow AS Window
DIM hMyFrm AS MyFrm
FOR EACH hWindow IN Windows
IF Object.Type(hWindow) = "MyFrm" THEN
hMyFrm = hWindow
IF hMyFrm.MyID = 5 THEN
...
ENDIF
ENDIF
NEXT
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list