Visual Basic.NET - Bloqueo de ComboBox

 
Vista:

Bloqueo de ComboBox

Publicado por Sebastian Alonso (4 intervenciones) el 04/01/2024 20:18:07
En este codigo se encuentran los comodines para bloquear la comboBox y realizar las conversiones

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
        ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
        If ComboBox1.Text = "Ton/H" Then
            RZ1 = Val(TextBox1.Text) / 60
        ElseIf ComboBox1.Text = "Ton/min" Then
            RZ1 = Val(TextBox1.Text)
        ElseIf ComboBox1.Text = "Kg/H" Then
            RZ1 = Val(TextBox1.Text) / 54430
        ElseIf ComboBox1.Text = "Kg/min" Then
            RZ1 = Val(TextBox1.Text) / 1000
        ElseIf ComboBox1.Text = "Lb/h" Then
            RZ1 = Val(TextBox1.Text) / 120000
        ElseIf ComboBox1.Text = "Lb/min" Then
            RZ1 = Val(TextBox1.Text) / 2000
        ElseIf ComboBox1.Text = "Oz/h" Then
            RZ1 = Val(TextBox1.Text) / 0.00000192
        ElseIf ComboBox1.Text = "Oz/min" Then
            RZ1 = Val(TextBox1.Text) / 32000
        End If
    End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder