Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hide app from the Window Taskbar
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Hide app from the Window Taskbar
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01160697
Message ID:
01160697
Views:
61
Hi,

I almost got my application running in "silent" mode via a command line switch. The only remaining trouble is that it is seen in the taskbar for a second.

I tried a few things found here but those were very old example that may not fit with VFP9.

I used the _screen.ShowInTaskbar = .F. but it's readonly.

I tried below this with no result(modified to get the HWND):
declare integer GetWindowLong ;
	in user32 ;
	as __GetWindowLong__ ;
	integer, ;
	integer
	
declare integer SetWindowLong ;
	in user32 ;
	as __SetWindowLong__ ;
	integer, ;
	integer, ;
	integer
	
DECLARE INTEGER FindWindow IN Win32API;
   STRING @lpClassName, STRING @lpWindowName

* hide this window from the taskbar and switchbar
*	#define WS_EX_TOOLWINDOW  0x80
*	#define WS_EX_APPWINDOW   0x40000
	local lnStyle, lnHWND,lcVFPcaption
	DO x_debug
   lcVFPcaption = _vfp.Caption
   lnHWND= FindWindow(0, @lcVFPcaption)
   
	lnStyle = __GetWindowLong__(lnHWND, -20)
	if bitand(m.lnStyle, 0x40000) = 0x40000 then
	   lnStyle = bitxor(m.lnStyle, 0x40000)
	   =__SetWindowLong__(lnHWND, -20, m.lnStyle)  && remove from taskbar
	endif
Am I missing something?

Thank's for your help
Lead programmer of the free MIS Info Video(Frontend/player), Info 2 MIS or visit me at Steve's Tech Blog
Next
Reply
Map
View

Click here to load this message in the networking platform