你可以在窗體上放一個(gè)lable控件,取名叫l(wèi)able1,

為岷縣等地區(qū)用戶(hù)提供了全套網(wǎng)頁(yè)設(shè)計(jì)制作服務(wù),及岷縣網(wǎng)站建設(shè)行業(yè)解決方案。主營(yíng)業(yè)務(wù)為網(wǎng)站設(shè)計(jì)制作、做網(wǎng)站、岷縣網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專(zhuān)業(yè)、用心的態(tài)度為用戶(hù)提供真誠(chéng)的服務(wù)。我們深信只要達(dá)到每一位用戶(hù)的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!
那么實(shí)現(xiàn)方式就是:
private
sub
form_load()
lable1.text="今天天氣很好";
end
sub
你可以試試
Private?Sub?Button1_Click(ByVal?sender?As?System.Object,?ByVal?e?As?System.EventArgs)?Handles?Button1.Click
Dim?nBrush?As?New?SolidBrush(Color.Red)
Dim?font?As?New?Font("宋體",?12)
Dim?bmp?As?Bitmap?=?Bitmap.FromFile("c:\123.jpg")
Dim?info?As?String?=?"完成"
Dim?g?As?Graphics?=?Graphics.FromImage(bmp)
Dim?sizef?As?SizeF?=?g.MeasureString(info,?font)
Dim?left?As?Single?=?(PictureBox1.Width?-?sizef.Width)?/?2
Dim?top?As?Single?=?(PictureBox1.Height?-?sizef.Height)?/?2
g.DrawString(info,?font,?nBrush,?left,?top)
g?=?PictureBox1.CreateGraphics
g.DrawImage(bmp,?0,?0)
g?=?Nothing
bmp?=?Nothing
End?Sub
Private?Sub?Button1_Click(ByVal?sender?As?System.Object,?ByVal?e?As?System.EventArgs)?Handles?Button1.Click
Dim?font?As?New?Font("宋體",?16)
Dim?g?=?PictureBox1.CreateGraphics
Dim?str?As?String?=?"a001"
Dim?x?As?Integer?=?(PictureBox1.Size.Width?-?g.MeasureString(str,?font).Width)?/?2?'文字居中
Dim?y?As?Integer?=?0
Dim?nBrush?As?New?SolidBrush(Color.Turquoise)
g.FillRectangle(nBrush,?0,?0,?PictureBox1.Size.Width,?g.MeasureString(str,?font).Height)
nBrush?=?New?SolidBrush(Color.Red)
g.DrawString(str,?font,?nBrush,?x,?y)
g?=?Nothing
End?Sub
文章題目:vb.net繪圖添加文字 vbnet畫(huà)圖插件
URL地址:http://chinadenli.net/article22/ddopscc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供ChatGPT、標(biāo)簽優(yōu)化、響應(yīng)式網(wǎng)站、、虛擬主機(jī)、網(wǎng)站策劃
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)