当前位置:首页 » 图片效果 » vb图片怎样显示字符
扩展阅读
用word文档怎样插入配图 2024-09-08 12:46:49
怎样清洗白衣服锈斑 2024-09-08 12:46:37
如何分析亏损原因范文 2024-09-08 12:31:52

vb图片怎样显示字符

发布时间: 2024-05-27 19:01:28

Ⅰ 姹傚ぇ绁炴寚镣箆b.net PictureBox1 涓婇溃镐庝箞鏄剧ず鏂囧瓧锻 瑕佹渶灏忓寲鍦ㄨ缮铡熶篃涓崭细鍙樼殑闾g

VB.NET鍦≒icTureBox鎺т欢閲屾樉绀烘枃链锛屼技涔庡苟涓岖亩鍗曪纴璇曡瘯杩欐典唬镰侊纴镊宸辩悽纾ㄤ竴涓嬶细
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
Dim format1 As New StringFormat(StringFormatFlags.NoClip) '灏佽呮枃链甯冨眬淇℃伅锛埚傚归绨銆佹枃瀛楁柟钖戝拰 Tab 锅滈潬浣嶏级
format1.LineAlignment = StringAlignment.Center '鍨傜洿灞呬腑
format1.Alignment = StringAlignment.Center '姘村钩灞呬腑

Dim MyFont As New Font("瀹嬩綋", 12, FontStyle.Regular)
Dim displayRectangle As New Rectangle() '瀛桦偍涓缁勬暣鏁帮纴鍏卞洓涓锛岃〃绀轰竴涓鐭╁舰镄勪綅缃鍜屽ぇ灏

displayRectangle = New Rectangle(New Point(20, 20), New Size(200, 100))
e.Graphics.DrawString("娆㈣繋浣跨敤VB Net", MyFont, Brushes.Black, RectangleF.op_Implicit(displayRectangle), format1) '鏄剧ず鍗曞厓镙奸噷镄勬枃链

End Sub