How To Use APIs to Check, Enable, or Disable Full Window Drag (185637)
The information in this article applies to:
- Microsoft Visual Basic Control Creation Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q185637 SUMMARY
Normally, when a window is moved or sized, the operating system informs the
window by posting the appropriate messages at the end of the move or size
operation. These messages include WM_MOVE, WM_WINDOWPOSCHANGED, WM_PAINT,
and WM_SIZE among others. Windows 2000, Windows NT 4.0, and Windows 95 (with the Microsoft Plus! add-in), Windows 98, and Windows Me offer the ability to show the entire contents of a window as it is moved or resized. The operating system accomplishes this by continuously sending these messages to the window during moving or resizing, not just at the end of the operation. This causes the window to redraw itself multiple times during one resize or move operation.
At times, you may want to disable this feature to avoid possible flickering
of the screen or to prevent code in an event like the ReSize event from
occurring multiple times during one resize operation. Using the
SystemParametersInfo API function, the status of this feature can be
checked, enabled, or disabled as needed. This technique is demonstrated in
the sample code below for both the 16- and 32-bit Visual Basic development
environments.
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbAPI kbhowto KB185637 |
---|
|