Professional Documents
Culture Documents
End Sub
Private Sub Command3_Click() Text1.Text = "" Text2.Text = "" End Sub Input Window:-
Output Window:-
.. Question 02:Design a form with text box use the multiline and scroll property of the textbox. Display Screen:Code:Input Window:Output Window:-
.. Question 03:Design a form with command button to bring the picture by using style and picture property. Display Screen:Code:Input Window:Output Window:.. Question 04:Add item in the list box by using coding and without coding. a) Select the list property of the list box and add the item. b) Display Screen:Code:Input Window:Output Window:.. Question 05:Write a code for remove item from list box. Display Screen:Code:-
Input Window:Output Window:.. Question 06:Show the current time in the label with the help of times control. Display Screen:Code:Input Window:Output Window:.. Question 07:Design a book sales form take 9 labels, 3 text boxes and 2 command buttons. Calculates the total price, 15% of price and discount price. Display Screen:-
Code:Private Sub Command1_Click() Label8.Caption = Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) Label6.Caption = Label8.Caption - (Label8.Caption * Val(Text4.Text) / 100) End Sub
Private Sub Command4_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Label6.Caption = "" Label8.Caption = "" End Sub
Output Window:-
.. Question 08:Write to print table of any number given by the user. Display Screen:-
Code:Private Sub Command1_Click() For x = 1 To 10 Print Text1.Text * x Next x End Sub Input Window:-
Output Window:-
.. Question 09:-
Write a program for digital clock. Display Screen:Code:Input Window:Output Window:.. Question 10:Write a program to fly a plane(image) through image control and time control. Display Screen:-
Image1.Move Image1.Left + 100, Image1.Top + 30, Image1.Width + 30, Image1.Height + 30 End Sub Output Window:-
End Sub
Private Sub Command12_Click() Op1 = Val(Text1.Text) Opr = "-" Text1.Text = "" End Sub
Private Sub Command13_Click() Op1 = Val(Text1.Text) Opr = "*" Text1.Text = "" End Sub
Private Sub Command15_Click() Op2 = Val(Text1.Text) Select Case Opr Case "+": Text1.Text = Op1 + Val(Text1.Text) Case "*": Text1.Text = Op1 * Val(Text1.Text) Case "-": Text1.Text = Op1 - Val(Text1.Text) Case "/": Text1.Text = Op1 / Val(Text1.Text) End Select End Sub
End Sub
Input Window:-
Output Window:-
.. Question 12:Write steps for creating application in VB using data control. Display Screen:Code:Input Window:Output Window:.. Question 13:Write an application for accessing for creation of report in VB.
Display Screen:Code:Input Window:Output Window:.. Question 14:Design a form to show the working of drive list box, dirlistbox and filelistbox controls. Display Screen:-
End Sub
End Sub
.. Question 15:Print the following pattern. A A B A B C A B C D A B C D E Code:Private Sub Form_Load() Dim x, y As Integer
Form13.Show For x = 65 To 69 For y = 65 To x Print Chr(y); Print (" Next y Print print Next x ");
.. Question 16:Write a program to print factorial of given no. Code:Private Sub Form_Load() Dim a As Integer, fact As Integer Form7.Show a = InputBox("enter a no")
fact = 1 For x = 1 To a a=a-1 fact = fact + (fact * a) Next x Print "the factorial of given no is"; fact End Sub Input Window:-
Output Window:-
.. Question 17:Write a program to final the greatest among three numbers. Display Screen:Code:Input Window:Output Window:.. Question 18:Write steps for creating database application in VB using Add-inc. Display Screen:Code:-
Input Window:Output Window:.. Question 19:Write steps for creating database application (MS Access) in VB using data control using code. Display Screen:Code:Input Window:Output Window:.. Question 20:Design a menus through menu editor. Display Screen:Code:Input Window:Output Window:..