I am trying to do a Microsoft tutorial, and incorporate it into my software. I decided to start out just trying to get their tutorial to work, however it is not working.
http://www.microsoft.com/seminar/sha...est.xml&rate=1
An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll
Additional information: Invalid parameter used.
Code:Private Sub frmStudy_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint Dim canvas As Graphics = e.Graphics Dim expandingBox As New Rectangle(0, _ 0, _ e.ClipRectangle.Width / 2, _ e.ClipRectangle.Height / 2) Dim paintBrush As New LinearGradientBrush(expandingBox, _ Color.White, Color.Blue, LinearGradientMode.ForwardDiagonal) canvas.FillRectangle(paintBrush, expandingBox) paintBrush.Dispose() canvas.Dispose() End Sub




Reply With Quote