utilizar o ponto ao inves da virgula
é o seguinte tenho este código, só que estou com um problema
eu quando coloco 6.8 no dc e carrego no calcular ele dá 421--->está errrado.
mas quando colo 6,8 e dá os parametros certos..2500--->parâmetros certos--->com a virgula funciona bem
existe alguma forma,de colocar ela a funcionar, pelo ponto
Dim você As Integer = 90000
Const Pi As Double = 3.14159265358979
Dim Dc As Decimal
Dim rotaMaxima As Decimal
Dim Rot As Decimal
Dim avanco As Decimal
Dim texts As Decimal
texts = txt_Rotacao.Text
Dc = txt_diametro.Text
rotaMaxima = txt_Rotacao.Text
Rot = você / Pi / Dc
If Dc >= 4 And Dc < 6 Then
avanco = Rot * 0.12
ElseIf Dc >= 6 And Dc < 8 Then
avanco = Rot * 0.15
ElseIf Dc >= 8 And Dc < 10 Then
avanco = Rot * 0.17
ElseIf Dc >= 10 And Dc < 12 Then
avanco = Rot * 0.2
ElseIf Dc >= 12 And Dc < 14 Then
avanco = Rot * 0.22
ElseIf Dc >= 14 And Dc < 16 Then
avanco = Rot * 0.23
ElseIf Dc >= 16 And Dc < 100 Then
avanco = Rot * 0.25
Else
MsgBox("Parâmetros indisponíveis", 64, "Parâmetros indisponíveis")
Exit Sub
End If
rotaMaxima = rotaMaxima * avanco / Rot
If texts < Rot Then
MessageBox.Show("Atenção rotação Superior ao limite,os valores vao ser ajustados" & vbCrLf & "A rotação é: " & texts.ToString("F0") & vbCrLf & "O avanço é: " & rotaMaxima.ToString("F0"), "Parâmetros de corte")
ElseIf texts > Rot Then
MessageBox.Show("Parametros Originais" & vbCrLf & "A rotação é: " & Rot.ToString("F0") & vbCrLf & "O avanço é: " & avanco.ToString("F0"), "Parâmetros de corte")
End If
End Sub
Private Sub Multiplex_MD_1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Retr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Retr.Click
Moldit_Programa.Show()
Me.Close()
End Sub
Private Sub Sair_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Sair.Click
Close()
End Sub
Private Sub txt_Rotacao_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_Rotacao.TextChanged
End Sub
Private Sub txt_diametro_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_diametro.TextChanged
End Sub
Private Sub Rot_Maxima_Click(sender As System.Object, e As System.EventArgs) Handles Rot_Maxima.Click
End Sub
End Class
Discussão (9)
Carregando comentários...