Professional Documents
Culture Documents
g.Clear(Color.Black)
g.DrawLine(Pens.Gray, 0, intYOrigin, PicDraw.Width, intYOrigin) 'draw x-axis
g.DrawLine(Pens.Gray, intXOrigin, 0, intXOrigin, PicDraw.Height) 'draw y-axis
g.DrawString("(0, 0)", myfont, Brushes.Green, intXOrigin, intYOrigin) 'add label to origin
If blnPlot = False Then
g.DrawString("This program plots the general function" _
& vbNewLine & "y = (Cx)^(1/N)" _
& vbNewLine & "Please input the appropirate values of C and N" _
& vbNewLine & "to the respective textboxes", myfont, Brushes.Green, 0, 0) 'add
instruction
Else
g.DrawString("graph of the function" _
& vbNewLine & "y = (" & sngC & "x)^(1/" & sngN & ")", _
myfont, Brushes.Green, 0, 0) 'adds function label to the graph
End If
End Sub
Private Sub Form1_Resize(sender As Object, e As System.EventArgs) Handles Me.Resize
PicDraw.Refresh() 'for resizing
End Sub