请高手解答:如何在vb.net中的webbrowser控件中绘图

rockman_qp 2008-09-11 09:04:55
比如在webbrowser中绘制一个点或一条线之类的

Private Sub DrawMap(ByVal CurrentPos As Integer)

Dim penBrush As Brush = New SolidBrush(Color.Black)
Dim blackThinPen As New Pen(Color.Red)
Dim curPoint As Point

curPoint = GetMapCoordinate(CurrentPos)
blackThinPen.Width = 6

Dim graphic As Graphics = WebBrowser1.CreateGraphics()

graphic.DrawLine(blackThinPen, curPoint.X, curPoint.Y, LastPoint.X, LastPoint.Y)
graphic.DrawEllipse(blackThinPen, curPoint.X, curPoint.Y, 6, 6)
graphic.DrawEllipse(blackThinPen, 50, 100, 9, 9)

End Sub


3条语句都没有效果,望热心人指点,不胜感激
...全文
62 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

16,717

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧