Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    3

    Unanswered: Help with errors in Visual Studio

    I am working on a project for school and I am encoutering several errors in my code relating to the numeric up down boxes I have in the application. I have inserted my code and the error list below. If anyone could help me I would really appreciate it. I am new to VB and really need a little help. Any help anyone cold provide would be greatly appreciated.
    Thanks in advance!

    Code:
    Public Class Form1

    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    txtAnswer.Clear()
    End Sub

    Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    Close()

    End Sub

    Private Sub rbtnPythag_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtnPythag.CheckedChanged
    'Step 1'
    Dim decInput1 As Decimal
    Dim decInput2 As Decimal
    Dim decAnswer As Decimal
    'Step 2'
    decInput1 = (Me.nudInput1.numericupdown)
    decInput2 = CInt(Me.nudInput2.numericupdown)
    decAnswer = CInt(Me.txtAnswer.Text)
    'Step 3'
    txtAnswer = NumericUpDown.nudInput1 ^ 2 * NumericUpDown.nudInput2 ^ 2
    'Step 4'
    Me.txtAnswer.Text = decAnswer

    End Sub

    Private Sub rbtnCylinder_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtnCylinder.CheckedChanged
    'Step 1'
    Dim decInput1 As Decimal
    Dim decInput2 As Decimal
    Dim decAnswer As Decimal
    'Step 2'
    decInput1 = (Me.nudInput1.numericupdown)
    decInput2 = CInt(Me.nudInput2.numericupdown)
    decAnswer = CInt(Me.txtAnswer.Text)
    'Step 3'
    txtAnswer = NumericUpDown.nudInput1 ^ 2 * NumericUpDown.nudInput2 * 3.14
    'Step 4'
    Me.txtAnswer.Text = decAnswer
    End Sub
    End Class

    Error List
    Error 1 'numericupdown' is not a member of 'System.Windows.Forms.NumericUpDown'. C:\Documents and Settings\Administrator\Desktop\Advanced_math.zip\A dvanced_math\Advanced_math\Form1.vb 18 22 Advanced_math
    Error 2 'numericupdown' is not a member of 'System.Windows.Forms.NumericUpDown'. C:\Documents and Settings\Administrator\Desktop\Advanced_math.zip\A dvanced_math\Advanced_math\Form1.vb 19 26 Advanced_math
    Error 3 'nudInput1' is not a member of 'System.Windows.Forms.NumericUpDown'. C:\Documents and Settings\Administrator\Desktop\Advanced_math.zip\A dvanced_math\Advanced_math\Form1.vb 22 21 Advanced_math
    Error 4 'nudInput2' is not a member of 'System.Windows.Forms.NumericUpDown'. C:\Documents and Settings\Administrator\Desktop\Advanced_math.zip\A dvanced_math\Advanced_math\Form1.vb 22 51 Advanced_math
    Error 5 'numericupdown' is not a member of 'System.Windows.Forms.NumericUpDown'. C:\Documents and Settings\Administrator\Desktop\Advanced_math.zip\A dvanced_math\Advanced_math\Form1.vb 34 22 Advanced_math
    Error 6 'numericupdown' is not a member of 'System.Windows.Forms.NumericUpDown'. C:\Documents and Settings\Administrator\Desktop\Advanced_math.zip\A dvanced_math\Advanced_math\Form1.vb 35 26 Advanced_math
    Error 7 'nudInput1' is not a member of 'System.Windows.Forms.NumericUpDown'. C:\Documents and Settings\Administrator\Desktop\Advanced_math.zip\A dvanced_math\Advanced_math\Form1.vb 38 21 Advanced_math
    Error 8 'nudInput2' is not a member of 'System.Windows.Forms.NumericUpDown'. C:\Documents and Settings\Administrator\Desktop\Advanced_math.zip\A dvanced_math\Advanced_math\Form1.vb 38 51 Advanced_math
    Last edited by shep0902; 03-16-09 at 18:10.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you are more likely to get an answer to a pure application languge question on a forum that deals with that language. This forum is more about databases and interacting with databases.

    mind you you would get more out of the exercise if you approached your fellow pupils/students or you teacher/lecturer
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    re

    in step 2 you say: decInput1 = (Me.nudInput1.numericupdown)

    your controlename = nudInput1
    the value in that controle you try to put in variable decInput1

    the error states : numericupdown' is not a member of 'System.Windows.Forms.NumericUpDown

    wuch means that numericupdown isn't a valid property of your controle.
    i think you ment to use the value.

    same is with all the rest of your err.msg, you used (try to use) the wrong / non existing properties
    Greetz Marvels -^.^-
    Developments : VB4 Through .Net; Basic; DOS ; CNC ; Sinclair
    Databases : SQL Server Through 2005; Access 3 Through 2003 ; Oracle 8 & 9.i ;
    OS : Win 3.11 Through XP ; NortonComander ; DOS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •