LEADTOOLS Windows Forms (Leadtools.WinForms assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
BeginUpdate Method
See Also 
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 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also