Snippets

Here is your code snippet

Code


Drawing example

Another drawing example

<%@ Page Language="VB" ContentType="image/gif" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Imaging" %>
<Script Runat = "Server">
Sub Page_Load
Dim objBmp As New Bitmap(480, 60, PixelFormat.Format24bppRgb)
Dim objGraphics As Graphics = Graphics.FromImage(objBmp)
objGraphics.SmoothingMode = SmoothingMode.HighSpeed
objGraphics.Clear(Color.White)
objGraphics.DrawString("programmingsite", New Font("Arial", 20, FontStyle.Bold), SystemBrushes.WindowText, New PointF(10, 80))
objBmp.Save(Response.OutputStream, ImageFormat.Gif)
objBmp.Dispose()
objGraphics.Dispose()
End Sub
</Script>