189 8069 5689

关于vb.net时间显示图片的信息

vb.net怎样保存图片文件,并且保存的图片名称为当前时间

将PictureBox控件里的图片,保存为文件:

创新互联公司-专业网站定制、快速模板网站建设、高性价比镇宁网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式镇宁网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖镇宁地区。费用合理售后完善,十多年实体公司更值得信赖。

1,文件格式不变化:

PictureBox1.Image.Save("C:\" Format(Now, "HH-mm-ss") ".bmp")

2,文件格式有变化:

PictureBox1.Image.Save("C:\" Format(Now, "HH-mm-ss") ".bmp", System.Drawing.Imaging.ImageFormat.Bmp)

用vb.net怎么实现图片中的时间显示

刚写了个测试通过

Public Class Form4

Dim d As String

Dim wkd As String

Dim wd As String

Dim hms As String

Dim y As String

Dim mouth As String

Dim dd As String

Dim allymd As String

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

hms = Now.ToString("HH:mm:ss")

wkd = DateTime.Today.DayOfWeek.ToString

y = Now.ToString("yyyy") + "年"

mouth = Now.ToString("MM") + "月"

dd = Now.ToString("dd") + "日"

allymd = y + mouth + dd

Select Case wkd

Case "Sunday"

wd = "星期天"

Case "Monday"

wd = "星期一"

Case "Tuesday"

wd = "星期二"

Case "Wednesday"

wd = "星期三"

Case "Thursday"

wd = "星期四"

Case "Friday"

wd = "星期五"

Case "Saturday"

wd = "星期六"

End Select

Label1.Text = allymd + " " + wd + " " + hms + " "

End Sub

End Class

如何在vb.net中的display的图片上显示时间

图片框的名称叫display吗?

Public Sub DrawStr(ByVal pis As PictureBox, ByVal n As String)

Dim b As New Bitmap(pis.Width, pis.Height)

Dim g As Graphics = Graphics.FromImage(b)

g.Clear(Color.White)

Dim p As New Pen(Color.Black)

Dim bs As New SolidBrush(Color.Green)

Dim po As New Point

Dim fo As New Font("宋体", 2 * pis.Height / 3, FontStyle.Bold, GraphicsUnit.Pixel)

po.X = 0

po.Y = 0

g.DrawString(n, fo, bs, po.X, po.Y)

pis.Image = b

End Sub


文章标题:关于vb.net时间显示图片的信息
网页网址:http://jkwzsj.com/article/dodesji.html

其他资讯