| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 513 人关注过本帖
标题:【请教】无效参数问题
只看楼主 加入收藏
timeme100
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-9-15
收藏
 问题点数:0 回复次数:0 
【请教】无效参数问题
在PictureBox绘图中显示了无效参数的问题,g.DrawLines(mpen, Points) 部分是出错的地方,请问怎样解决?
谢谢
程序代码:
[color=#0000FF]Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        


    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim y As Single
        Dim x As Single
        Dim g As Graphics = Me.PictureBox1.CreateGraphics
        Dim mpen As New Pen(Color.Red)
        Dim array As New List(Of PointF)
        Dim Points As PointF()
        'g.Clear(Color.Black)

        Randomize()
        y = 200 * Rnd()
        array.Add(New PointF(x, y))
        Points = array.ToArray
        g.DrawLines(mpen, Points)
        x = x + 1
    End Sub
End Class

[/color]




[ 本帖最后由 timeme100 于 2010-9-15 18:54 编辑 ]
搜索更多相关主题的帖子: 参数 
2010-09-15 18:51
快速回复:【请教】无效参数问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014220 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved