Using Laziness
As I do a lot of forms development, I end up writing something like this a lot: Try pnlSomething.SuspendLayout() '... Finally pnlSomething.ResumeLayout() End Try Now as I am lazy, I thought I could make a class to do this for me: Public Class Layout Implements IDisposable Private _control As Control Public Sub New(ByVal control As Control) _control = control _control.SuspendLayout() End Sub Public Sub Dispose() Implements IDisposable.Dispose _control.ResumeLayout() _control = Nothing End Sub End Class It is used like this:...