Specifies the type of windows that code is allowed to use.
public enum class UIPermissionWindow
[System.Runtime.InteropServices.ComVisible(true)] [System.Serializable] public enum UIPermissionWindow
type UIPermissionWindow =
Public Enum UIPermissionWindow
|AllWindows AllWindows AllWindows AllWindows||3||
Users can use all windows and user input events without restriction.
|NoWindows NoWindows NoWindows NoWindows||0||
Users cannot use any windows or user interface events. No user interface can be used.
|SafeSubWindows SafeSubWindows SafeSubWindows SafeSubWindows||1||
Users can only use SafeSubWindows for drawing, and can only use user input events for user interface within that subwindow. Examples of SafeSubWindows are a MessageBox, common dialog controls, and a control displayed within a browser.
|SafeTopLevelWindows SafeTopLevelWindows SafeTopLevelWindows SafeTopLevelWindows||2||
Users can only use SafeTopLevelWindows and SafeSubWindows for drawing, and can only use user input events for the user interface within those top-level windows and subwindows. See the Remarks section for more information.
This enumeration is used by UIPermission.
When an application runs under the
SafeTopLevelWindows permission, it:
Shows the DNS name or IP address of the Web site from which the application was loaded in its title bar.
Displays Balloon tooltip when it first displays, informing the user that it is running under a restricted trust level.
Must display its title bar at all times.
Must display window controls on its forms.
Cannot minimize its main window on startup.
Cannot move its windows off-screen.
Cannot use the Form.Opacity property to make its windows less than 50% transparent.
Cannot make windows invisible. Any attempt by the application to set the Control.Visible property to
Falsewill be ignored.
Must have an entry in the Task Bar.
Has its controls prohibited from accessing the Parent property. By implication, controls will also be barred from accessing siblings - that is, other controls at the same level of nesting.
Cannot control focus using the Control.Focus method.
Has restricted keyboard input access, so that a form or control can only access keyboard events for itself and its children.
Has restricted mouse coordinate access, so that a form or control can only read mouse coordinates if the mouse is over its visible area.
Cannot set the Form.TopMost property.
These restrictions help prevent potentially harmful code from spoofing attacks, such as imitating trusted system dialogs.