Martes, Agosto 30, 2011

codes visual basic



    Private Sub btnLOGIN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLOGIN.Click
        If Me.txtPASSWORD.Text = "labquiz" And 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.lblcath.Visible = True
            Me.lblcath.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")




celsius and fahreneit codes:




Public Class Form2

    Private Sub btnCCONVERT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCCONVERT.Click
        lblfah.Text = 9 / 5 * (Val(txtCELSIUS.Text)) + 32

        Me.lblfahrenheit.Visible = True
        Me.lblfah.Visible = True
    End Sub

    Private Sub btnFCONVERT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFCONVERT.Click
        lblfahblank.Text = (txtFAHRENHEIT.Text - 32) * 5 / 9

        Me.lblcelsius.Visible = True
        Me.lblfahblank.Visible = True

    End Sub

    Private Sub txtFAHRENHEIT_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtFAHRENHEIT.TextChanged

    End Sub

    Private Sub btnFRETRY_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFRETRY.Click

        Me.lblfahblank.Visible = False
        Me.lblcelsius.Visible = False
        Me.txtFAHRENHEIT.Text = ""

    End Sub

    Private Sub btnCRETRY_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCRETRY.Click

        Me.lblfah.Visible = False
        Me.lblfahrenheit.Visible = False

        Me.txtCELSIUS.Text = ""
    End Sub
End Class





Walang komento:

Mag-post ng isang Komento