Martes, Agosto 30, 2011

code in how to covert in celsius to fahrenheit

If Me.txtpassword.Text = "labqiuz" And Me.txtusername.Text = "weng_lorenz@yahoo.com" Then
            MsgBox("you may now proceed")
            Me.lblusername.Visible = False
            Me.lblpassword.Visible = False
            Me.txtusername.Visible = False
            Me.txtpassword.Visible = False
            Me.BTNLOGIN.Visible = False
            Me.btncancel.Visible = False
            Me.lblwelcome.Visible = True
            Me.btnclick.Visible = True
            Me.lblleovelyn.Visible = True
            Me.lblleovelyn.Text = Me.txtusername.Text
        ElseIf txtpassword.Text = "" And txtusername.Text = "" Then
            MsgBox("please enter your username and password")

        Else

            MsgBox("sorry, but you've entered incorrect username and password")
        End If


Private Sub btnconvert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnconvert.Click
celsius to fahrenheit:
        lblfah.Text = 9 / 5 * (Val(txtcelsius.Text)) + 32

        Me.lblfahrenheit.Visible = True
        Me.lblfah.Visible = True


Private Sub btncon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncon.Click
fahrenheit to celsius:
        lblfahblank.Text = (txtfahrenheit.Text - 32) * 5 / 9
        Me.lblcelsius.Visible = True
        Me.lblfahblank.Visible = True
    End Sub
btn retry:
  Me.lblfah.Visible = False
        Me.lblfahrenheit.Visible = False
      
        Me.txtcelsius.Text = ""

    End Sub
btn retry:
  Me.lblfahblank.Visible = False
        Me.lblcelsius.Visible = False
        Me.txtfahrenheit.Text = ""
 End Sub

Walang komento:

Mag-post ng isang Komento