void DisableTaskSwitching (void);
![]() |
Note This function is obsolete. For information about alternative methods for disabling task switching under Windows 2000/XP, refer to the Alternatives under Windows 2000/NT/XP section in this topic. |
Prevents the user from using <Alt-Tab>, <Alt-Esc>, or <Ctrl-Esc> key combination to switch another task.
Linux This function is not supported.
DisableTaskSwitching affects the behavior of these keys only while a LabWindows/CVI executable is the active application.
If you configure Windows 9x to hide the taskbar, DisableTaskSwitching also prevents the user from using the mouse to bring up the taskbar.
DisableTaskSwitching has no effect in Windows 2000/NT/XP. Refer to the Alternatives under Windows 2000/NT/XP section in this function description for instructions on how to achieve the required effect.
![]() |
Note Under Windows 98, DisableTaskSwitching requires the LabWindows/CVI low-level support driver. LabWindows/CVI loads the driver at startup if it is on disk. You can check whether LabWindows/CVI loaded the driver at startup by calling CVILowLevelSupportDriverLoaded. |
Disabling the Task List
DisableTaskSwitching does not prevent the user from clicking on the taskbar under Windows 98. You can prevent the user from clicking on the desktop by forcing your window to cover the entire screen.
Forcing Window to Cover Entire Screen
You can force your window to cover the entire screen by making the following calls to functions in the User Interface Library.
SetPanelAttribute (panel, ATTR_SIZABLE, FALSE);
SetPanelAttribute (panel, ATTR_CAN_MINIMIZE, FALSE);
SetPanelAttribute (panel, ATTR_CAN_MAXIMIZE, FALSE);
SetPanelAttribute (panel, ATTR_SYSTEM_MENU_VISIBLE, FALSE);
SetPanelAttribute (panel, ATTR_MOVABLE, FALSE);
SetPanelAttribute (panel, ATTR_WINDOW_ZOOM, VAL_MAXIMIZE);
In these calls, panel is the panel handle for your top-level window.
Alternatives under Windows 98
Under Windows 98, you can arrange for your stand-alone application to appear in place of the desktop when Windows boots.
You can do this by changing the following line in your system.ini [boot] section from:
shell = Explorer.exe
to:
shell = full-path-of-your-executable
Alternatives under Windows 2000/NT/XP
Under Windows 2000/NT/XP, you can achieve the same results as DisableTaskSwitching by arranging for your LabWindows/CVI application to be brought up in place of the Program Manager and by disabling the Task Manager. You can do this by making the following changes to the registry entry for the key name:
KEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Preventing Interference with Real-Time Processing
Under Windows, many user actions can interfere with real-time processing. The following actions suspend the processing of events.
You can prevent these user actions from interfering with event processing by performing the following actions:
SetSystemPopupsAttribute (ATTR_MOVABLE, 0);
SetSystemPopupsAttribute (ATTR_SYSTEM_MENU_VISIBLE, 0);
An alternative approach is available on Windows 2000/NT/XP/9x. You can enable timer control callbacks while the user presses <Alt-Tab>, pulls down the System menu, or, in some cases, moves or sizes a window. You can do this by using the following function call:
SetSystemAttribute (ATTR_ALLOW_UNSAFE_TIMER_EVENTS, 1);
This alternative approach is incomplete and can be unsafe. Refer to the discussion on ATTR_ALLOW_UNSAFE_TIMER_EVENTS.
None.
None.