Problemen met mijn MessageBox.Show (overload resolution failed because...?)

Status
Niet open voor verdere reacties.

WhatIfElse

Nieuwe gebruiker
Lid geworden
24 nov 2012
Berichten
4
Zelf ben ik de syntaxis bijna, maar één foutje is erin geslopen en niks werkt daardoor. Ik weet echt niet waar het de mist inloopt.

Opdracht:
Goniometrie: afstand tussen de hoek A en de hoek B berekenen, in radialen.

Code:
Public Class frmLandmeter
    Const cdblBasis As Double = 10.0R
    Const cintWaarde As Integer = 180
    Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
        Dim dblHoekA, dblHoekC, dblHoekARad, dblHoekCRad, dblAfstand As Double,
        strConclusie As String

        dblHoekA = Double.Parse(txtHoekA.Text)
        dblHoekC = Double.Parse(txtHoekC.Text)
        dblHoekARad = dblHoekA * Math.PI / cintWaarde
        dblHoekCRad = dblHoekC * Math.PI / cintWaarde
        dblAfstand = cdblBasis * Math.Sin(dblHoekCRad) / Math.Sin(dblHoekARad + dblHoekCRad)

        strConclusie = ("De afstand is " & dblAfstand)
        [COLOR="#00FF00"]MessageBox.Show[/COLOR] = (strConclusie) ')' "Resultaat")

    End Sub
End Class

Fout:
Overload resolution failed because no accessible 'Show' accepts this number of arguments.



In de bijlage zit het formulier, dat ziet er al puik uit. Wat jammer van die ene fout want kan het echt niet in execution brengen. Iemand?:p

ScreenHunter_25 Nov. 24 16.44.jpg


OPGELOST

Code:
Public Class frmLandmeter

    Const cdblBasis As Double = 10.0R
    Const cintWaarde As Integer = 180


    Private Sub btnStart_Click(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) Handles btnStart.Click
        Dim dblHoekA, dblHoekC, dblHoekARad, dblHoekCRad, dblAfstand As Double,
        strConclusie As String

        dblHoekA = Double.Parse(txtHoekA.Text)
        dblHoekC = Double.Parse(txtHoekC.Text)
        dblHoekARad = dblHoekA * Math.PI / cintWaarde
        dblHoekCRad = dblHoekC * Math.PI / cintWaarde
        dblAfstand = cdblBasis * Math.Sin(dblHoekCRad) / Math.Sin(dblHoekARad + dblHoekCRad)

        strConclusie = ("De afstand is " & dblAfstand)
        MessageBox.Show(strConclusie, "Resultaat")

    End Sub
End Class
 
Laatst bewerkt:
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan