| 
     
      
      
      From: Alain A. <ala...@wa...> - 2015-07-27 07:09:50
      
     
   | 
Hi,
Having a program which takes about 20 seconds to initialize before
displaying the window, I can't use splash() function which as only the
parameter time.
I made my own function which is an external program and is called by my
program.
I ought to hide the window system title.
Is-it possible and how ?
Here is the very simple code of it :
#include "windows.ch"
#include "guilib.ch"
#include "gtk.ch"
//
============================================================================
Function main(cTitle,cImage,cIcon,cwidth,cheight,cleft,ctop,cversion)
//
============================================================================
local oSplash, oIcon, oFont := HFont():Add( "Serif",0,-18 )
if pcount() > 6
   oIcon:= HIcon():Addfile(cIcon)
   INIT WINDOW oSplash MAIN TITLE cTitle ;
   ICON oIcon AT val(cleft),val(ctop) SIZE val(cwidth),val(cheight)
   @ 0, 0 BITMAP cImage
   if pcount() == 8
      @ 250,50 say cversion SIZE 30, 22 COLOR hwg_VColor("FF00FF")
BACKCOLOR hwg_VColor("FFFFFF")
   endif
   ACTIVATE WINDOW oSplash
endif
return nil
and here is now how it's called and closed:
run("splash "+chr(34)+"GeneTools-splash"+chr(34)+"
"+chr(34)+"/usr/local/share/hwgui/splash/genetools.png"+chr(34)+"
"+chr(34)+cImageDir+"tool.png"+chr(34)+" 300 250 410 160 "+progvers+" &")
...
init
...
INIT WINDOW oMainWindow MAIN TITLE "Utilitaires de généalogie
(v"+progvers+")" ;
ICON oIcon AT 200,50 SIZE 844,422 ;
...
// Fermeture du splash
hb_processRun("wmctrl -l",,@cmd)
if at("GeneTools-splash",cmd) > 0
   run("sleep 1")
   run('wmctrl -c "GeneTools-splash"')
endif
ACTIVATE WINDOW oMainWindow
Thanks
A+
-- 
------------------------------------------------------------------------
Alain Aupeix
http://jujuland.pagesperso-orange.fr/
http://pissobi-lacassagne.pagesperso-orange.fr/
------------------------------------------------------------------------
U.buntu 12.04 | G.ramps 3.4.9-1 | H.arbour 3.2.0dev (2015-07-24 16:55) |
HbIDE (Rev.316) | Five.Linux (r143) | Hw.Gui (2470)
------------------------------------------------------------------------
 |