早安社区
我想在表单的中心准确地绘制一个矩形。另外,我想在这个矩形下画一些文字。
对于我认为没有问题的文本,我使用以下代码:
Dim sf As New StringFormat
sf.LineAlignment = StringAlignment.Center
sf.Alignment = StringAlignment.Center
' Line with the problem
e.Graphics.FillRectangle(Brushes.Beige, CInt(Local_Form.Width / 2), CInt(Local_Form.Height / 2), 200, 100)
e.Graphics.DrawString(Local_Text, _
New Font(MyCloud.Settings.Settings_Forms.Font.Name, 30), _
Brushes.GreenYellow, _
Local_Form.Width / 2, Local_Form.Height / 2, sf)
但是,我对矩形有问题。有人可以帮助我吗?