Using Win32 functions in Visual FoxPro Image Gallery
Window Station and Desktop
..msdn
CloseDesktop
CreateDesktop
GetThreadDesktop
OpenDesktop
OpenInputDesktop
SetThreadDesktop
SwitchDesktop
Code examples:
How to prevent users from accessing the Windows Desktop and from switching to other applications
SetThreadDesktop
..msdn    Add comment     W32 Constants      Translate this page
Assigns the specified desktop to the calling thread. All subsequent operations on the desktop use the access rights granted to hDesktop.
Code examples:
How to prevent users from accessing the Windows Desktop and from switching to other applications
Declaration:
BOOL SetThreadDesktop(
    HDESK hDesktop
);

FoxPro declaration:
DECLARE INTEGER SetThreadDesktop IN user32;
    INTEGER hDesktop
Parameters:
hDesktop
[in] Handle to the desktop to be assigned to the calling thread. This handle is returned by the CreateDesktop, GetThreadDesktop, OpenDesktop, or OpenInputDesktop function.
Return value:
If the function succeeds, the return value is nonzero.
Usage:
* use random name for new desktop
cNewdesktop = "desktop_" + SUBSTR(SYS(2015), 3)

hNewDesktop = CreateDesktop(cNewdesktop,;
    0,0,0, GENERIC_ALL, 0)

= SetThreadDesktop(m.hNewDesktop)
= SwitchDesktop(m.hNewDesktop)
My comment:
See also: CreateDesktop, GetThreadDesktop, OpenDesktop, SetProcessWindowStation
Word Index links for the SetThreadDesktop :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2005-09-04 16:20:04
Modified: 2008-01-05 11:35:40
Visited in last 7 days: 20
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.166.199.178)
12 sec.Function: 'GetUrlCacheEntryInfo'
36 sec.Function: 'MAPILogon'
48 sec.Function: 'GetProcessPreferredUILanguages'
59 sec.Function: 'GetSystemMetrics'
1.18 min.Function: 'ClientToScreen'
1.37 min.Function: 'NetShareAdd'
1.58 min.Function: 'FtpGetFile'
1.78 min.Function: 'GetTextMetrics'
1.97 min.Function: 'WindowProc'
2.2 min.Function: 'DrawMenuBar'
Google
Advertise here!