Page 1

CmpSc116 (Database Systems) Exercise 1 Name: ___________________________

Date: _____________

Total Points: 10

Score: ____________

Create an Application displaying your name. Consider the following specifications: a) Display the Maximize and Minimize buttons. b) Your name should be displayed in Arial font, Size 18, Bold, color Blue. c) Display a rectangle Shape control (BorderWidth=3, BorderStyle=Dots) around the Label. d) Label should be transparent. e) Form should have a white Background color. f) Display an icon on the Title Bar g) Save (Project name: prjExer1, Form name: frmExer1) Note: use the same naming convention in your succeeding exercises --------------------------------------------------------------------------------------------------------------------------------------------------

CmpSc116 (Database Systems) Exercise 2 Name: ___________________________

Date: _____________

Total Points: 10

Score: ____________

1. Create an application with the following specifications: Add two CommandButtons and one Label between them in one line. Make the Label’s Caption property blank. When the user clicks the first CommandButton, a caption should appear on the Label that reads “Left Button Clicked!”. When the user clicks the second CommandButton, a caption should appear on the Label that reads “Right Button Clicked!”. (5 pts) 2. Modify Activity #2, add 2 more controls (txtAge, lblAge). Clicking cmdGreet should display in lblOutput a message in the following format: (5pts) HELLO, your firstname is <txtFname>, your surname is <txtLname>. You are now <txtAge> years old. --------------------------------------------------------------------------------------------------------------------------------------------------

CmpSc116 (Database Systems) Exercise 3 Name: ___________________________

Date: _____________

Total Points: 10

Score: ____________

1. Write an application that accepts your age in a TextBox and then displays, when you click a CommandButton, your age in 10 years time. (5pts) 2. Make an application that asks for an item price, the discount (if any), and the cash given by the customer. Compute and output (using the appropriate format) the selling price and the change (cash – selling price). (5pts)


CmpSc116 (Database Systems) Exercise 4 Name: ___________________________

Date: _____________

Total Points: 15 (Lesson 4, 6, 7, 8)

Score: ____________

1. Create a form similar to the one below.

2. Clicking View should display the Personal Information details in the Preview pane (a listbox) 3. Clicking Retirement Date should display the message below: NB. To add a new line use Chr(13) To compute for the date, use the following functions DateDiff (Interval, Date1, Date2) DateAdd(Interval, Date1, Date2)

4. Clicking Exit should close the form. --------------------------------------------------------------------------------------------------------------------------------------------------

CmpSc116 (Database Systems) Exercise 5 Name: ___________________________

Date: _____________

Total Points: 5 (Lesson 5)

Score: ____________

Create a program that asks for a number and computes for its Factorial. The Factorial of 3 is 6 (1 x 2 x 3). Factorial of 5 is 120 (1 x 2 x 3 x 4 x 5). Display the result in a Label. Also, make sure that the user enters a number using the IsNumeric() Function. Display appropriate messages in the Label if the user enters non-numeric values.


CmpSc116 (Database Systems) Exercise 6 Name: ___________________________

Date: _____________

Total Points: 5 (Lesson 10, 11)

Score: ____________

Create an application. Add an Image to the Form. Set the image height and width property to 800. Drag a Timer control as well. Every second, add 200 points to the Imageâ&#x20AC;&#x2122;s height and width. When the height/width grows to a value that will make the image too big for the Form, set the height and width back to 800 points and start increasing the height and width once again. --------------------------------------------------------------------------------------------------------------------------------------------------

CmpSc116 (Database Systems) Exercise 7 Name: ___________________________

Date: _____________

Total Points: 5 (Lesson 12, 19)

Score: ____________

Instructions: Create a simple text editor. The Editorâ&#x20AC;&#x2122;s interface is as follows:

When the Print button is clicked, the dialog box at the right is displayed ->

For the Paper Size ListBox (DropDown ListBox), include three items: Letter, 8 1/2 x 11 in., Legal, 8 1/2 x 14 in., and A4, 210 x 297 mm. The Color ListBox (DropDown ListBox) contains four colors: Black, Blue, Red, and Green. Enable this ListBox only when Color Mode (see the Color Mode Frame above) is set to Color. Color refers to the color of the text when printed. When the Print button is pressed, print the text in entered in the previous Form. Apply print the settings set by the user. Unload the Form and load the main Form. Clicking Cancel also invokes back the main Form.

Lab exercises  

lab activity

Read more
Read more
Similar to
Popular now
Just for you