Torna al Thread

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim bm As New Bitmap(Me.PictureBox1.Width, Me.PictureBox1.Height) Dim gr As Graphics = Graphics.FromImage(bm) gr.Clear(Color.Transparent) gr.TranslateTransform(Me.Width / 2, Me.Height / 2) Dim x As Single Dim mPoints As ArrayList = New ArrayList() Dim penna As Pen = New Pen(Color.Red, 5) For x = -100 To 100 mPoints.Add(New Point(x, (x ^ 2))) Next Dim pointArray() As Point = mPoints.ToArray(mPoints(0).GetType()) gr.DrawCurve(penna, pointArray, 1) Me.PictureBox1.Image = bm End Sub
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5