Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set focus to the executable
Message
From
18/02/2010 07:43:40
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01449446
Message ID:
01449670
Views:
31
ahh! it works!
but can you please tell me what this code says?
procedure ActivateWindow
	lparameters tnHwnd
	declare short SetForegroundWindow in win32API integer nHwnd
	declare short ShowWindow in WIN32API alias Win32ShowWindow ;
		integer hwnd, ;
		integer nCmdShow
	declare short GetWindowPlacement in WIN32API ;
		integer hwnd, ;
		string @ lpwndpl

	#define SW_SHOWMINIMIZED    2
	#define SW_SHOWMAXIMIZED    3
	#define SW_MAXIMIZE         3
	#define SW_SHOWNOACTIVATE   4
	#define SW_SHOW             5
	#define SW_MINIMIZE         6
	#define SW_SHOWMINNOACTIVE  7
	#define SW_SHOWNA           8
	#define SW_RESTORE          9
	#define SW_SHOWDEFAULT      10
	#define SW_FORCEMINIMIZE    11

	local lnHWND, lpwndpl
	lpwndpl = chr(4*3+8*2+4*4)+replicate(chr(0),4*3+8*2+4*4-1)
	SetForegroundWindow( m.tnHWND )
	if ( GetWindowPlacement(m.tnHWND, @lpwndpl) # 0 ) and ;
			inlist(asc(substr(m.lpwndpl, 4+4+1, 1)), ;
			SW_SHOWMINIMIZED, SW_MINIMIZE, SW_SHOWMINNOACTIVE, SW_FORCEMINIMIZE)
		Win32ShowWindow(m.tnHWND, SW_RESTORE)
	endif
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform