google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.

Saturday, July 20, 2013

Visual Basic Examples


Program 1:- To create Visual Basic application to find the area of rectangle.


Code:-
 Private Sub Command1_Click() Text3.Text = Text1.Text * Text2.Text End Sub

Private Sub Command2_Click()

Text1.Text = " " Text2.Text = " " Text3.Text = " " End Sub


/*************************Output**************************/





Program 2:- To create Visual Basic application to average of 3 numbers.
Design Window:-

Code:-

Private Sub Command1_Click()

Text4.Text = Str((Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text)) / 3)

End Sub

Private Sub Command2_Click()

Text1.Text = " "

Text2.Text = " "

Text3.Text = " "

Text4.Text = " "

End Sub

Private Sub Command3_Click()

Unload Me

End Sub


/*************************Output**************************/



Program 3: To create Visual Basic application to illustrate Date-Time functions.

Code:-

Private Sub Command1_Click ()

Text1.Text = Date

Text2.Text = Time ()

Text3.Text = Year (Date)

Text4.Text = Month (Date)

End Sub

/*************************Output**************************/



Program 4:-To create Visual Basic application program to find maximum number among two numbers.

Code:-

Private Sub Command1_Click ()

Dim a As Integer

Dim b As Integer

a = Val(Text1.Text)

b = Val(Text2.Text)

If (a > b) Then

        Label3.Caption = "a is maximum number"

Else

        Label3.Caption = "b is maximum number"

End If

End Sub


/*************************Output**************************/

Program 5:-To create Visual Basic application program to perform arithmetic operations with the use of Option button.

Code:

Private Sub Option1_Click ()

Text3.Text = Val (Text1.Text) + Val (Text2.Text)

End Sub

Private Sub Option2_Click ()

Text3.Text = Val (Text1.Text) - Val (Text2.Text)

End Sub

Private Sub Option3_Click ()

Text3.Text = Val (Text1.Text) * Val (Text2.Text)

End Sub

Private Sub Option4_Click ()

Text3.Text = Val (Text1.Text) / Val (Text2.Text)

End Sub


/*************************Output**************************/



Saturday, July 13, 2013

Qiuz Try It

Quiz :-

1. What does HTML stand for?
Hyper Text Markup Language
Home Tool Markup Language
Hyperlinks and Text Markup Language


2. Who is making the Web standards?
Google
The World Wide Web Consortium
Microsoft


3.Choose the correct HTML tag for the smallest heading:-
<h6>
<heading>
<h1>


4. What is the correct HTML tag for drawing horizontal line?
<lb>
<br>
<hr>


5.Inside which HTML element do we put the JavaScript?
<script>
<js>
<javascript>


6What is the correct JavaScript syntax to write "Hello World"?
response.write("Hello World");
document.write("Hello World");
echo "Hello World";


7.Where is the correct place to insert a JavaScript?
Both the <head> section and the <body> section are correct
The <head> section
The <body> section


8.C++ is which language?
Object - Oriented Programming Language
Procedure Oriented Programming Language
Both the above


9.The Size of char is _____ bits.
1
4
8


10._____ is unary operator.
+
++
-


11.int is ______ data type
derived
built-in
user-defined



अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...