[Gambas-user] enumerate forms

Stefano Palmeri rospolosco at ...152...
Sun Jan 27 15:36:18 CET 2008


Alle 15:04, domenica 27 gennaio 2008, Steven Lobbezoo ha scritto:
> Le Sunday 27 January 2008 14:56:05 Benoit Minisini, vous avez écrit :
> > On dimanche 27 janvier 2008, Steven Lobbezoo wrote:
> > > Le Sunday 27 January 2008 14:30:54 Benoit Minisini, vous avez écrit :
> > > > On dimanche 27 janvier 2008, Steven Lobbezoo wrote:
> > > > > Le Sunday 27 January 2008 13:56:52 Steven Lobbezoo, vous avez 
écrit :
> > > > > > Hi,
> > > > > >
> > > > > > Is there a way to enumerate all formnames in an apllication ?
> > > > > > (Active or not)
> > > > > >
> > > > > > Thanks,
> > > > > > Steven
> > > > > >
> > > > > > -----------------------------------------------------------------
> > > > > >-- -- -- -- This SF.net email is sponsored by: Microsoft
> > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > > > > > _______________________________________________
> > > > > > Gambas-user mailing list
> > > > > > Gambas-user at lists.sourceforge.net
> > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > > >
> > > > > Sorry, I forgot :
> > > > > I tried Info.Forms, but there is nothing there, just the word Forms
> > > > >
> > > > > Steven
> > > >
> > > > Please explain what you want to do exactly. What does the string
> > > > "formnames" means for you?
> > >
> > > I want to put the names of the forms (i.e. "FormClients") as they are
> > > shown in the IDE in an array. (And in a listbox)
> > >
> > > Steven
> >
> > I'm afraid you can't, as this information is not stored at all in the
> > object files, nor in the project configuration file.
> >
> > Regards,
>
> Ok, pity but thanks anyway,
> Regards,
> Steven
>

There's a very raw mode to do it (if I understood your needs):

DIM sFormName AS String
         
  FOR EACH sFormName IN Dir(Application.Path, "*.form")
      PRINT sFormName
  NEXT  


but it doesn't work when compiled as an executable; but you can save those
info in file and work with it.

Stefano




>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list