I want to draw a rectangle and display it on my page. How do I do this. What I have doesn't work.
Dim objBitmap As Bitmap
Dim objGraphics As Graphics
Dim objBrush As HatchBrush
Dim objFont as New Font("Arial", 16)
objBitmap = New Bitmap(150, 200)
objGraphics = Graphics.FromImage(objBitmap)
objBrush = New HatchBrush(HatchStyle.DottedGrid, Color.BlanchedAlmond)
objGraphics.FillRectangle(objBrush, 100, 100, 100, 100)
objGraphics.DrawString("Hello World", objFont, Brushes.Blue, 4, 4)
objBitmap.Save(Response.OutputStream, ImageFormat.Gif)
imageshown.ImageUrl = objBitmap
Dim objBitmap As Bitmap
Dim objGraphics As Graphics
Dim objBrush As HatchBrush
Dim objFont as New Font("Arial", 16)
objBitmap = New Bitmap(150, 200)
objGraphics = Graphics.FromImage(objBitmap)
objBrush = New HatchBrush(HatchStyle.DottedGrid, Color.BlanchedAlmond)
objGraphics.FillRectangle(objBrush, 100, 100, 100, 100)
objGraphics.DrawString("Hello World", objFont, Brushes.Blue, 4, 4)
objBitmap.Save(Response.OutputStream, ImageFormat.Gif)
imageshown.ImageUrl = objBitmap