E卡编辑名称和ID号并拍摄其图像并保存 [英] E card edit name and ID number and take its image and save it
本文介绍了E卡编辑名称和ID号并拍摄其图像并保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想生成背景图像与我在一起的E卡,并编辑名称和ID号并保存.
I want to generate E card, whose background image is with me and to edit name and ID number and to save it. How is it possible
推荐答案
怎么可能
imports System.Drawing
Public Class Form1
Dim img As Bitmap
Dim g As Graphics
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Using g = Graphics.FromImage(img)
g.DrawString(TextBox1.Text, New Font("Arial", 8, FontStyle.Regular), Brushes.Blue, 50, 50)
g.DrawString(TextBox2.Text, New Font("Arial", 8, FontStyle.Regular), Brushes.Blue, 50, 100)
PictureBox1.Image = img
PictureBox1.Refresh()
End Using
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
img = PictureBox1.Image ' New Bitmap(PictureBox1.Width, PictureBox1.Height, Imaging.PixelFormat.Format32bppArgb)
End Sub
End Class
这篇关于E卡编辑名称和ID号并拍摄其图像并保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文