
正文
vb.net窗体中绘图 vba窗体画图
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
vb.net窗体绘图问题,Form的Resize事件不能调用以下过程,求解!谢谢
没有问题,可以执行,您是想做下数独吗?好像是数独表格,哈哈
相关问答
Q1: vb.net GDI绘图刷新问题
绘图代码写在Paint事件中,如
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim g As Graphics = Me.CreateGraphics
g.DrawLine(Pens.Red, 100, 100, 200, 100)
End Sub
'方法二:在 PictureBox1上显示图像----图画在Bitmap
PictureBox1.Image = Nothing
Dim wid As Integer = PictureBox1.ClientSize.Width
Dim hgt As Integer = PictureBox1.ClientSize.Height
Dim bm As New Bitmap(wid, hgt)
Dim g As Graphics = Graphics.FromImage(bm)
'画图代码
'画图代码
PictureBox1.Image = bm
PictureBox1.Refresh()
g.Dispose()
Q2: VB.net的 使用画笔在窗体上绘制不同的图形的代码
首先引入System.Drawing和System.Drawing.Drawing2D
自己看得了
这里面说的有的可以填充的,是g.FillXXXX
Q3: 用vb.net怎么在一个窗体内画出一个区域,然后用不同的button来控制这个区域。求帮助。
在不同button单击check事件设置vb.net窗体中绘图你所画区域vb.net窗体中绘图的不同效果属性就好vb.net窗体中绘图了vb.net窗体中绘图!
Q4: vb.net怎么在窗体上绘制文字?
你可以在窗体上放一个lable控件,取名叫lable1,
那么实现方式就是:
private
sub
form_load()
lable1.text="今天天气很好";
end
sub
你可以试试
Q5: VB.net中如何画图?
VB.net与VB不同。
VB.net已经有专门绘图的类。
可以定义笔刷然后用Drawing类中的方法绘制。
Private Sub DrawEllipse()
Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)
Dim formGraphics as System.Drawing.Graphics
formGraphics = Me.CreateGraphics()
formGraphics.DrawEllipse(myPen, New Rectangle(0,0,200,300))
myPen.Dispose()
formGraphics.Dispose()
End Sub
Private Sub DrawRectangle()
Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)
Dim formGraphics as System.Drawing.Graphics
formGraphics = Me.CreateGraphics()
formGraphics.DrawRectangle(myPen, New Rectangle(0,0,200,300))
myPen.Dispose()
formGraphics.Dispose()
End Sub
关于vb.net窗体中绘图和vba窗体画图的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。







