AlarmClock/AlarmClock/AlarmClock.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class AlarmClockForm
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.timeLabel = New System.Windows.Forms.Label
Me.setButton = New System.Windows.Forms.Button
Me.resetButton = New System.Windows.Forms.Button
Me.alarmTimer = New System.Windows.Forms.Timer(Me.components)
Me.alarmLabel = New System.Windows.Forms.Label
Me.currentTimeLabel = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'timeLabel
'
Me.timeLabel.AutoSize = True
Me.timeLabel.Location = New System.Drawing.Point(11, 15)
Me.timeLabel.Name = "timeLabel"
Me.timeLabel.Size = New System.Drawing.Size(37, 15)
Me.timeLabel.TabIndex = 0
Me.timeLabel.Text = "Time:"
'
'setButton
'
Me.setButton.Location = New System.Drawing.Point(173, 11)
Me.setButton.Name = "setButton"
Me.setButton.Size = New System.Drawing.Size(55, 23)
Me.setButton.TabIndex = 2
Me.setButton.Text = "Set"
Me.setButton.UseVisualStyleBackColor = True
'
'resetButton
'
Me.resetButton.Enabled = False
Me.resetButton.Location = New System.Drawing.Point(173, 47)
Me.resetButton.Name = "resetButton"
Me.resetButton.Size = New System.Drawing.Size(55, 23)
Me.resetButton.TabIndex = 3
Me.resetButton.Text = "Reset"
Me.resetButton.UseVisualStyleBackColor = True
'
'alarmTimer
'
Me.alarmTimer.Enabled = True
Me.alarmTimer.Interval = 1000
'
'alarmLabel
'
Me.alarmLabel.AutoSize = True
Me.alarmLabel.Location = New System.Drawing.Point(12, 50)
Me.alarmLabel.Name = "alarmLabel"
Me.alarmLabel.Size = New System.Drawing.Size(42, 15)
Me.alarmLabel.TabIndex = 4
Me.alarmLabel.Text = "Alarm:"
'
'currentTimeLabel
'
Me.currentTimeLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.currentTimeLabel.Location = New System.Drawing.Point(59, 11)
Me.currentTimeLabe.
2. 'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows
Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.timeLabel = New System.Windows.Forms.Label
Me.setButton = New System.Windows.Forms.Button
Me.resetButton = New System.Windows.Forms.Button
Me.alarmTimer = New
System.Windows.Forms.Timer(Me.components)
Me.alarmLabel = New System.Windows.Forms.Label
Me.currentTimeLabel = New System.Windows.Forms.Label
Me.SuspendLayout()
7. Me.PerformLayout()
End Sub
Friend WithEvents timeLabel As
System.Windows.Forms.Label
Friend WithEvents setButton As
System.Windows.Forms.Button
Friend WithEvents resetButton As
System.Windows.Forms.Button
Friend WithEvents alarmTimer As
System.Windows.Forms.Timer
Friend WithEvents alarmLabel As
System.Windows.Forms.Label
Friend WithEvents currentTimeLabel As
System.Windows.Forms.Label
End Class
AlarmClock/AlarmClock/AlarmClock.resx
10. '
*****************************************************
*********************
' * (C) Copyright 1992-2013 by Deitel & Associates, Inc. and
*
' * Pearson Education, Inc. All Rights Reserved.
*
' * *
' * DISCLAIMER: The authors and publisher of this book have
used their *
' * best efforts in preparing the book. These efforts include the
*
' * development, research, and testing of the theories and
programs *
' * to determine their effectiveness. The authors and publisher
make *
' * no warranty of any kind, expressed or implied, with regard to
these *
' * programs or to the documentation contained in these books.
The authors *
' * and publisher shall not be liable in any event for incidental
or *
' * consequential damages in connection with, or arising out of,
the *
11. ' * furnishing, performance, or use of these programs.
*
'
*****************************************************
*********************
AlarmClock/AlarmClock/AlarmClock.vbproj
Debug
AnyCPU
9.0.21022
2.0
{AAD52B7E-EE64-432F-BE7E-9FACF8AC2CD2}
WinExe
AlarmClock.My.MyApplication
AlarmClock
AlarmClock
512
WindowsForms
v4.0
On
Binary
Off
On
3.5
true
full
16. ----
Option Strict On
Option Explicit On
Namespace My
'NOTE: This file is auto-generated; do not modify it directly.
To make changes,
' or if you encounter build errors in this file, go to the Project
Designer
' (go to Project Properties or double-click the My Project
node in
'
Solution
Explorer), and make changes on the Application tab.
'
17. Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()>
_
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationService
s.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle =
Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMo
de.AfterMainFormCloses
18. End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()>
_
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.AlarmClock.AlarmClockForm
End Sub
End Class
End Namespace
AlarmClock/AlarmClock/My Project/Application.myapp
<?xml version="1.0" encoding="utf-16"?>
<MyApplicationData
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21. <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'The following GUID is for the ID of the typelib if this project
is exposed to COM
<Assembly: Guid("766ab143-f2e5-4aed-bb71-235d2d2d9b8b")>
' Version information for an assembly consists of the following
four values:
'
' Major Version
' Minor Version
22. ' Build Number
' Revision
'
' You can specify all the values or you can default the Build and
Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
AlarmClock/AlarmClock/My Project/Resources.Designer.vb
'--------------------------------------------------------------------------
----
23. ' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.239
'
' Changes to this file may cause incorrect behavior and will
be lost if
' the code is regenerated.
' </auto-generated>
'--------------------------------------------------------------------------
----
Option Strict On
Option Explicit On
24. Imports System
Namespace My.Resources
'This class was auto-generated by the
StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun
ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized
strings, etc.
'''</summary>
26. Private resourceCulture As
Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by
this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Gl
obal.System.ComponentModel.EditorBrowsableState.Advanced)
> _
Friend ReadOnly Property ResourceManager() As
Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing)
Then
27. Dim temp As
Global.System.Resources.ResourceManager = New
Global.System.Resources.ResourceManager("AlarmClock.Resou
rces", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture
property for all
''' resource lookups using this strongly typed resource
class.
32. ' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.239
'
' Changes to this file may cause incorrect behavior and will
be lost if
' the code is regenerated.
' </auto-generated>
'--------------------------------------------------------------------------
----
Option Strict On
Option Explicit On
34. Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings =
CType(Global.System.Configuration.ApplicationSettingsBase.S
ynchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),
Global.System.ComponentModel.EditorBrowsableAttribute(Glo
35. bal.System.ComponentModel.EditorBrowsableState.Advanced)>
_
Private Shared Sub AutoSaveSettings(ByVal sender As
Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As
MySettings
Get
36. #If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown,
AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
37. End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(),
_
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),
_
Global.System.Runtime.CompilerServices.CompilerGeneratedAt
tribute()> _