Академический Документы
Профессиональный Документы
Культура Документы
PART- A
Q1. Using console application in vb.net create a namespace with methods to read
total days. Use member variables, procedures ,functions to calculate the bill
display the same?
Imports name_spacescustomer.p1.pt2
Module module1
Sub main()
Dim a As New p1.p2
Console.WriteLine("patient info")
a.getdata()
Console.WriteLine("The total amount:{0}", a.amount)
Console.ReadKey()
End Sub
End Module
Q3. Create a windows application that calculates salary of an employee. Make use
Ans3.
Public Class Form1
End Sub
End Sub
End Sub
End Sub
End Class
PART- B
Q5. Create an application in vb.net using rich text box to implement font, colour
and use of system calculator in an application?
Ans)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) H
andles Button1.Click
Dim cd As New ColorDialog
cd.ShowDialog()
RichTextBox1.SelectionColor = cd.Color
End Sub
Drag a RichTextBox (RichTextBox1) and a Button (Button1) onto the form. Enter some text in
RichTextBox1, say, "We are working with RichTextBoxes". Paste the following code in the
click event of Button1. The following code will search for text we mention in code and sets it to
be displayed as Bold or Italic based on what text is searched for.
Drag two RichTextBoxes and two Buttons (Save, Load) onto the form. When you enter some
text in RichTextBox1 and click on Save button, the text from RichTextBox1 is saved into a
rtf (rich text format) file. When you click on Load button the text from the rtf file is displayed
into RichTextBox2. The code for that looks like this:
intBtnClkCount += 1