DisplayResolutionChange Event | |||||||
Applies to: Subclasser object, PowerForm
control See also: Resizing event, Resized event, Event Index Occurs when the system's display resolution has changed. This event can occur when the display resolution has been changed by the user via the Display Control Panel, or when the display resolution has been changed by another application. Syntax: Private Sub object_DisplayResolutionChange() The DisplayResolutionChange event syntax has these parts:
Remarks: It is generally preferable to re-position controls in response to the Resized event. If your form is maximized, the Form_Resize event and the Resized event will both fire when the display resolution is changed. The DisplayResolutionChange event should only be handled if there are specific aspects of your user interface which rely on the screen resolution. Use the intrinsic Screen object to determine the new screen resolution. Example: The following code snippet resets the maximized height of the form to always leave a 100 pixel gap below the form, even when the form is maximized.
|