Ask Your Question

Revision history [back]

Yes, you can obtain similar functionality to GetUpdateRect() in .NET using the System.Windows.Forms.Control class. The Control class provides a method called GetUpdateRect(), which returns the bounds of the portion of a control that requires repainting.

For example, if you have a control named "myControl", you can call GetUpdateRect() to get the update rectangle as follows:

Rectangle updateRect = myControl.GetUpdateRect();

This will return a Rectangle object that specifies the area of the control that requires repainting. You can then use this information to redraw the control.

Note that the behavior of GetUpdateRect() in .NET may differ slightly from the Win32 API version, as it is implemented at the .NET framework level.