Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
a = InputBox("Enter first value", "first value")
b = InputBox("Enter second value", "second value")
If a > b Then
MsgBox ("First value is greater")
Else
MsgBox ("Second value is greater")
End If
End Sub
Posted by: Wasim Javed
Understand All about Windows 7 Tips and Tricks, Fashion,Technology, Sports, Games,Windows 8 ,Computer Science ,Essay ,Application and more useful content here, Simply to Read and Enjoy it.
Feed Headline Animator
Math Calculation Project.
Private Sub cmdclear_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End Sub
Private Sub cmdclos_Click()
Unload Me
End Sub
Private Sub cmdmulti_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub
Private Sub cmdsum_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub
Posted by: Wasim Javed
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End Sub
Private Sub cmdclos_Click()
Unload Me
End Sub
Private Sub cmdmulti_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub
Private Sub cmdsum_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub
Posted by: Wasim Javed
Labels:
Visual Basic Programming
WAP to multiply the two integers
Private Sub Command1_Click()
Dim a, b, c As Integer
a = InputBox("Enter 1st value", "input box")
b = InputBox("Enter 2nd value", "input box")
c = a * b
MsgBox a & "*" & b & "=" & c, -0, "Multiplication"
End Sub
Posted by: Wasim Javed
Dim a, b, c As Integer
a = InputBox("Enter 1st value", "input box")
b = InputBox("Enter 2nd value", "input box")
c = a * b
MsgBox a & "*" & b & "=" & c, -0, "Multiplication"
End Sub
Posted by: Wasim Javed
Labels:
Visual Basic Programming
WAP to print a messege on the screen
Private Sub Command1_Click()
MsgBox "Testing messege", vbOKCancel + -vbExclamation, "messege box
window”
End Sub
Posted by: Wasim Javed
MsgBox "Testing messege", vbOKCancel + -vbExclamation, "messege box
window”
End Sub
Posted by: Wasim Javed
Labels:
Visual Basic Programming
WAP to find Hide/Show forms
Private Sub Command1_Click()
Form2.Show vbModeless
End Sub
Private Sub Command2_Click()
Form3.Show vbModeless
End Sub
Posted by: Wasim Javed
Form2.Show vbModeless
End Sub
Private Sub Command2_Click()
Form3.Show vbModeless
End Sub
Posted by: Wasim Javed
Labels:
Visual Basic Programming
WAP to find the got focus and lost focus
Private Sub Command1_GotFocus()
Command1.Caption = "Got Focus"
End Sub
Private Sub Command1_LostFocus()
Command1.Caption = "Lost Focus"
End Sub
Private Sub Command2_GotFocus()
Command2.Caption = "Got Focus"
End Sub
Private Sub Command2_LostFocus()
Command2.Caption = "Lost Focus"
End Sub
Private Sub Command3_GotFocus()
Command3.Caption = "Got Focus"
End Sub
Private Sub Command3_LostFocus()
Command3.Caption = "Lost Focus"
End Sub
Posted by: Wasim Javed
Command1.Caption = "Got Focus"
End Sub
Private Sub Command1_LostFocus()
Command1.Caption = "Lost Focus"
End Sub
Private Sub Command2_GotFocus()
Command2.Caption = "Got Focus"
End Sub
Private Sub Command2_LostFocus()
Command2.Caption = "Lost Focus"
End Sub
Private Sub Command3_GotFocus()
Command3.Caption = "Got Focus"
End Sub
Private Sub Command3_LostFocus()
Command3.Caption = "Lost Focus"
End Sub
Posted by: Wasim Javed
Labels:
Visual Basic Programming
WAP to find the events
Private Sub Form_Click()
Form1.Caption = "Form was clicked"
End Sub
Private Sub Form_DblClick()
Form1.Caption = "Form was double clicked"
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Form1.Caption = "Key was press on keyboard"
End Sub
Posted by: Wasim Javed
Form1.Caption = "Form was clicked"
End Sub
Private Sub Form_DblClick()
Form1.Caption = "Form was double clicked"
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Form1.Caption = "Key was press on keyboard"
End Sub
Posted by: Wasim Javed
Labels:
Visual Basic Programming
Subscribe to:
Posts (Atom)