Click here to Skip to main content
16,004,991 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Insert Records into Access DB Pin
Dave Kreskowiak19-Nov-07 10:05
mveDave Kreskowiak19-Nov-07 10:05 
GeneralRe: Insert Records into Access DB Pin
culbysl19-Nov-07 10:11
culbysl19-Nov-07 10:11 
AnswerRe: Insert Records into Access DB Pin
deathbat20-Nov-07 13:16
deathbat20-Nov-07 13:16 
Questiontyped vs untyped datasets Pin
imonfiredammit19-Nov-07 7:40
imonfiredammit19-Nov-07 7:40 
AnswerRe: typed vs untyped datasets Pin
Vasudevan Deepak Kumar19-Nov-07 18:34
Vasudevan Deepak Kumar19-Nov-07 18:34 
QuestionStoping a cursor with a collusion code Pin
mykingdomforanewusername19-Nov-07 7:01
mykingdomforanewusername19-Nov-07 7:01 
AnswerRe: Stoping a cursor with a collusion code Pin
Luc Pattyn19-Nov-07 10:04
sitebuilderLuc Pattyn19-Nov-07 10:04 
Questiondrawing a polynomial function using graphics panel Pin
billybobthro19-Nov-07 5:52
billybobthro19-Nov-07 5:52 
Hey guys,

I am trying to create a simple program that will graph a polynomial function.

I have followed a tutorial at about.com, and I ran into a problem while programming. Here is the program so far. I left out the designer generated code. There are two textboxes where the user inputs coefficients for the polynomial, a button that the user presses to draw the graph, and a panel where the graph is drawn. I get an error underlining the New Point under the Button1 Click event that says:

Value of type System.Drawing.Point cannot be converted to System.Drawing.PointF

===========================================================================

Imports System.Drawing.Drawing2D
Imports System.Math
Public Class Form5
Inherits System.Windows.Forms.Form
Dim PolyPoints(100) As PointF
Dim Counter As Integer
Dim P As Pen = New Pen(Color.Crimson, 3)

Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
e.Graphics.DrawCurve(P, PolyPoints)
MyBase.OnPaint(e)

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim G As Integer
Dim H As Integer
G = TextBox1.Text
H = TextBox1.Text

For Counter = 0 To 99
PolyPoints(Counter) = New Point(Counter, G * ((Counter) ^ 2) + H * ((Counter) ^ 3))
Next
Panel1.Refresh()
End Sub

End Class

============================================================================

I am a novice programmer, and this seems to be a very simple problem. Thanks for your help in advance

Sincerely,
B.T.
AnswerRe: drawing a polynomial function using graphics panel Pin
Luc Pattyn19-Nov-07 10:07
sitebuilderLuc Pattyn19-Nov-07 10:07 
GeneralRe: drawing a polynomial function using graphics panel Pin
billybobthro19-Nov-07 10:31
billybobthro19-Nov-07 10:31 
GeneralRe: drawing a polynomial function using graphics panel Pin
Luc Pattyn19-Nov-07 11:32
sitebuilderLuc Pattyn19-Nov-07 11:32 
QuestionGraphics Question Pin
Quecumber25619-Nov-07 3:45
Quecumber25619-Nov-07 3:45 
AnswerRe: Graphics Question Pin
pmarfleet19-Nov-07 9:11
pmarfleet19-Nov-07 9:11 
AnswerRe: Graphics Question Pin
Dave Kreskowiak19-Nov-07 10:07
mveDave Kreskowiak19-Nov-07 10:07 
GeneralRe: Graphics Question Pin
Quecumber25619-Nov-07 10:51
Quecumber25619-Nov-07 10:51 
QuestionComponent to generate pdf or tiff from templates Pin
Nitin198119-Nov-07 1:27
Nitin198119-Nov-07 1:27 
AnswerRe: Component to generate pdf or tiff from templates Pin
DigiOz Multimedia19-Nov-07 8:52
DigiOz Multimedia19-Nov-07 8:52 
GeneralRe: Component to generate pdf or tiff from templates Pin
Nitin198119-Nov-07 19:26
Nitin198119-Nov-07 19:26 
GeneralRe: Component to generate pdf or tiff from templates Pin
DigiOz Multimedia27-Nov-07 6:07
DigiOz Multimedia27-Nov-07 6:07 
QuestionAddint items to a combobox Pin
Dave McCool19-Nov-07 0:36
Dave McCool19-Nov-07 0:36 
AnswerRe: Addint items to a combobox Pin
AliAmjad19-Nov-07 2:49
AliAmjad19-Nov-07 2:49 
GeneralRe: Addint items to a combobox Pin
Luc Pattyn19-Nov-07 10:12
sitebuilderLuc Pattyn19-Nov-07 10:12 
GeneralRe: Addint items to a combobox Pin
Dave McCool20-Nov-07 23:02
Dave McCool20-Nov-07 23:02 
Questionhow 2 send pic with mail plz help! Pin
King of Kingz19-Nov-07 0:13
King of Kingz19-Nov-07 0:13 
AnswerRe: how 2 send pic with mail plz help! Pin
_mubashir19-Nov-07 2:00
_mubashir19-Nov-07 2:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.