
正文
vb.net在控件上绘图 vb怎么添加图像控件
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
请高手解答:如何在vb.net中的webbrowser控件中绘图
webbrowser是不断刷新的。就算vb.net在控件上绘图你绘了图vb.net在控件上绘图,那个位置马上又被刷新为原来的样子,所以此路不通。
可不可以这样变通:
把你的图片制作好,然后在htm文件中引用它,最后通过webbrowser显示。
相关问答
Q1: vb.net画图控件如何画三角网图形?
Imports System.Drawing
Imports System.Drawing.Drawing2D
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim g As Graphics = PictureBox1.CreateGraphics
Dim hs As HatchStyle = HatchStyle.Cross
Dim sb As HatchBrush = New HatchBrush(hs, Color.Black, Color.White)
Dim p(3) As Point
p(0).X = 100
p(0).Y = 50
p(1).X = 0
p(1).Y = 100
p(2).X = 200
p(2).Y = 100
p(3).X = 100
p(3).Y = 50
g.FillPolygon(sb, p)
g.DrawPolygon(Pens.Black, p)
End Sub
End Class
Q2: vb.net中怎么用数据库中的数据和chart控件画图啊
微软上有Microsoft Chart控件的示例程序,非常详细,一看就会。
但我微软站上的刚没找到,这里找到一个
Q3: 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
Q4: vb.net中有没有哪个控件可以自定义形状(如圆形,多边形)和颜色,如果有,希望你您给出代码
记得VB6当中有Shape控件,但是VB.net里这个控件不存在了。
提个思路:使用Picture控件或Label控件,通过代码在控件里绘图想要的图形,可以试试。
关于vb.net在控件上绘图和vb怎么添加图像控件的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。






