Private Sub GroupBox6_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles GroupBox6.Paint
Dim myPen As New Pen(Color.Red, 8)
Dim g As Graphics
g = Me.CreateGraphics For i As Integer = 0 To 6
g.DrawLine(myPen, GroupBox6.Left, MyControlArray(3 + i * 13).Top + 10, GroupBox6.Left + GroupBox6.Size.Width, MyControlArray(3 + i * 13).Top + 30) Next
End Sub上面是一段我在GroupBox上画线的代码,可是我运行了窗体上看不到我画的线啊,是怎么回事呢?其中:MyControlArray是label控件数组名称
Dim myPen As New Pen(Color.Red, 8)
Dim g As Graphics
g = Me.CreateGraphics For i As Integer = 0 To 6
g.DrawLine(myPen, GroupBox6.Left, MyControlArray(3 + i * 13).Top + 10, GroupBox6.Left + GroupBox6.Size.Width, MyControlArray(3 + i * 13).Top + 30) Next
End Sub上面是一段我在GroupBox上画线的代码,可是我运行了窗体上看不到我画的线啊,是怎么回事呢?其中:MyControlArray是label控件数组名称
解决方案 »
- 自动更新出现win32Exception
- 判断两个椭圆的位置关系
- 谁有软件设计说明文档给我一份,谢谢
- 一个模型的构想求实现方法(欢迎讨论)分数不重要
- 这句怎么写呀,求助
- 我有个ocx组件想用web方式发布,好像要先打包到.cab文件,该怎么做了?
- 请教c#中的全局变量 在线等
- 谁有MSDN for VS.net 2003 的下载地址?
- class A {public static A GetInstance(){}}为什么A的实例不能访问GetInstance?
- 在c#中如何将一个ascii值转换为字符,又如何取得一个字符的ascii值
- Windows窗体如何在订阅的其它类事件中对自己窗体中的Label内容进行改变.
- 如何打开远端服务器建立文件
对VB一窍不通。
g = Me.CreateGraphics
应该是e.什么来着吧
g = e.Graphics