[Gambas-user] Hiding FMain not possible?

Stefano Palmeri rospolosco at ...152...
Thu Dec 11 10:39:19 CET 2008


Il mercoledì 10 dicembre 2008 19:34:44 Benoit Minisini ha scritto:
> On mercredi 10 décembre 2008, Stefano Palmeri wrote:
> > Il mercoledì 10 dicembre 2008 15:50:15 Rolf-Werner Eilert ha scritto:
> > > Benoit Minisini schrieb:
> > > > On mercredi 10 décembre 2008, Rolf-Werner Eilert wrote:
> > > >> Hi folks,
> > > >>
> > > >> meanwhile I've understood how to use the TrayIcon, but if my
> > > >> application should show only the tray icon, no application window,
> > > >> how can I hide the whole thing (except the tray icon, of course)?
> > > >>
> > > >> Thanks for your advice!
> > > >>
> > > >> Rolf
> > > >
> > > > FMain.Hide ?
> > >
> > > This is what I tried, and I tried setting FMain.Visible = False and so
> > > on - no help, it just shows up on screen.
> > >
> > > It is shown when started in the IDE and when started as an executable
> > > as well.
> > >
> > > Seems this has to do with my KDE version, like the other thing we
> > > discussed yesterday...
> > >
> > > Rolf
> >
> > I've the same problem under KDE 3.5.9. To solve I use the same
> > solution explained by Toni. In a startup module I just put:
> >
> > ---------------------------------
> > PUBLIC SUB Main()
> >
> >   FMain.Visible = FALSE
> >
> > END
> > ---------------------------------
> >
> >
> > Bye,
> >
> > Stefano
>
> If your startup class is not a form, you don't have to do FMain.Visible =
> FALSE. Just create your TrayIcon there, and show FMain only if needed.
>
> Regards,
Benoit, the Module startup class is a workaround.
The little problem here is that if I have a startup class that is a Form
with a TrayIcon, is not possible to hide it on start. I don't know if this is 
a bug of Gambas or KDE. I attached a little example to explain.
I would like to iconify the app on startup, I mean I don't want to see
the Form, just the icon in KDE kicker. If the the startup class is the FMain 
form, Me.Hide or ME.Visible are unuseful. The Form is shown. If in the same
project you set Module1 as startup class the form finally is not shown and
I see only the trayicon as I want. I hope the issue is more clear, even if my 
english is awful :-) Just run the project and see. The goal is not to show 
the FMain form on start, without using the Module1 startup class. Tell me 
where's the error. 

KDE 3.5.9
QT 3.3.8b
Gambas 2.9 rev 1668

Thank you,

Stefano


-------------- next part --------------
A non-text attachment was scrubbed...
Name: trayicon-0.0.1.tar.gz
Type: application/x-tgz
Size: 8179 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20081211/81e488da/attachment.bin>


More information about the User mailing list