Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I remove application's icon from taskbar?
Message
 
 
À
16/04/2001 08:17:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00495729
Message ID:
00496306
Vues:
34
This message has been marked as the solution to the initial question of the thread.
>I have application as Top-Level Form(without Screen).
>Can I remove application's icon from taskbar?

As Mike said, you can use the Windows API to do this. Try the following:
declare integer FindWindow in user32 string,string
declare integer GetWindowLong in user32 integer, integer
declare integer SetWindowLong in user32 integer, integer, integer

#define GWL_EXSTYLE       -20
#define WS_EX_TOOLWINDOW  0x80
#define WS_EX_APPWINDOW   0x40000

do form mytoplevelform name otemp noshow
local nhwnd,nstyle
nhwnd = FindWindow(0,'Top Level Form Caption')
nstyle = GetWindowLong(nhwnd,-20)
if bitand(nstyle,WS_EX_APPWINDOW) = WS_EX_APPWINDOW then
   SetWindowLong(nhwnd,-20,bitxor(nstyle,WS_EX_APPWINDOW))  && remove taskbar force style from Window
   nstyle = bitxor(nstyle,WS_EX_APPWINDOW)
endif
SetWindowLong(nhwnd,-20,bitor(nstyle,WS_EX_TOOLWINDOW))
otemp.Visible = .T.
The only drawback that I see with this technique (and there could be others) is that because you are changing the style of the window, the icon doesn't display in the upper left hand corner of the form.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform