dim strFilename as string '聲明變數,用於圖片路徑
dim i as System.Drawing.Image '建立.net架構影像處理對象執行個體
dim imgg1 as Integer =CInt(Int((6 * Rnd()) + 1)) '產生1-6的隨機數
dim oydj as string=imgg1
dim b as New system.drawing.bitmap(i.width, i.height, pixelformat.format24bpprgb)
dim g as graphics = graphics.fromimage(b)
g.clear(color.blue) '背景色為藍色
dim sss=Request.ServerVariables("REMOTE_ADDR")
g.drawimage(i,New point(0,0))
'這裡表示產生一個字元,9號宋體加粗白色,pointF(160,50)為在螢幕的座標
g.drawString(sss, New font("宋體",9,fontstyle.bold),new SolidBrush(Color.White),New pointF(160,50))
g.drawString(sss, New font("宋體",9,fontstyle.bold),new SolidBrush(Color.White),New pointF(161,51))