WINCE 中 VBNET 或C# 怎样在窗体上画线

帮帮你我她 2011-11-28 09:55:40
WINCE 中 VBNET 或 C# 怎样在窗体上画线
请给出例子
...全文
63 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
帮帮你我她 2011-11-28
  • 打赏
  • 举报
回复
或者是这样也行


Private Sub Panel1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
Dim redPen As New Pen(Color.Red, 3) '红色宽度3
e.Graphics.DrawLine(redPen, 50, 50, 100, 25)
End Sub
帮帮你我她 2011-11-28
  • 打赏
  • 举报
回复
只找到下面的可用在WINCE上,楼上的做法,请给出例子好吗?


Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
Dim redPen As New Pen(Color.Red, 3) '红色宽度3
Dim point1 As New Point(50, 50)
Dim point2 As New Point(100, 25)
' Dim point3 As New Point(200, 5)
' Dim point4 As New Point(250, 50)
' Dim point5 As New Point(300, 100)
' Dim point6 As New Point(350, 200)
' Dim point7 As New Point(250, 250)
' Dim curvePoints As Point() = {point1, point2, point3, point4,point5, point6, point7}
Dim curvePoints As Point() = {point1, point2}
e.Graphics.DrawLines(redPen, curvePoints)
End Sub

Private Sub Panel1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
Dim redPen As New Pen(Color.Red, 3) '红色宽度3
Dim point1 As New Point(50, 50)
Dim point2 As New Point(100, 25)
Dim curvePoints As Point() = {point1, point2}
e.Graphics.DrawLines(redPen, curvePoints)
End Sub
godqu 2011-11-28
  • 打赏
  • 举报
回复
想直接在窗体时划线,重写onPaint就行,在onPaint直接用drawLine就可以画了

19,500

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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