muddassir Level: Trainee
 Registered: 23-08-2008 Posts: 2
|
error
"I have declared namespaces as follows
Imports System.Drawing
Imports System.Drawing.Graphics
Imports system.Drawing.Drawing2D
Imports System.Windows.Forms.Control
"in the following code below first line shows an error as typed in question above"
Public Sub FillRegionRectangle(ByVal e As PaintEventArgs)
' Create solid brush.
Dim blueBrush As New SolidBrush(Color.Blue)
' Create rectangle for region.
Dim fillRect As New Rectangle(100, 100, 200, 200)
' Create region for fill.
Dim fillRegion As New [Region](fillRect)
' Fill region to screen.
e.Graphics.FillRegion(blueBrush, fillRegion)
End Sub
|