<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %> <%@ Import Namespace="System.Drawing"%> <%@ Import Namespace="System.Drawing.Imaging"%> <%@ Import Namespace="System.Drawing.Drawing2D"%> <% Response.Clear() ''''清空缓冲区 Dim height as integer=100 Dim width as integer=200 Dim r as New Random ''''建立随机数对像 Dim x as integer =r.Next(75) ''''产生0-75的随机数 Dim x1 as integer =0 Dim a as integer=r.Next(155) ''''产生0-155的随机数 Dim x2 as integer=r.Next(100) ''''产生0-100的随机数 ''''建立位图对像Bitmap,参数为:宽,高,像素 Dim bmp as New Bitmap(width,height,PixelFormat.Format24BppRgb) ''''图片设置 Dim g as Graphics=Graphics.FromImage(bmp) g.SmoothingMode=SmoothingMode.AntiAlias g.Clear(Color.LightGray) g.DrawRectangle(Pens.White,1,1,width-3,height-3) g.DrawRectangle(Pens.Gray,2,2,width-3,height-3) g.DrawRectangle(Pens.Black,0,0,width,height) g.DrawString(" 中国横渡设计",New Font("Arial",10,FontStyle.Bold),SystemBrushes.WindowText,New PointF(10,50)) g.FillRectangle(New SolidBrush(Color.FromArgb(a,255,128,255)),x,20,100,50) g.FillRectangle(New LinearGradientBrush(New Point(x2,0),New Point(x2+75,50+30),Color.FromArgb(128,0,0,128),Color.FromArgb(255,255,255,240)),x2,50,75,30) ''''图像生成 bmp.Save(Response.OutputStream,ImageFormat.Jpeg) g.Dispose() bmp.Dispose() Response.End() %>
[C语言系列]NET 中C#的switch语句的语法 [系统软件]托拽Explore中的文件到VB.net的窗口 [系统软件]Boost库在XP+Visual C++.net中的安装 [常用软件]新配色面板:Paint.Net3.0RC1官方下载 [常用软件]用内建的“Net Meeting”聊天 [VB.NET程序]Henry的VB.NET之旅(三)—共享成员 [VB.NET程序]Henry的VB.NET之旅(二)—构造与析构 [VB.NET程序]Henry的VB.NET之旅(一)—失踪的窗体 [VB.NET程序]在托盘上显示Balloon Tooltip(VB.NET) [VB.NET程序]Henry手记-VB.NET中动态加载Treeview节点(二)