Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27034

VS 2008 Help (Conversion from string "" to type 'Double' is not valid.)

$
0
0
welcome all,
I am just starting learning vb.net version 2008
I am trying this code to do program to calculate the area of shapes

an error occur when starting program.the error is (Conversion from string "" to type 'Double' is not valid.)

this is code which i used it
PHP Code:

Public Class Form1
    Dim area 
As Double
    Dim Diameter 
As Double
    Dim length 
As Double
    Dim wide 
As Double
    Dim height 
As Double
    Dim base 
As Double
    
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.ObjectByVal e As System.EventArgsHandles RadioButton1.CheckedChanged
        TextBox1
.Visible True
        TextBox2
.Visible False
        TextBox3
.Visible False
        TextBox4
.Visible False
        TextBox5
.Visible False
    End Sub

    
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.ObjectByVal e As System.EventArgsHandles RadioButton2.CheckedChanged
        TextBox1
.Visible False
        TextBox2
.Visible True
        TextBox3
.Visible True
        TextBox4
.Visible False
        TextBox5
.Visible False
    End Sub

    
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.ObjectByVal e As System.EventArgsHandles RadioButton3.CheckedChanged
        TextBox1
.Visible False
        TextBox2
.Visible False
        TextBox3
.Visible False
        TextBox4
.Visible True
        TextBox5
.Visible True
    End Sub

    
Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click
        Diameter 
TextBox1.Text
        length 
TextBox2.Text
        wide 
TextBox3.Text
        height 
TextBox4.Text
        wide 
TextBox5.Text

        
If RadioButton1.Checked True Then
            area 
= (Diameter 2) * 3.14 4
        
ElseIf RadioButton2.Checked True Then
            area 
length wide
        
ElseIf RadioButton3.Checked True Then
            area 
height base 0.5
        End 
If
        
Label6.Text CStr(area)
    
End Sub
End 
Class 

pleas help me

Viewing all articles
Browse latest Browse all 27034

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>