Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding App in Taskbar
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00711599
Message ID:
00711602
Views:
17
This message has been marked as the solution to the initial question of the thread.
Hi!

You can do this with use of Windows API functions:
declare integer GetWindowLong ;
	in user32 ;
	as __GetWindowLong__ ;
	integer, ;
	integer
declare integer SetWindowLong ;
	in user32 ;
	as __SetWindowLong__ ;
	integer, ;
	integer, ;
	integer

* hide this window from the taskbar and switchbar
*	#define WS_EX_TOOLWINDOW  0x80
*	#define WS_EX_APPWINDOW   0x40000
	local lnStyle
	lnStyle = __GetWindowLong__(HWND, -20)
	if bitand(m.lnStyle, 0x40000) = 0x40000 then
	   lnStyle = bitxor(m.lnStyle, 0x40000)
	   =__SetWindowLong__(HWND, -20, m.lnStyle)  && remove from taskbar
	endif
	=__SetWindowLong__(HWND, -20, bitor(m.lnStyle, 0x80 )) && remove it also from switch bar
Also, in VFP6 there is no way to know HWND directly from a form's property like in VFP7. You can use a few otehr Windows API functions to get it, as well as there are a few other approaches (you can find them at this site).

HTH.

>Hi there,
>is there a possibility to prevent an vfp(6)-app from appearing in the taskbar when minimized. I have a little app that has to appear in the system-tray (which can be done with a simple Active-X-Control), but not in the taskbar.
>I already tried setting Desktop = .T., showwindow=2 and titlebar= 0 but this only hides the app behind the taskbar.
>Thanks a lot
>Thomas
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