Pages

Pages

Sunday, May 22, 2011

Saturday, May 14, 2011

Saturday, May 7, 2011

Thursday, May 5, 2011

PROGRAMMING VB 6.0

WELCOME TO PROGRAMMING APPLICATION:

CODING FOR WELCOME TO PROGRAMMING APPLICATION:

Private Sub cmdalign_Click()

lblfirst.Alignment = 2

End Sub

Private Sub cmdblue_Click()

lblfirst.ForeColor = vbBlue

lblfirst.BackColor = vbYellow

End Sub

Private Sub cmdchange_Click()

lblfirst.Caption = "WELCOME TO PROGRAMMING"

End Sub

Private Sub cmderase_Click()

lblfirst.Caption = " "

End Sub

Private Sub cmdfontx_Click()

lblfirst.FontSize = 24

End Sub

Private Sub cmdred_Click()

lblfirst.ForeColor = vbRed

lblfirst.BackColor = vbBlack

End Sub

KEY TRAPPING APPLICATION:

CODING FOR KEY TRAPPING APPLICATION:

Option Explicit

Dim customername As Variant

Dim deposit As Variant

Dim Interest As Variant

Dim Months As Variant

Dim Final As Variant

Private Sub cmdcompute_Click()

customername = Val(txtName.Text)

deposit = Val(txtDeposit.Text)

Interest = Val(txtInterest.Text)

Months = Val(txtMonths.Text)

End Sub

Private Sub cmdExit_Click()

End

End Sub

Private Sub txtDeposit_KeyPress(Index As Integer, KeyAscii As Integer)

If KeyAscii >= vbKey0 And KeyAscii <= vbKey9 Or KeyAscii = vbKeyBack Then

Exit Sub

Else

KeyAscii = 0

Beep

End If

End Sub

Private Sub txtName_Keypress(KeyAscii As Integer)

If KeyAscii >= vbKeyA And KeyAscii <= vbKeyZ Or KeyAscii = vbKeyBack Then

Exit Sub

Else

KeyAscii = 0

Beep

End If

End Sub