易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net 将字符串生成图片 - .NET技术 / ASP.NET

我想将字符串生成一张图片,如何写?
字符串生成图片?

引用

字符串生成图片?


说简单点就是生成验证码的方法。


Private Sub Paint(ByVal strCode As String)
  Dim strImgPath As String = Server.MapPath("myCodeImg.jpg")
  Dim strTempPath As String = strImgPath
  System.IO.File.Delete(strImgPath)

  Const intWidth As Int16 = 400
  Const intHeight As Int16 = 150

  Dim myBimap As System.Drawing.Image = New System.Drawing.Bitmap(intWidth, intHeight)

  Dim myG As System.Drawing.Graphics = System.Drawing.Graphics.fromImage(myBimap)

  Dim myFont As System.Drawing.Font = New System.Drawing.Font("幼圆", 16, FontStyle.Bold)

  Dim myRect As System.Drawing.RectangleF = New System.Drawing.RectangleF(2, 2, intWidth, intHeight)

  Dim myBrush As System.Drawing.SolidBrush = New System.Drawing.SolidBrush(Color.White)

  myG.Clear(Color.Blue)

  myG.DrawString(strCode, myFont, myBrush, myRect)

  myBimap.Save(strTempPath, System.Drawing.Imaging.ImageFormat.Jpeg)
  Image1.ImageUrl = strTempPath
  myG.Dispose()
  myBimap.Dispose()
  End Sub





相关问答:

在asp.net里面脚本出错 - .NET技术 / ASP.NET

function CheckOpwd(){//验证用户名
var pwd=document.all.txtOpwd;

var div1=document.getElementById("divPwd");

if (pwd.value=="")
{
......

asp.net 页面限时提交 如何实现 - .NET技术 / ASP.NET

1.asp.net做的一个答题页面,如何实时限时后自动提交,请大家给点思路
限时的时间信息存放在数据库中
2.如果答题时间设置的较长,如何方式session超时后页面无效
谢谢
用js方法来控制
回复内容太短了。。

js ......

求助asp.net图片上传 - .NET技术 / ASP.NET

就是一个按钮,点击之后打开对话框,然后选取图片。就这样上传。。
怎么实现。在网上搜到那么多的代码,全是很多的那种,不知道,看不下去。
所以在这里想请大哥大姐帮帮忙。

使用自带的fileupload控件可以实现 ......

ASP.NET相关技术 - .NET技术 / ASP.NET

各位大侠,我学习的是ASP.NET,想知道相关技术有哪些,就像JAVA EE中有struct sping jsp severlet 等,ASP.NET还有哪些些相关技术。
http://topic.csdn.net/u/20090914/21/af27de99-f0f3-4cfd-9379-13764f8ec6b1.ht ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号