home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic .NET - Read Less - Learn More / Visual_Basic.NET_Read_Less_Learn_More_Richard_Bowman_Visual_2002.iso / Resources / Code / Ch6-DrawACurve / Form1.vb < prev   
Text File  |  2001-08-02  |  2KB  |  59 lines

  1. Public Class Form1
  2.     Inherits System.Windows.Forms.Form
  3.  
  4. #Region " Windows Form Designer generated code "
  5.  
  6.     Public Sub New()
  7.         MyBase.New()
  8.  
  9.         'This call is required by the Windows Form Designer.
  10.         InitializeComponent()
  11.  
  12.         'Add any initialization after the InitializeComponent() call
  13.  
  14.     End Sub
  15.  
  16.     'Form overrides dispose to clean up the component list.
  17.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  18.         If disposing Then
  19.             If Not (components Is Nothing) Then
  20.                 components.Dispose()
  21.             End If
  22.         End If
  23.         MyBase.Dispose(disposing)
  24.     End Sub
  25.  
  26.     'Required by the Windows Form Designer
  27.     Private components As System.ComponentModel.Container
  28.  
  29.     'NOTE: The following procedure is required by the Windows Form Designer
  30.     'It can be modified using the Windows Form Designer.  
  31.     'Do not modify it using the code editor.
  32.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  33.         '
  34.         'Form1
  35.         '
  36.         Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
  37.         Me.ClientSize = New System.Drawing.Size(292, 273)
  38.         Me.Name = "Form1"
  39.         Me.Text = "Form1"
  40.  
  41.     End Sub
  42.  
  43. #End Region
  44.  
  45.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  46.  
  47.     End Sub
  48.  
  49.     Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
  50.         Dim myPen As New Pen(Color.Red, 6)
  51.         e.Graphics.DrawPie(myPen, _
  52.             New Rectangle(10, 10, 100, 100), _
  53.             45, 125)
  54.         Dim pts() As Point = {New Point(200, 10), _
  55.             New Point(250, 40), New Point(150, 90)}
  56.         e.Graphics.DrawCurve(myPen, pts)
  57.     End Sub
  58. End Class
  59.