Leadtools.WinForms Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
BeginUpdate Method
See Also  Example
Leadtools.WinForms Namespace > RasterPictureBox Class : BeginUpdate Method



Prevents the control from drawing until the EndUpdate method is called.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub BeginUpdate() 
Visual Basic (Usage)Copy Code
Dim instance As RasterPictureBox
 
instance.BeginUpdate()
C# 
public virtual void BeginUpdate()
C++/CLI 
public:
virtual void BeginUpdate(); 

Example

This sample zooms out on the image, keeping it centered. The resulting transform is displayed in the console.

Visual BasicCopy Code
Public Sub RasterPictureBox_BeginUpdate(ByVal viewer As RasterPictureBox)
    viewer.BeginUpdate() ' suspend painting of the image
    viewer.SizeMode = RasterPictureBoxSizeMode.CenterImage
    viewer.UseDpi = False
    viewer.EndUpdate() ' start painting of the image
End Sub
C#Copy Code
public void RasterPictureBox_BeginUpdate(RasterPictureBox viewer) 

   viewer.BeginUpdate();  // suspend painting of the image  
   viewer.SizeMode = RasterPictureBoxSizeMode.CenterImage; 
   viewer.UseDpi = false; 
   viewer.EndUpdate(); // start painting of the image  
}

Remarks

When you want to disable repainting of the RasterPictureBox, call BeginUpdate.
When you are ready to resume painting call EndUpdate.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also