Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to hide the button of a program on the task bar ?
Message
From
25/04/2002 03:15:43
 
 
To
24/04/2002 08:54:29
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00648607
Message ID:
00649010
Views:
21
>how to hide the button of a program on the task bar ?

See Message#496306. With VFP7 this code is shorter, because any form has HWND property, so you do not need to determine it:
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 = otemp.HWND
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.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform