| Below code is used to do drawing first
Imports System.Drawing
Imports System.Drawing.Imaging
Partial Class Usebrush
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim b As New Bitmap(150, 150, PixelFormat.Format32bppArgb)
Dim g As Graphics = Graphics.FromImage(b)
Dim br As Brush = Brushes.Yellow
g.FillEllipse(br, 5, 5, 140, 140)
Response.ContentType = "image/gif"
b.Save(Response.OutputStream, ImageFormat.Gif)
b.Dispose()
End Sub
End Class | | |