Vous êtes sur la page 1sur 3

Note Saver

The program that I managed to create for this assignment is a form note saver. Its purpose is simple
but very helpful in many ways. It allows the user to take notes wherever they are and as long there is
a computer by their side. The form note saver has one simple Tab for the notes that they will be
making. It also includes the time so they know how much time they have left to take notes. It also
includes a Save button and Open button. The save button will willingly save their work into a custom
“Btec file”. The open button will open Btec files as well so they can retrieve the work they had left
off from.

This is what the interface of

the form note saver look
like. It is simple and easy to
use. A person who would use
this for the first time would
immediately know how to
operate this program. It also
shows the date as well to
make user aware of the
current day. The big white
rectangle the centre is
textbox which is where the
user will type his notes.
The Coding
Public Class FrmNoteSaver
Dim TheDate As DateTime
Dim TheTime As DateTime
Dim theResponse As String

Private Sub TMRMyTime_Tick(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles TMRMyTime.Tick
TheDate = DateAndTime.Today This part of the code supports the Time
TheTime = DateAndTime.TimeOfDay
LblDate.Text = TheDate
and the date within the program. So
LblTime.Text = TheTime basically this enables the time and date
End Sub to be functional.

Private Sub CmdExit_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles CmdExit.Click
theResponse = MsgBox("Do you want to quit?", MsgBoxStyle.Question +
vbYesNo, "Lamars Note Saver")
If theResponse = vbYes Then
MsgBox("Goodbye", MsgBoxStyle.Exclamation, "Lamar's Note Saver 2009")
MsgBox("Thanks", MsgBoxStyle.Exclamation, "Lamar's Note Saver 2009")
End If
The code above supports the exit button and the end
End Sub
messages you will receive once you have exited.
Private Sub CmdSave1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CmdSave1.Click

Dim SaveFile1 As New SaveFileDialog

SaveFile1.DefaultExt = "*.doc"
SaveFile1.Filter = "Btec Files| *.doc"

If (SaveFile1.ShowDialog = System.Windows.Forms.DialogResult.OK) And

(SaveFile1.FileName.Length) > 0 Then
Select Case DirectCast(sender, Button).Name

Case CmdSave1.Name
RTBNote1.SaveFile(SaveFile1.FileName, The code above supports the
RichTextBoxStreamType.PlainText) save button function without
End Select this piece of code I will be
unable to save my work.
End If

End Sub

Private Sub CmdOpen1_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles CmdOpen1.Click

If OFDNotes.ShowDialog = System.Windows.Forms.DialogResult.OK Then

Dim sr As New System.IO.StreamReader(OFDNotes.FileName)

MessageBox.Show(sr.ReadToEnd, "Lamar's Note Saver 2009")

This final piece of code supports the
End If Open button. So the user will be able to
End Sub open his documents without fail.
End Class
Test Table
Test Test Data Use Expected Output Actual Output Test Results
Open Button Should Open a Opened a File PASS
Save Button Should Save a File Save the File PASS
Exit button Should Exit the Exited the PASS
Program Program

M2- Improvements on the current

I chose my form note saver to do the extra enhancement as there are many things that could be
added to the program. The improvement that I thought of was an internet explorer. Students will be
able to right there
notes and surf when
they want to do
research for their
current assignment.

I think this will be

useful as the student
would have to open
up a new browser on
a separate program.
I have simplified it by
put the web browser
on this note saver to
save students time
when going on the
internet. The
controls on the web
browser are self explanatory. The Go button is to launch the current website in the URL. The home
button is for navigating to the home page. The right > icon is to navigate forward and the < icon is to
navigate backwards. The stop button is to stop the current page from loading and the refresh button
is to reload the page.