infomation technology HW

profileDre_fingerz
unitii_studentfiles_0.zip

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/App.config

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/Bonus Project.vbproj

Debug AnyCPU {C5D079AF-0DE9-444D-9B77-454F50657CBF} WinExe Bonus_Project.My.MyApplication Bonus_Project Bonus Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Bonus Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Bonus Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.lblBonus = New System.Windows.Forms.Label() Me.btnCalc = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(76, 28) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(52, 20) Me.Label1.TabIndex = 2 Me.Label1.Text = "Bonus:" ' 'lblBonus ' Me.lblBonus.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblBonus.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblBonus.Location = New System.Drawing.Point(81, 51) Me.lblBonus.Name = "lblBonus" Me.lblBonus.Size = New System.Drawing.Size(109, 43) Me.lblBonus.TabIndex = 3 Me.lblBonus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(228, 24) Me.btnCalc.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(83, 36) Me.btnCalc.TabIndex = 0 Me.btnCalc.Text = "&Calculate" Me.btnCalc.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(228, 67) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(83, 36) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(386, 136) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCalc) Me.Controls.Add(Me.lblBonus) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Bonus Solution-TRY THIS 1" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lblBonus As System.Windows.Forms.Label Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/frmMain.vb

' Name: Bonus Project ' Purpose: Display a bonus amount ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Bonus_Project.frmMain End Sub End Class End Namespace

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Bonus Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Bonus Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("f5ccb682-c460-4389-a9d2-84916e263d80")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Bonus_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Bonus_Project.My.MySettings Get Return Global.Bonus_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/Bonus Solution-TRY THIS 1/Bonus Project/My Project/Settings.settings

Chap16/Bonus Solution-TRY THIS 1/Bonus Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bonus Project", "Bonus Project\Bonus Project.vbproj", "{C5D079AF-0DE9-444D-9B77-454F50657CBF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {C5D079AF-0DE9-444D-9B77-454F50657CBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C5D079AF-0DE9-444D-9B77-454F50657CBF}.Debug|Any CPU.Build.0 = Debug|Any CPU {C5D079AF-0DE9-444D-9B77-454F50657CBF}.Release|Any CPU.ActiveCfg = Release|Any CPU {C5D079AF-0DE9-444D-9B77-454F50657CBF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/App.config

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/Bonus Project.vbproj

Debug AnyCPU {C5D079AF-0DE9-444D-9B77-454F50657CBF} WinExe Bonus_Project.My.MyApplication Bonus_Project Bonus Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Bonus Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Bonus Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.lblBonus = New System.Windows.Forms.Label() Me.btnCalc = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(76, 28) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(52, 20) Me.Label1.TabIndex = 2 Me.Label1.Text = "Bonus:" ' 'lblBonus ' Me.lblBonus.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblBonus.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblBonus.Location = New System.Drawing.Point(81, 51) Me.lblBonus.Name = "lblBonus" Me.lblBonus.Size = New System.Drawing.Size(109, 43) Me.lblBonus.TabIndex = 3 Me.lblBonus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(228, 24) Me.btnCalc.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(83, 36) Me.btnCalc.TabIndex = 0 Me.btnCalc.Text = "&Calculate" Me.btnCalc.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(228, 67) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(83, 36) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(386, 136) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCalc) Me.Controls.Add(Me.lblBonus) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Bonus Solution-TRY THIS 2" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lblBonus As System.Windows.Forms.Label Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/frmMain.vb

' Name: Bonus Project ' Purpose: Display a bonus amount ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Bonus_Project.frmMain End Sub End Class End Namespace

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Bonus Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Bonus Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("f5ccb682-c460-4389-a9d2-84916e263d80")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Bonus_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Bonus_Project.My.MySettings Get Return Global.Bonus_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/Bonus Solution-TRY THIS 2/Bonus Project/My Project/Settings.settings

Chap16/Bonus Solution-TRY THIS 2/Bonus Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Bonus Project", "Bonus Project\Bonus Project.vbproj", "{C5D079AF-0DE9-444D-9B77-454F50657CBF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {C5D079AF-0DE9-444D-9B77-454F50657CBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C5D079AF-0DE9-444D-9B77-454F50657CBF}.Debug|Any CPU.Build.0 = Debug|Any CPU {C5D079AF-0DE9-444D-9B77-454F50657CBF}.Release|Any CPU.ActiveCfg = Release|Any CPU {C5D079AF-0DE9-444D-9B77-454F50657CBF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap16/Bowton.png

Chap16/CableDirect.png

Chap16/Concert Solution/Concert Project/App.config

Chap16/Concert Solution/Concert Project/Concert Project.vbproj

Debug AnyCPU {6E42A126-6603-497E-930F-2E846439A2F7} WinExe Concert_Project.My.MyApplication Concert_Project Concert Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Concert Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Concert Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/Concert Solution/Concert Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.txtTickets = New System.Windows.Forms.TextBox() Me.radVip = New System.Windows.Forms.RadioButton() Me.radStandard = New System.Windows.Forms.RadioButton() Me.Label2 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.lblSubtotal = New System.Windows.Forms.Label() Me.lblDiscount = New System.Windows.Forms.Label() Me.lblTotalDue = New System.Windows.Forms.Label() Me.btnCalc = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(27, 25) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(50, 17) Me.Label1.TabIndex = 0 Me.Label1.Text = "&Tickets:" ' 'txtTickets ' Me.txtTickets.Location = New System.Drawing.Point(83, 22) Me.txtTickets.Name = "txtTickets" Me.txtTickets.Size = New System.Drawing.Size(50, 25) Me.txtTickets.TabIndex = 1 ' 'radVip ' Me.radVip.AutoSize = True Me.radVip.Location = New System.Drawing.Point(187, 51) Me.radVip.Name = "radVip" Me.radVip.Size = New System.Drawing.Size(44, 21) Me.radVip.TabIndex = 3 Me.radVip.Text = "&VIP" Me.radVip.UseVisualStyleBackColor = True ' 'radStandard ' Me.radStandard.AutoSize = True Me.radStandard.Checked = True Me.radStandard.Location = New System.Drawing.Point(187, 22) Me.radStandard.Name = "radStandard" Me.radStandard.Size = New System.Drawing.Size(79, 21) Me.radStandard.TabIndex = 2 Me.radStandard.TabStop = True Me.radStandard.Text = "&Standard" Me.radStandard.UseVisualStyleBackColor = True ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(27, 118) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(59, 17) Me.Label2.TabIndex = 6 Me.Label2.Text = "Subtotal:" ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(27, 148) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(61, 17) Me.Label3.TabIndex = 7 Me.Label3.Text = "Discount:" ' 'Label4 ' Me.Label4.AutoSize = True Me.Label4.Location = New System.Drawing.Point(27, 179) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(66, 17) Me.Label4.TabIndex = 8 Me.Label4.Text = "Total due:" ' 'lblSubtotal ' Me.lblSubtotal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblSubtotal.Location = New System.Drawing.Point(95, 114) Me.lblSubtotal.Name = "lblSubtotal" Me.lblSubtotal.Size = New System.Drawing.Size(60, 25) Me.lblSubtotal.TabIndex = 9 Me.lblSubtotal.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'lblDiscount ' Me.lblDiscount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblDiscount.Location = New System.Drawing.Point(95, 144) Me.lblDiscount.Name = "lblDiscount" Me.lblDiscount.Size = New System.Drawing.Size(60, 25) Me.lblDiscount.TabIndex = 10 Me.lblDiscount.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'lblTotalDue ' Me.lblTotalDue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblTotalDue.Location = New System.Drawing.Point(95, 175) Me.lblTotalDue.Name = "lblTotalDue" Me.lblTotalDue.Size = New System.Drawing.Size(60, 25) Me.lblTotalDue.TabIndex = 11 Me.lblTotalDue.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(187, 114) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(75, 28) Me.btnCalc.TabIndex = 4 Me.btnCalc.Text = "&Calculate" Me.btnCalc.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(187, 148) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(75, 28) Me.btnExit.TabIndex = 5 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(296, 231) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCalc) Me.Controls.Add(Me.lblTotalDue) Me.Controls.Add(Me.lblDiscount) Me.Controls.Add(Me.lblSubtotal) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.radStandard) Me.Controls.Add(Me.radVip) Me.Controls.Add(Me.txtTickets) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Concert Tickets" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtTickets As System.Windows.Forms.TextBox Friend WithEvents radVip As System.Windows.Forms.RadioButton Friend WithEvents radStandard As System.Windows.Forms.RadioButton Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents lblSubtotal As System.Windows.Forms.Label Friend WithEvents lblDiscount As System.Windows.Forms.Label Friend WithEvents lblTotalDue As System.Windows.Forms.Label Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap16/Concert Solution/Concert Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True True True True True True True

Chap16/Concert Solution/Concert Project/frmMain.vb

' Name: Concert Project ' Purpose: Display the subtotal, discount, and total due ' Programmer: <your name> on <current date> Public Class frmMain Private Sub AssignDiscount() Select Case intNum Case Is >= 6 decDisc = decSub * 0.1 Case Is >= 4 decDisc = decSub * 0.02 Case Else decDisc = 0 End Select End Sub Private Sub ClearLabels() lblSubtotal.Text = String.Empty lblDiscount.Text = String.Empty lblTotalDue.Text = String.Empty End Sub Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click ' displays the subtotal, discount, and total due Const decSTANDARD As Decimal = 32.75 Const decVIP As Decimal = 75 Dim intTickets As Integer Dim decSubtotal As Decimal Dim decTotalDue As Decimal Dim decDiscount As Decimal Integer.TryParse(txtTickets.Text, intTickets) ' calculate subtotal If radStandard.Checked = True Then decSubtotal = intTickets * decSTANDARD Else decSubtotal = intTickets * decVIP End If ' assign discount ' calculate total due decTotalDue = decSubtotal - decDiscount ' display subtotal, discount, and total due lblSubtotal.Text = decSubtotal.ToString("N2") lblDiscount.Text = decDiscount.ToString("N2") lblTotalDue.Text = decTotalDue.ToString("N2") End Sub Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub txtTickets_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtTickets.KeyPress ' allows the text box to accept numbers and the Backspace key If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> ControlChars.Back Then e.Handled = True End If End Sub Private Sub radStandard_CheckedChanged(sender As Object, e As EventArgs) Handles radStandard.CheckedChanged Call ClearLabels() End Sub Private Sub radVip_CheckedChanged(sender As Object, e As EventArgs) Handles radVip.CheckedChanged Call ClearLabels() End Sub Private Sub txtTickets_TextChanged(sender As Object, e As EventArgs) Handles txtTickets.TextChanged Call ClearLabels() End Sub End Class

Chap16/Concert Solution/Concert Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Concert_Project.frmMain End Sub End Class End Namespace

Chap16/Concert Solution/Concert Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/Concert Solution/Concert Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Concert Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Concert Project")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("7c5f9713-3062-45c2-a5f8-615871aa8b0f")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/Concert Solution/Concert Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Concert_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap16/Concert Solution/Concert Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap16/Concert Solution/Concert Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Concert_Project.My.MySettings Get Return Global.Concert_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/Concert Solution/Concert Project/My Project/Settings.settings

Chap16/Concert Solution/Concert Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Concert Project", "Concert Project\Concert Project.vbproj", "{6E42A126-6603-497E-930F-2E846439A2F7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6E42A126-6603-497E-930F-2E846439A2F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6E42A126-6603-497E-930F-2E846439A2F7}.Debug|Any CPU.Build.0 = Debug|Any CPU {6E42A126-6603-497E-930F-2E846439A2F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {6E42A126-6603-497E-930F-2E846439A2F7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap16/Favorite Title Solution/Favorite Title Project/App.config

Chap16/Favorite Title Solution/Favorite Title Project/Favorite Title Project.vbproj

Debug AnyCPU {21C0A03B-C489-438E-BF62-CD3012A55C2F} WinExe Favorite_Title_Project.My.MyApplication Favorite_Title_Project Favorite Title Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Favorite Title Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Favorite Title Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/Favorite Title Solution/Favorite Title Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.lblMsg = New System.Windows.Forms.Label() Me.radBook = New System.Windows.Forms.RadioButton() Me.radTvShow = New System.Windows.Forms.RadioButton() Me.btnDisplay = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'lblMsg ' Me.lblMsg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblMsg.Location = New System.Drawing.Point(12, 94) Me.lblMsg.Name = "lblMsg" Me.lblMsg.Size = New System.Drawing.Size(355, 69) Me.lblMsg.TabIndex = 4 Me.lblMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'radBook ' Me.radBook.AutoSize = True Me.radBook.Checked = True Me.radBook.Location = New System.Drawing.Point(35, 30) Me.radBook.Name = "radBook" Me.radBook.Size = New System.Drawing.Size(61, 24) Me.radBook.TabIndex = 2 Me.radBook.TabStop = True Me.radBook.Text = "&Book" Me.radBook.UseVisualStyleBackColor = True ' 'radTvShow ' Me.radTvShow.AutoSize = True Me.radTvShow.Location = New System.Drawing.Point(35, 60) Me.radTvShow.Name = "radTvShow" Me.radTvShow.Size = New System.Drawing.Size(82, 24) Me.radTvShow.TabIndex = 3 Me.radTvShow.Text = "&TV show" Me.radTvShow.UseVisualStyleBackColor = True ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(148, 30) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(132, 37) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display Favorite" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(286, 30) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(77, 37) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(379, 199) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.radTvShow) Me.Controls.Add(Me.radBook) Me.Controls.Add(Me.lblMsg) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Favorite Title" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents lblMsg As System.Windows.Forms.Label Friend WithEvents radBook As System.Windows.Forms.RadioButton Friend WithEvents radTvShow As System.Windows.Forms.RadioButton Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap16/Favorite Title Solution/Favorite Title Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True

Chap16/Favorite Title Solution/Favorite Title Project/frmMain.vb

' Name: Favorite Title Project ' Purpose: Displays a message that contains ' the title of either a book ' or a TV show ' Programmer: <your name> on <current date> Public Class frmMain ' independent Sub procedure Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub radBook_CheckedChanged(sender As Object, e As EventArgs) Handles radBook.CheckedChanged lblMsg.Text = String.Empty End Sub Private Sub radTvShow_CheckedChanged(sender As Object, e As EventArgs) Handles radTvShow.CheckedChanged lblMsg.Text = String.Empty End Sub Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click ' gets the title and then calls ' a procedure to display the title Dim strCategory As String Dim strTitle As String If radBook.Checked = True Then strCategory = "book" strTitle = InputBox("Your favorite book?", "Book") Else strCategory = "TV show" strTitle = InputBox("Your favorite TV show?", "TV Show") End If End Sub End Class

Chap16/Favorite Title Solution/Favorite Title Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Favorite_Title_Project.frmMain End Sub End Class End Namespace

Chap16/Favorite Title Solution/Favorite Title Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/Favorite Title Solution/Favorite Title Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Favorite Title Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Favorite Title Project")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("81f99d0c-7b4e-477c-8a52-034c80f7b178")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/Favorite Title Solution/Favorite Title Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Favorite_Title_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap16/Favorite Title Solution/Favorite Title Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap16/Favorite Title Solution/Favorite Title Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Favorite_Title_Project.My.MySettings Get Return Global.Favorite_Title_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/Favorite Title Solution/Favorite Title Project/My Project/Settings.settings

Chap16/Favorite Title Solution/Favorite Title Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Favorite Title Project", "Favorite Title Project\Favorite Title Project.vbproj", "{21C0A03B-C489-438E-BF62-CD3012A55C2F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {21C0A03B-C489-438E-BF62-CD3012A55C2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {21C0A03B-C489-438E-BF62-CD3012A55C2F}.Debug|Any CPU.Build.0 = Debug|Any CPU {21C0A03B-C489-438E-BF62-CD3012A55C2F}.Release|Any CPU.ActiveCfg = Release|Any CPU {21C0A03B-C489-438E-BF62-CD3012A55C2F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap16/FigureThisOut Solution/FigureThisOut Project/App.config

Chap16/FigureThisOut Solution/FigureThisOut Project/FigureThisOut Project.vbproj

Debug AnyCPU {A4B56BE7-6245-430F-9424-50860734D5B0} WinExe FigureThisOut_Project.My.MyApplication FigureThisOut_Project FigureThisOut Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ FigureThisOut Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ FigureThisOut Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/FigureThisOut Solution/FigureThisOut Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.txtSales = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.lblComm5 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.lblComm8 = New System.Windows.Forms.Label() Me.btnCalc = New System.Windows.Forms.Button() Me.btnClear = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(17, 32) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(41, 17) Me.Label1.TabIndex = 0 Me.Label1.Text = "&Sales:" ' 'txtSales ' Me.txtSales.Location = New System.Drawing.Point(21, 52) Me.txtSales.Name = "txtSales" Me.txtSales.Size = New System.Drawing.Size(80, 25) Me.txtSales.TabIndex = 1 ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(134, 32) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(102, 17) Me.Label2.TabIndex = 5 Me.Label2.Text = "5% commission:" ' 'lblComm5 ' Me.lblComm5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblComm5.Location = New System.Drawing.Point(138, 51) Me.lblComm5.Name = "lblComm5" Me.lblComm5.Size = New System.Drawing.Size(79, 25) Me.lblComm5.TabIndex = 6 Me.lblComm5.Text = "N/A" Me.lblComm5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(274, 32) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(102, 17) Me.Label3.TabIndex = 7 Me.Label3.Text = "8% commission:" ' 'lblComm8 ' Me.lblComm8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblComm8.Location = New System.Drawing.Point(278, 51) Me.lblComm8.Name = "lblComm8" Me.lblComm8.Size = New System.Drawing.Size(79, 25) Me.lblComm8.TabIndex = 8 Me.lblComm8.Text = "N/A" Me.lblComm8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(21, 122) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(95, 37) Me.btnCalc.TabIndex = 2 Me.btnCalc.Text = "&Calculate" Me.btnCalc.UseVisualStyleBackColor = True ' 'btnClear ' Me.btnClear.Location = New System.Drawing.Point(138, 122) Me.btnClear.Name = "btnClear" Me.btnClear.Size = New System.Drawing.Size(95, 37) Me.btnClear.TabIndex = 3 Me.btnClear.Text = "C&lear" Me.btnClear.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(278, 122) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(95, 37) Me.btnExit.TabIndex = 4 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(397, 201) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnClear) Me.Controls.Add(Me.btnCalc) Me.Controls.Add(Me.lblComm8) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.lblComm5) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.txtSales) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "FigureThisOut" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtSales As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents lblComm5 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents lblComm8 As System.Windows.Forms.Label Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents btnClear As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap16/FigureThisOut Solution/FigureThisOut Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True True True True

Chap16/FigureThisOut Solution/FigureThisOut Project/frmMain.vb

' Name: FigureThisOut Project ' Purpose: Display commission amounts ' Programmer: <your name> on <current date> Public Class frmMain Private Sub ClearLabels() lblComm5.Text = String.Empty lblComm8.Text = String.Empty End Sub Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click ' calculates and displays commission amounts Const decRATE5 As Decimal = 0.05 Const decRATE8 As Decimal = 0.08 Dim decSale As Decimal Dim decComm5 As Decimal Dim decComm8 As Decimal Decimal.TryParse(txtSales.Text, decSale) ' calculate commission amounts decComm5 = decSale * decRATE5 decComm8 = decSale * decRATE8 ' display commission amounts lblComm5.Text = decComm5.ToString("C2") lblComm8.Text = decComm8.ToString("C2") End Sub Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click ' clears the text box and label controls txtSales.Text = String.Empty Call ClearLabels() End Sub Private Sub txtSales_TextChanged(sender As Object, e As EventArgs) Handles txtSales.TextChanged Call ClearLabels() End Sub End Class

Chap16/FigureThisOut Solution/FigureThisOut Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.FigureThisOut_Project.frmMain End Sub End Class End Namespace

Chap16/FigureThisOut Solution/FigureThisOut Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/FigureThisOut Solution/FigureThisOut Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("FigureThisOut Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("FigureThisOut Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("cb78c7f8-b14c-4e1c-99c9-d3e07b995602")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/FigureThisOut Solution/FigureThisOut Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("FigureThisOut_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap16/FigureThisOut Solution/FigureThisOut Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap16/FigureThisOut Solution/FigureThisOut Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.FigureThisOut_Project.My.MySettings Get Return Global.FigureThisOut_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/FigureThisOut Solution/FigureThisOut Project/My Project/Settings.settings

Chap16/FigureThisOut Solution/FigureThisOut Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FigureThisOut Project", "FigureThisOut Project\FigureThisOut Project.vbproj", "{A4B56BE7-6245-430F-9424-50860734D5B0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A4B56BE7-6245-430F-9424-50860734D5B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A4B56BE7-6245-430F-9424-50860734D5B0}.Debug|Any CPU.Build.0 = Debug|Any CPU {A4B56BE7-6245-430F-9424-50860734D5B0}.Release|Any CPU.ActiveCfg = Release|Any CPU {A4B56BE7-6245-430F-9424-50860734D5B0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap16/Grade Solution/Grade Project/App.config

Chap16/Grade Solution/Grade Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.txtTest1 = New System.Windows.Forms.TextBox() Me.txtTest2 = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.txtTest3 = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.lblGrade = New System.Windows.Forms.Label() Me.btnDisplay = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.PictureBox1 = New System.Windows.Forms.PictureBox() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(29, 39) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(51, 20) Me.Label1.TabIndex = 0 Me.Label1.Text = "Test &1:" ' 'txtTest1 ' Me.txtTest1.Location = New System.Drawing.Point(85, 34) Me.txtTest1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.txtTest1.Name = "txtTest1" Me.txtTest1.Size = New System.Drawing.Size(46, 27) Me.txtTest1.TabIndex = 1 ' 'txtTest2 ' Me.txtTest2.Location = New System.Drawing.Point(85, 89) Me.txtTest2.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.txtTest2.Name = "txtTest2" Me.txtTest2.Size = New System.Drawing.Size(46, 27) Me.txtTest2.TabIndex = 3 ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(29, 93) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(51, 20) Me.Label2.TabIndex = 2 Me.Label2.Text = "Test &2:" ' 'txtTest3 ' Me.txtTest3.Location = New System.Drawing.Point(85, 142) Me.txtTest3.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.txtTest3.Name = "txtTest3" Me.txtTest3.Size = New System.Drawing.Size(46, 27) Me.txtTest3.TabIndex = 5 ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(29, 147) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(51, 20) Me.Label3.TabIndex = 4 Me.Label3.Text = "Test &3:" ' 'Label4 ' Me.Label4.AutoSize = True Me.Label4.Location = New System.Drawing.Point(29, 208) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(52, 20) Me.Label4.TabIndex = 8 Me.Label4.Text = "Grade:" ' 'lblGrade ' Me.lblGrade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblGrade.Location = New System.Drawing.Point(85, 208) Me.lblGrade.Name = "lblGrade" Me.lblGrade.Size = New System.Drawing.Size(47, 29) Me.lblGrade.TabIndex = 9 Me.lblGrade.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(181, 159) Me.btnDisplay.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(119, 36) Me.btnDisplay.TabIndex = 6 Me.btnDisplay.Text = "&Display Grade" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(181, 202) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(119, 36) Me.btnExit.TabIndex = 7 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'PictureBox1 ' Me.PictureBox1.Image = Global.Grade_Project.My.Resources.Resources.TestScore Me.PictureBox1.Location = New System.Drawing.Point(181, 12) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(119, 118) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 10 Me.PictureBox1.TabStop = False ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(333, 279) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.lblGrade) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.txtTest3) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.txtTest2) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.txtTest1) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Grade" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtTest1 As System.Windows.Forms.TextBox Friend WithEvents txtTest2 As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents txtTest3 As System.Windows.Forms.TextBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents lblGrade As System.Windows.Forms.Label Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox End Class

Chap16/Grade Solution/Grade Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True True True True True

Chap16/Grade Solution/Grade Project/frmMain.vb

' Name: Grade Project ' Purpose: Display a letter grade based on the average of 3 test scores ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub txtTest1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtTest1.KeyPress ' allows the text box to accept only numbers, the period, and the Backspace key If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> "." AndAlso e.KeyChar <> ControlChars.Back Then e.Handled = True End If End Sub Private Sub txtTest2_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtTest2.KeyPress ' allows the text box to accept only numbers, the period, and the Backspace key If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> "." AndAlso e.KeyChar <> ControlChars.Back Then e.Handled = True End If End Sub Private Sub txtTest3_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtTest3.KeyPress ' allows the text box to accept only numbers, the period, and the Backspace key If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> "." AndAlso e.KeyChar <> ControlChars.Back Then e.Handled = True End If End Sub Private Sub txtTest1_TextChanged(sender As Object, e As EventArgs) Handles txtTest1.TextChanged lblGrade.Text = String.Empty End Sub Private Sub txtTest2_TextChanged(sender As Object, e As EventArgs) Handles txtTest2.TextChanged lblGrade.Text = String.Empty End Sub Private Sub txtTest3_TextChanged(sender As Object, e As EventArgs) Handles txtTest3.TextChanged lblGrade.Text = String.Empty End Sub End Class

Chap16/Grade Solution/Grade Project/Grade Project.vbproj

Debug AnyCPU {E0178ACB-5E96-4B1C-8E8E-56F00BBA0D1D} WinExe Grade_Project.My.MyApplication Grade_Project Grade Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Grade Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Grade Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/Grade Solution/Grade Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Grade_Project.frmMain End Sub End Class End Namespace

Chap16/Grade Solution/Grade Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/Grade Solution/Grade Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Grade Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Grade Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("55af527e-295b-460a-bf52-f97610b47e9e")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/Grade Solution/Grade Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Grade_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set resourceCulture = value End Set End Property '''<summary> ''' Looks up a localized resource of type System.Drawing.Bitmap. '''</summary> Friend ReadOnly Property TestScore() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("TestScore", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace

Chap16/Grade Solution/Grade Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ..\Resources\TestScore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Chap16/Grade Solution/Grade Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Grade_Project.My.MySettings Get Return Global.Grade_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/Grade Solution/Grade Project/My Project/Settings.settings

Chap16/Grade Solution/Grade Project/Resources/TestScore.png

Chap16/Grade Solution/Grade Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Grade Project", "Grade Project\Grade Project.vbproj", "{E0178ACB-5E96-4B1C-8E8E-56F00BBA0D1D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E0178ACB-5E96-4B1C-8E8E-56F00BBA0D1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E0178ACB-5E96-4B1C-8E8E-56F00BBA0D1D}.Debug|Any CPU.Build.0 = Debug|Any CPU {E0178ACB-5E96-4B1C-8E8E-56F00BBA0D1D}.Release|Any CPU.ActiveCfg = Release|Any CPU {E0178ACB-5E96-4B1C-8E8E-56F00BBA0D1D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap16/SwatTheBugs Solution/SwatTheBugs Project/App.config

Chap16/SwatTheBugs Solution/SwatTheBugs Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.txtFirst = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.txtSecond = New System.Windows.Forms.TextBox() Me.btnCalc = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.Label3 = New System.Windows.Forms.Label() Me.lblDifference = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(26, 31) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(94, 20) Me.Label1.TabIndex = 0 Me.Label1.Text = "&First number:" ' 'txtFirst ' Me.txtFirst.Location = New System.Drawing.Point(31, 55) Me.txtFirst.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.txtFirst.Name = "txtFirst" Me.txtFirst.Size = New System.Drawing.Size(57, 27) Me.txtFirst.TabIndex = 1 ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(165, 31) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(116, 20) Me.Label2.TabIndex = 2 Me.Label2.Text = "&Second number:" ' 'txtSecond ' Me.txtSecond.Location = New System.Drawing.Point(169, 55) Me.txtSecond.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.txtSecond.Name = "txtSecond" Me.txtSecond.Size = New System.Drawing.Size(57, 27) Me.txtSecond.TabIndex = 3 ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(289, 46) Me.btnCalc.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(103, 39) Me.btnCalc.TabIndex = 4 Me.btnCalc.Text = "&Calculate" Me.btnCalc.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(289, 92) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(103, 39) Me.btnExit.TabIndex = 5 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(26, 135) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(232, 20) Me.Label3.TabIndex = 6 Me.Label3.Text = "Difference (as a positive number):" ' 'lblDifference ' Me.lblDifference.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblDifference.Font = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblDifference.Location = New System.Drawing.Point(31, 159) Me.lblDifference.Name = "lblDifference" Me.lblDifference.Size = New System.Drawing.Size(228, 36) Me.lblDifference.TabIndex = 7 Me.lblDifference.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(432, 247) Me.Controls.Add(Me.lblDifference) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCalc) Me.Controls.Add(Me.txtSecond) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.txtFirst) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "SwatTheBugs" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtFirst As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents txtSecond As System.Windows.Forms.TextBox Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents lblDifference As System.Windows.Forms.Label End Class

Chap16/SwatTheBugs Solution/SwatTheBugs Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True True True

Chap16/SwatTheBugs Solution/SwatTheBugs Project/frmMain.vb

' Name: SwatTheBugs Project ' Purpose: Display the positive difference between two numbers ' Programmer: <your name> on <current date> Public Class frmMain Private Sub SwapNumbers(ByVal intNum1 As Integer, ByVal intnum2 As Integer) ' swaps the numbers Dim intTemp As Integer intTemp = intNum1 intNum1 = intnum2 intnum2 = intTemp End Sub Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click ' subtracts the smaller number from the larger number ' and displays the difference Dim intFirst As Integer Dim intSecond As Integer Dim intDiff As Integer Integer.TryParse(txtFirst.Text, intFirst) Integer.TryParse(txtSecond.Text, intSecond) If intSecond > intFirst Then Call SwapNumbers(intFirst, intSecond) End If intDiff = intFirst - intSecond lblDifference.Text = intDiff End Sub Private Sub txtFirst_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtFirst.KeyPress ' allows the text box to accept only numbers and the Backspace key If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> ControlChars.Back Then e.Handled = True End If End Sub Private Sub txtSecond_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtSecond.KeyPress ' allows the text box to accept only numbers and the Backspace key If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> ControlChars.Back Then e.Handled = True End If End Sub Private Sub txtFirst_TextChanged(sender As Object, e As EventArgs) Handles txtFirst.TextChanged lblDifference.Text = String.Empty End Sub Private Sub txtSecond_TextChanged(sender As Object, e As EventArgs) Handles txtSecond.TextChanged lblDifference.Text = String.Empty End Sub End Class

Chap16/SwatTheBugs Solution/SwatTheBugs Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.SwatTheBugs_Project.frmMain End Sub End Class End Namespace

Chap16/SwatTheBugs Solution/SwatTheBugs Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/SwatTheBugs Solution/SwatTheBugs Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("SwatTheBugs Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("SwatTheBugs Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("9cffc654-62fc-4fb7-80f5-0a70be23da64")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/SwatTheBugs Solution/SwatTheBugs Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("SwatTheBugs_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap16/SwatTheBugs Solution/SwatTheBugs Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap16/SwatTheBugs Solution/SwatTheBugs Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.SwatTheBugs_Project.My.MySettings Get Return Global.SwatTheBugs_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/SwatTheBugs Solution/SwatTheBugs Project/My Project/Settings.settings

Chap16/SwatTheBugs Solution/SwatTheBugs Project/SwatTheBugs Project.vbproj

Debug AnyCPU {150209D3-70D5-46EB-8AA3-A6E5DD7AE46F} WinExe SwatTheBugs_Project.My.MyApplication SwatTheBugs_Project SwatTheBugs Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ SwatTheBugs Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ SwatTheBugs Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/SwatTheBugs Solution/SwatTheBugs Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SwatTheBugs Project", "SwatTheBugs Project\SwatTheBugs Project.vbproj", "{150209D3-70D5-46EB-8AA3-A6E5DD7AE46F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {150209D3-70D5-46EB-8AA3-A6E5DD7AE46F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {150209D3-70D5-46EB-8AA3-A6E5DD7AE46F}.Debug|Any CPU.Build.0 = Debug|Any CPU {150209D3-70D5-46EB-8AA3-A6E5DD7AE46F}.Release|Any CPU.ActiveCfg = Release|Any CPU {150209D3-70D5-46EB-8AA3-A6E5DD7AE46F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap16/Temperature Solution/Temperature Project/App.config

Chap16/Temperature Solution/Temperature Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Public Class frmMain Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing AndAlso components IsNot Nothing Then components.Dispose() End If MyBase.Dispose(disposing) 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.radCelsius = New System.Windows.Forms.RadioButton() Me.radFahrenheit = New System.Windows.Forms.RadioButton() Me.Label1 = New System.Windows.Forms.Label() Me.txtTemp = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.lblResult = New System.Windows.Forms.Label() Me.btnConvert = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'radCelsius ' Me.radCelsius.Checked = True Me.radCelsius.Location = New System.Drawing.Point(191, 47) Me.radCelsius.Margin = New System.Windows.Forms.Padding(2) Me.radCelsius.Name = "radCelsius" Me.radCelsius.Size = New System.Drawing.Size(135, 26) Me.radCelsius.TabIndex = 2 Me.radCelsius.TabStop = True Me.radCelsius.Text = "To &Celsius" ' 'radFahrenheit ' Me.radFahrenheit.Location = New System.Drawing.Point(191, 84) Me.radFahrenheit.Margin = New System.Windows.Forms.Padding(2) Me.radFahrenheit.Name = "radFahrenheit" Me.radFahrenheit.Size = New System.Drawing.Size(135, 26) Me.radFahrenheit.TabIndex = 3 Me.radFahrenheit.Text = "To &Fahrenheit" ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(54, 49) Me.Label1.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(97, 20) Me.Label1.TabIndex = 0 Me.Label1.Text = "&Temperature:" ' 'txtTemp ' Me.txtTemp.Location = New System.Drawing.Point(57, 72) Me.txtTemp.Margin = New System.Windows.Forms.Padding(2) Me.txtTemp.Name = "txtTemp" Me.txtTemp.Size = New System.Drawing.Size(55, 27) Me.txtTemp.TabIndex = 1 ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(54, 128) Me.Label2.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(52, 20) Me.Label2.TabIndex = 6 Me.Label2.Text = "Result:" ' 'lblResult ' Me.lblResult.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblResult.Location = New System.Drawing.Point(57, 148) Me.lblResult.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblResult.Name = "lblResult" Me.lblResult.Size = New System.Drawing.Size(81, 30) Me.lblResult.TabIndex = 7 Me.lblResult.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnConvert ' Me.btnConvert.Location = New System.Drawing.Point(159, 139) Me.btnConvert.Margin = New System.Windows.Forms.Padding(2) Me.btnConvert.Name = "btnConvert" Me.btnConvert.Size = New System.Drawing.Size(90, 40) Me.btnConvert.TabIndex = 4 Me.btnConvert.Text = "Con&vert" ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(254, 139) Me.btnExit.Margin = New System.Windows.Forms.Padding(2) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(90, 40) Me.btnExit.TabIndex = 5 Me.btnExit.Text = "E&xit" ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(398, 226) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnConvert) Me.Controls.Add(Me.lblResult) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.txtTemp) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.radFahrenheit) Me.Controls.Add(Me.radCelsius) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.MaximizeBox = False Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Temperature Converter" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents radCelsius As System.Windows.Forms.RadioButton Friend WithEvents radFahrenheit As System.Windows.Forms.RadioButton Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtTemp As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents lblResult As System.Windows.Forms.Label Friend WithEvents btnConvert As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap16/Temperature Solution/Temperature Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True True True

Chap16/Temperature Solution/Temperature Project/frmMain.vb

' Name: Temperature Solution ' Purpose: Convert a temperature to either Celsius or Fahrenheit ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub radCelsius_Click(sender As Object, e As EventArgs) Handles radCelsius.CheckedChanged lblResult.Text = String.Empty End Sub Private Sub radFahrenheit_Click(sender As Object, e As EventArgs) Handles radFahrenheit.CheckedChanged lblResult.Text = String.Empty End Sub Private Sub txtTemp_TextChanged(sender As Object, e As EventArgs) Handles txtTemp.TextChanged lblResult.Text = String.Empty End Sub End Class

Chap16/Temperature Solution/Temperature Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Temperature_Project.frmMain End Sub End Class End Namespace

Chap16/Temperature Solution/Temperature Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/Temperature Solution/Temperature Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Temperature Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Temperature Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("01fe5971-3acc-44e0-a20f-3e14344c7969")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/Temperature Solution/Temperature Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Temperature_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap16/Temperature Solution/Temperature Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap16/Temperature Solution/Temperature Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Temperature_Project.My.MySettings Get Return Global.Temperature_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/Temperature Solution/Temperature Project/My Project/Settings.settings

Chap16/Temperature Solution/Temperature Project/Temperature Project.vbproj

Debug AnyCPU {FD2ED1B1-D8A1-4AAE-84C7-8F8A90B00D15} WinExe Temperature_Project.My.MyApplication Temperature_Project Temperature Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Temperature Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Temperature Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/Temperature Solution/Temperature Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Temperature Project", "Temperature Project\Temperature Project.vbproj", "{FD2ED1B1-D8A1-4AAE-84C7-8F8A90B00D15}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {FD2ED1B1-D8A1-4AAE-84C7-8F8A90B00D15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD2ED1B1-D8A1-4AAE-84C7-8F8A90B00D15}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD2ED1B1-D8A1-4AAE-84C7-8F8A90B00D15}.Release|Any CPU.ActiveCfg = Release|Any CPU {FD2ED1B1-D8A1-4AAE-84C7-8F8A90B00D15}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap16/Translator Solution/Translator Project/App.config

Chap16/Translator Solution/Translator Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.GroupBox1 = New System.Windows.Forms.GroupBox() Me.radFather = New System.Windows.Forms.RadioButton() Me.radMother = New System.Windows.Forms.RadioButton() Me.radBrother = New System.Windows.Forms.RadioButton() Me.radSister = New System.Windows.Forms.RadioButton() Me.GroupBox2 = New System.Windows.Forms.GroupBox() Me.radItalian = New System.Windows.Forms.RadioButton() Me.radSpanish = New System.Windows.Forms.RadioButton() Me.radFrench = New System.Windows.Forms.RadioButton() Me.btnTranslate = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.lblTranslated = New System.Windows.Forms.Label() Me.GroupBox1.SuspendLayout() Me.GroupBox2.SuspendLayout() Me.SuspendLayout() ' 'GroupBox1 ' Me.GroupBox1.Controls.Add(Me.radFather) Me.GroupBox1.Controls.Add(Me.radMother) Me.GroupBox1.Controls.Add(Me.radBrother) Me.GroupBox1.Controls.Add(Me.radSister) Me.GroupBox1.Location = New System.Drawing.Point(13, 13) Me.GroupBox1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Padding = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.GroupBox1.Size = New System.Drawing.Size(158, 168) Me.GroupBox1.TabIndex = 2 Me.GroupBox1.TabStop = False Me.GroupBox1.Text = "English" ' 'radFather ' Me.radFather.Location = New System.Drawing.Point(15, 62) Me.radFather.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.radFather.Name = "radFather" Me.radFather.Size = New System.Drawing.Size(128, 25) Me.radFather.TabIndex = 1 Me.radFather.Text = "&Father" Me.radFather.UseVisualStyleBackColor = True ' 'radMother ' Me.radMother.Checked = True Me.radMother.Location = New System.Drawing.Point(15, 31) Me.radMother.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.radMother.Name = "radMother" Me.radMother.Size = New System.Drawing.Size(128, 25) Me.radMother.TabIndex = 0 Me.radMother.TabStop = True Me.radMother.Text = "&Mother" Me.radMother.UseVisualStyleBackColor = True ' 'radBrother ' Me.radBrother.Location = New System.Drawing.Point(15, 126) Me.radBrother.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.radBrother.Name = "radBrother" Me.radBrother.Size = New System.Drawing.Size(128, 25) Me.radBrother.TabIndex = 3 Me.radBrother.Text = "&Brother" Me.radBrother.UseVisualStyleBackColor = True ' 'radSister ' Me.radSister.Location = New System.Drawing.Point(15, 94) Me.radSister.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.radSister.Name = "radSister" Me.radSister.Size = New System.Drawing.Size(128, 25) Me.radSister.TabIndex = 2 Me.radSister.Text = "&Sister" Me.radSister.UseVisualStyleBackColor = True ' 'GroupBox2 ' Me.GroupBox2.Controls.Add(Me.radItalian) Me.GroupBox2.Controls.Add(Me.radSpanish) Me.GroupBox2.Controls.Add(Me.radFrench) Me.GroupBox2.Location = New System.Drawing.Point(198, 14) Me.GroupBox2.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Padding = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.GroupBox2.Size = New System.Drawing.Size(126, 132) Me.GroupBox2.TabIndex = 3 Me.GroupBox2.TabStop = False Me.GroupBox2.Text = "Translate to" ' 'radItalian ' Me.radItalian.Location = New System.Drawing.Point(15, 62) Me.radItalian.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.radItalian.Name = "radItalian" Me.radItalian.Size = New System.Drawing.Size(97, 25) Me.radItalian.TabIndex = 1 Me.radItalian.Text = "&Italian" Me.radItalian.UseVisualStyleBackColor = True ' 'radSpanish ' Me.radSpanish.Location = New System.Drawing.Point(15, 94) Me.radSpanish.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.radSpanish.Name = "radSpanish" Me.radSpanish.Size = New System.Drawing.Size(97, 25) Me.radSpanish.TabIndex = 2 Me.radSpanish.Text = "S&panish" Me.radSpanish.UseVisualStyleBackColor = True ' 'radFrench ' Me.radFrench.Checked = True Me.radFrench.Location = New System.Drawing.Point(15, 31) Me.radFrench.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.radFrench.Name = "radFrench" Me.radFrench.Size = New System.Drawing.Size(97, 25) Me.radFrench.TabIndex = 0 Me.radFrench.TabStop = True Me.radFrench.Text = "Frenc&h" Me.radFrench.UseVisualStyleBackColor = True ' 'btnTranslate ' Me.btnTranslate.Location = New System.Drawing.Point(344, 14) Me.btnTranslate.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnTranslate.Name = "btnTranslate" Me.btnTranslate.Size = New System.Drawing.Size(86, 33) Me.btnTranslate.TabIndex = 0 Me.btnTranslate.Text = "&Translate" Me.btnTranslate.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(344, 54) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(86, 33) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'lblTranslated ' Me.lblTranslated.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblTranslated.Location = New System.Drawing.Point(198, 154) Me.lblTranslated.Name = "lblTranslated" Me.lblTranslated.Size = New System.Drawing.Size(125, 29) Me.lblTranslated.TabIndex = 4 Me.lblTranslated.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(450, 208) Me.Controls.Add(Me.lblTranslated) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnTranslate) Me.Controls.Add(Me.GroupBox2) Me.Controls.Add(Me.GroupBox1) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.MaximizeBox = False Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Translator" Me.GroupBox1.ResumeLayout(False) Me.GroupBox2.ResumeLayout(False) Me.ResumeLayout(False) End Sub Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents radFather As System.Windows.Forms.RadioButton Friend WithEvents radMother As System.Windows.Forms.RadioButton Friend WithEvents radBrother As System.Windows.Forms.RadioButton Friend WithEvents radSister As System.Windows.Forms.RadioButton Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox Friend WithEvents radItalian As System.Windows.Forms.RadioButton Friend WithEvents radSpanish As System.Windows.Forms.RadioButton Friend WithEvents radFrench As System.Windows.Forms.RadioButton Friend WithEvents btnTranslate As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents lblTranslated As System.Windows.Forms.Label End Class

Chap16/Translator Solution/Translator Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True True True True True True True

Chap16/Translator Solution/Translator Project/frmMain.vb

' Name: Translator Project ' Purpose: Translate English words into French, Spanish, or Italian ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub radBrother_CheckedChanged(sender As Object, e As EventArgs) Handles radBrother.CheckedChanged lblTranslated.Text = String.Empty End Sub Private Sub radFather_CheckedChanged(sender As Object, e As EventArgs) Handles radFather.CheckedChanged lblTranslated.Text = String.Empty End Sub Private Sub radFrench_CheckedChanged(sender As Object, e As EventArgs) Handles radFrench.CheckedChanged lblTranslated.Text = String.Empty End Sub Private Sub radItalian_CheckedChanged(sender As Object, e As EventArgs) Handles radItalian.CheckedChanged lblTranslated.Text = String.Empty End Sub Private Sub radMother_CheckedChanged(sender As Object, e As EventArgs) Handles radMother.CheckedChanged lblTranslated.Text = String.Empty End Sub Private Sub radSister_CheckedChanged(sender As Object, e As EventArgs) Handles radSister.CheckedChanged lblTranslated.Text = String.Empty End Sub Private Sub radSpanish_CheckedChanged(sender As Object, e As EventArgs) Handles radSpanish.CheckedChanged lblTranslated.Text = String.Empty End Sub End Class

Chap16/Translator Solution/Translator Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Translator_Project.frmMain End Sub End Class End Namespace

Chap16/Translator Solution/Translator Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/Translator Solution/Translator Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Translator Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Translator Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("b42f72e7-687e-4c25-95f2-8f55a5d6f029")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/Translator Solution/Translator Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Translator_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap16/Translator Solution/Translator Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap16/Translator Solution/Translator Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Translator_Project.My.MySettings Get Return Global.Translator_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/Translator Solution/Translator Project/My Project/Settings.settings

Chap16/Translator Solution/Translator Project/Translator Project.vbproj

Debug AnyCPU {3261EB00-4B2D-4F50-A0FC-931747007FB2} WinExe Translator_Project.My.MyApplication Translator_Project Translator Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Translator Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Translator Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/Translator Solution/Translator Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Translator Project", "Translator Project\Translator Project.vbproj", "{3261EB00-4B2D-4F50-A0FC-931747007FB2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {3261EB00-4B2D-4F50-A0FC-931747007FB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3261EB00-4B2D-4F50-A0FC-931747007FB2}.Debug|Any CPU.Build.0 = Debug|Any CPU {3261EB00-4B2D-4F50-A0FC-931747007FB2}.Release|Any CPU.ActiveCfg = Release|Any CPU {3261EB00-4B2D-4F50-A0FC-931747007FB2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap16/Weekly Pay Solution/Weekly Pay Project/App.config

Chap16/Weekly Pay Solution/Weekly Pay Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Panel1 = New System.Windows.Forms.Panel() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() Me.lblRegular = New System.Windows.Forms.Label() Me.lblGross = New System.Windows.Forms.Label() Me.lblOvertime = New System.Windows.Forms.Label() Me.btnExit = New System.Windows.Forms.Button() Me.btnClear = New System.Windows.Forms.Button() Me.btnCalc = New System.Windows.Forms.Button() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.txtHours = New System.Windows.Forms.TextBox() Me.txtRate = New System.Windows.Forms.TextBox() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Panel1.Controls.Add(Me.Label4) Me.Panel1.Controls.Add(Me.Label3) Me.Panel1.Controls.Add(Me.Label5) Me.Panel1.Controls.Add(Me.lblRegular) Me.Panel1.Controls.Add(Me.lblGross) Me.Panel1.Controls.Add(Me.lblOvertime) Me.Panel1.Location = New System.Drawing.Point(30, 80) Me.Panel1.Margin = New System.Windows.Forms.Padding(2) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(343, 83) Me.Panel1.TabIndex = 7 ' 'Label4 ' Me.Label4.AutoSize = True Me.Label4.Location = New System.Drawing.Point(119, 15) Me.Label4.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(89, 17) Me.Label4.TabIndex = 2 Me.Label4.Text = "Overtime pay:" ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(17, 15) Me.Label3.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(81, 17) Me.Label3.TabIndex = 0 Me.Label3.Text = "Regular pay:" ' 'Label5 ' Me.Label5.AutoSize = True Me.Label5.Location = New System.Drawing.Point(231, 15) Me.Label5.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(70, 17) Me.Label5.TabIndex = 4 Me.Label5.Text = "Gross pay:" ' 'lblRegular ' Me.lblRegular.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblRegular.Location = New System.Drawing.Point(18, 36) Me.lblRegular.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblRegular.Name = "lblRegular" Me.lblRegular.Size = New System.Drawing.Size(84, 26) Me.lblRegular.TabIndex = 1 Me.lblRegular.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'lblGross ' Me.lblGross.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblGross.Location = New System.Drawing.Point(235, 36) Me.lblGross.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblGross.Name = "lblGross" Me.lblGross.Size = New System.Drawing.Size(84, 26) Me.lblGross.TabIndex = 5 Me.lblGross.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'lblOvertime ' Me.lblOvertime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblOvertime.Location = New System.Drawing.Point(123, 36) Me.lblOvertime.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblOvertime.Name = "lblOvertime" Me.lblOvertime.Size = New System.Drawing.Size(84, 26) Me.lblOvertime.TabIndex = 3 Me.lblOvertime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(294, 187) Me.btnExit.Margin = New System.Windows.Forms.Padding(2) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(79, 28) Me.btnExit.TabIndex = 6 Me.btnExit.Text = "E&xit" ' 'btnClear ' Me.btnClear.Location = New System.Drawing.Point(210, 187) Me.btnClear.Margin = New System.Windows.Forms.Padding(2) Me.btnClear.Name = "btnClear" Me.btnClear.Size = New System.Drawing.Size(79, 28) Me.btnClear.TabIndex = 5 Me.btnClear.Text = "C&lear" ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(127, 187) Me.btnCalc.Margin = New System.Windows.Forms.Padding(2) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(79, 28) Me.btnCalc.TabIndex = 4 Me.btnCalc.Text = "&Calculate" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(223, 20) Me.Label2.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(37, 17) Me.Label2.TabIndex = 2 Me.Label2.Text = "&Rate:" ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(123, 20) Me.Label1.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(46, 17) Me.Label1.TabIndex = 0 Me.Label1.Text = "&Hours:" ' 'txtHours ' Me.txtHours.Location = New System.Drawing.Point(126, 40) Me.txtHours.Name = "txtHours" Me.txtHours.Size = New System.Drawing.Size(54, 25) Me.txtHours.TabIndex = 1 ' 'txtRate ' Me.txtRate.Location = New System.Drawing.Point(226, 40) Me.txtRate.Name = "txtRate" Me.txtRate.Size = New System.Drawing.Size(54, 25) Me.txtRate.TabIndex = 3 ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(402, 237) Me.Controls.Add(Me.txtRate) Me.Controls.Add(Me.txtHours) Me.Controls.Add(Me.Panel1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnClear) Me.Controls.Add(Me.btnCalc) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Weekly Pay" Me.Panel1.ResumeLayout(False) Me.Panel1.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents lblRegular As System.Windows.Forms.Label Friend WithEvents lblGross As System.Windows.Forms.Label Friend WithEvents lblOvertime As System.Windows.Forms.Label Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents btnClear As System.Windows.Forms.Button Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtHours As System.Windows.Forms.TextBox Friend WithEvents txtRate As System.Windows.Forms.TextBox End Class

Chap16/Weekly Pay Solution/Weekly Pay Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True True True True True True True True True

Chap16/Weekly Pay Solution/Weekly Pay Project/frmMain.vb

' Name: Weekly Pay Project ' Purpose: Display an employee's regular, overtime, and gross weekly pay ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click ' calculates the regular pay, overtime pay, ' and gross pay Dim decHours As Decimal Dim decRate As Decimal Dim decRegular As Decimal Dim decOvertime As Decimal Dim decGross As Decimal Decimal.TryParse(txtHours.Text, decHours) Decimal.TryParse(txtRate.Text, decRate) If decHours <= 40 Then ' calculate regular pay only decRegular = decHours * decRate Else ' calculate regular and overtime pay decRegular = 40 * decRate decOvertime = (decHours - 40) * decRate * 1.5 End If ' calculate gross pay decGross = decRegular + decOvertime ' display calculated results lblRegular.Text = decRegular.ToString("N2") lblOvertime.Text = decOvertime.ToString("N2") lblGross.Text = decGross.ToString("N2") End Sub Private Sub txtHours_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtHours.KeyPress ' allows the text box to accept only numbers, the period, and the Backspace key If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> "." AndAlso e.KeyChar <> ControlChars.Back Then e.Handled = True End If End Sub Private Sub txtRate_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtRate.KeyPress ' allows the text box to accept only numbers, the period, and the Backspace key If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> "." AndAlso e.KeyChar <> ControlChars.Back Then e.Handled = True End If End Sub End Class

Chap16/Weekly Pay Solution/Weekly Pay Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Weekly_Pay_Project.frmMain End Sub End Class End Namespace

Chap16/Weekly Pay Solution/Weekly Pay Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap16/Weekly Pay Solution/Weekly Pay Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Weekly Pay Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Weekly Pay Project")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("f3724a55-f47b-4736-ab36-4059d93c014a")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap16/Weekly Pay Solution/Weekly Pay Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Weekly_Pay_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap16/Weekly Pay Solution/Weekly Pay Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap16/Weekly Pay Solution/Weekly Pay Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Weekly_Pay_Project.My.MySettings Get Return Global.Weekly_Pay_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap16/Weekly Pay Solution/Weekly Pay Project/My Project/Settings.settings

Chap16/Weekly Pay Solution/Weekly Pay Project/Weekly Pay Project.vbproj

Debug AnyCPU {6E2FA350-C311-46A2-984E-4507643E74B8} WinExe Weekly_Pay_Project.My.MyApplication Weekly_Pay_Project Weekly Pay Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Weekly Pay Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Weekly Pay Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap16/Weekly Pay Solution/Weekly Pay Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Weekly Pay Project", "Weekly Pay Project\Weekly Pay Project.vbproj", "{6E2FA350-C311-46A2-984E-4507643E74B8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6E2FA350-C311-46A2-984E-4507643E74B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6E2FA350-C311-46A2-984E-4507643E74B8}.Debug|Any CPU.Build.0 = Debug|Any CPU {6E2FA350-C311-46A2-984E-4507643E74B8}.Release|Any CPU.ActiveCfg = Release|Any CPU {6E2FA350-C311-46A2-984E-4507643E74B8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/Cartwright Solution/Cartwright Project/App.config

Chap15/Cartwright Solution/Cartwright Project/Cartwright Project.vbproj

Debug AnyCPU {0DAF411D-C413-4972-9F0F-D4541FF6A4F6} WinExe Cartwright_Project.My.MyApplication Cartwright_Project Cartwright Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Cartwright Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Cartwright Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/Cartwright Solution/Cartwright Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.btnExit = New System.Windows.Forms.Button() Me.btnDisplay = New System.Windows.Forms.Button() Me.txtTotalSales = New System.Windows.Forms.TextBox() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(28, 39) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(127, 17) Me.Label1.TabIndex = 2 Me.Label1.Text = "Total sales amounts:" ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(257, 269) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(75, 41) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(144, 269) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(107, 41) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display Totals" Me.btnDisplay.UseVisualStyleBackColor = True ' 'txtTotalSales ' Me.txtTotalSales.Font = New System.Drawing.Font("Courier New", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtTotalSales.Location = New System.Drawing.Point(32, 60) Me.txtTotalSales.Multiline = True Me.txtTotalSales.Name = "txtTotalSales" Me.txtTotalSales.ReadOnly = True Me.txtTotalSales.ScrollBars = System.Windows.Forms.ScrollBars.Vertical Me.txtTotalSales.Size = New System.Drawing.Size(300, 181) Me.txtTotalSales.TabIndex = 3 ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(368, 341) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.txtTotalSales) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Cartwright Industries" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents txtTotalSales As System.Windows.Forms.TextBox End Class

Chap15/Cartwright Solution/Cartwright Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True

Chap15/Cartwright Solution/Cartwright Project/frmMain.vb

' Name: Cartwright Project ' Purpose: Display each salesperson's total sales and the total company sales ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class

Chap15/Cartwright Solution/Cartwright Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Cartwright_Project.frmMain End Sub End Class End Namespace

Chap15/Cartwright Solution/Cartwright Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/Cartwright Solution/Cartwright Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Cartwright Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Cartwright Project")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("eb653301-88fc-414f-b733-8f7a01f87065")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/Cartwright Solution/Cartwright Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Cartwright_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/Cartwright Solution/Cartwright Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/Cartwright Solution/Cartwright Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Cartwright_Project.My.MySettings Get Return Global.Cartwright_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/Cartwright Solution/Cartwright Project/My Project/Settings.settings

Chap15/Cartwright Solution/Cartwright Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Cartwright Project", "Cartwright Project\Cartwright Project.vbproj", "{0DAF411D-C413-4972-9F0F-D4541FF6A4F6}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {0DAF411D-C413-4972-9F0F-D4541FF6A4F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0DAF411D-C413-4972-9F0F-D4541FF6A4F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {0DAF411D-C413-4972-9F0F-D4541FF6A4F6}.Release|Any CPU.ActiveCfg = Release|Any CPU {0DAF411D-C413-4972-9F0F-D4541FF6A4F6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/Clock Solution/Clock Project/App.config

Chap15/Clock Solution/Clock Project/Clock Project.vbproj

Debug AnyCPU {CDDDC99C-D9E9-4C64-BE54-2C9E410B2203} WinExe Clock_Project.My.MyApplication Clock_Project Clock Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Clock Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Clock Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/Clock Solution/Clock Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.PictureBox1 = New System.Windows.Forms.PictureBox() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.lblMinutes = New System.Windows.Forms.Label() Me.lblSeconds = New System.Windows.Forms.Label() Me.btnStart = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'PictureBox1 ' Me.PictureBox1.Image = Global.Clock_Project.My.Resources.Resources.Clock Me.PictureBox1.Location = New System.Drawing.Point(39, 12) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(164, 157) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 0 Me.PictureBox1.TabStop = False ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(35, 189) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(64, 20) Me.Label1.TabIndex = 2 Me.Label1.Text = "Minutes:" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(136, 189) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(67, 20) Me.Label2.TabIndex = 4 Me.Label2.Text = "Seconds:" ' 'lblMinutes ' Me.lblMinutes.AutoSize = True Me.lblMinutes.ForeColor = System.Drawing.Color.Red Me.lblMinutes.Location = New System.Drawing.Point(56, 213) Me.lblMinutes.Name = "lblMinutes" Me.lblMinutes.Size = New System.Drawing.Size(17, 20) Me.lblMinutes.TabIndex = 3 Me.lblMinutes.Text = "0" Me.lblMinutes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'lblSeconds ' Me.lblSeconds.AutoSize = True Me.lblSeconds.ForeColor = System.Drawing.Color.Blue Me.lblSeconds.Location = New System.Drawing.Point(157, 213) Me.lblSeconds.Name = "lblSeconds" Me.lblSeconds.Size = New System.Drawing.Size(17, 20) Me.lblSeconds.TabIndex = 5 Me.lblSeconds.Text = "0" Me.lblSeconds.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnStart ' Me.btnStart.Location = New System.Drawing.Point(34, 265) Me.btnStart.Name = "btnStart" Me.btnStart.Size = New System.Drawing.Size(75, 32) Me.btnStart.TabIndex = 0 Me.btnStart.Text = "&Start" Me.btnStart.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(135, 265) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(75, 32) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(245, 323) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnStart) Me.Controls.Add(Me.lblSeconds) Me.Controls.Add(Me.lblMinutes) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.PictureBox1) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Clock" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents lblMinutes As System.Windows.Forms.Label Friend WithEvents lblSeconds As System.Windows.Forms.Label Friend WithEvents btnStart As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap15/Clock Solution/Clock Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True True

Chap15/Clock Solution/Clock Project/frmMain.vb

' Name: Clock Project ' Purpose: Displays minutes and seconds ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnStart_Click(sender As Object, e As EventArgs) Handles btnStart.Click ' displays minutes (from 0 through 2 only) ' and seconds (from 0 through 5 only) End Sub End Class

Chap15/Clock Solution/Clock Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.17626 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Clock_Project.frmMain End Sub End Class End Namespace

Chap15/Clock Solution/Clock Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/Clock Solution/Clock Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Clock Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Clock Project")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("875cd89b-6715-4d2f-ac66-5c148a1bd2f1")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/Clock Solution/Clock Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.17626 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Clock_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set resourceCulture = value End Set End Property '''<summary> ''' Looks up a localized resource of type System.Drawing.Bitmap. '''</summary> Friend ReadOnly Property Clock() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("Clock", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace

Chap15/Clock Solution/Clock Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ..\Resources\Clock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Chap15/Clock Solution/Clock Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.17626 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Clock_Project.My.MySettings Get Return Global.Clock_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/Clock Solution/Clock Project/My Project/Settings.settings

Chap15/Clock Solution/Clock Project/Resources/Clock.png

Chap15/Clock Solution/Clock Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Clock Project", "Clock Project\Clock Project.vbproj", "{CDDDC99C-D9E9-4C64-BE54-2C9E410B2203}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {CDDDC99C-D9E9-4C64-BE54-2C9E410B2203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CDDDC99C-D9E9-4C64-BE54-2C9E410B2203}.Debug|Any CPU.Build.0 = Debug|Any CPU {CDDDC99C-D9E9-4C64-BE54-2C9E410B2203}.Release|Any CPU.ActiveCfg = Release|Any CPU {CDDDC99C-D9E9-4C64-BE54-2C9E410B2203}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/Commission Solution/Commission Project/App.config

Chap15/Commission Solution/Commission Project/Commission Project.vbproj

Debug AnyCPU {72144E2C-B646-4AFF-9388-A80846B81D5D} WinExe Commission_Project.My.MyApplication Commission_Project Commission Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Commission Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Commission Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/Commission Solution/Commission Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.btnDisplay = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.txtCommission = New System.Windows.Forms.TextBox() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(45, 31) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(99, 20) Me.Label1.TabIndex = 2 Me.Label1.Text = "Commissions:" ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(243, 31) Me.btnDisplay.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(83, 39) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(243, 76) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(83, 39) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'txtCommission ' Me.txtCommission.Location = New System.Drawing.Point(49, 54) Me.txtCommission.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.txtCommission.Multiline = True Me.txtCommission.Name = "txtCommission" Me.txtCommission.ReadOnly = True Me.txtCommission.ScrollBars = System.Windows.Forms.ScrollBars.Vertical Me.txtCommission.Size = New System.Drawing.Size(168, 229) Me.txtCommission.TabIndex = 3 ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(370, 315) Me.Controls.Add(Me.txtCommission) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Commission Calculator" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents txtCommission As System.Windows.Forms.TextBox End Class

Chap15/Commission Solution/Commission Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True

Chap15/Commission Solution/Commission Project/frmMain.vb

' Name: Commission Project ' Purpose: Display commission amounts ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class

Chap15/Commission Solution/Commission Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Commission_Project.frmMain End Sub End Class End Namespace

Chap15/Commission Solution/Commission Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/Commission Solution/Commission Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Commission Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Commission Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("75b22e03-d80f-4747-aa57-c4ee2d457aee")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/Commission Solution/Commission Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Commission_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/Commission Solution/Commission Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/Commission Solution/Commission Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Commission_Project.My.MySettings Get Return Global.Commission_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/Commission Solution/Commission Project/My Project/Settings.settings

Chap15/Commission Solution/Commission Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Commission Project", "Commission Project\Commission Project.vbproj", "{72144E2C-B646-4AFF-9388-A80846B81D5D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {72144E2C-B646-4AFF-9388-A80846B81D5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {72144E2C-B646-4AFF-9388-A80846B81D5D}.Debug|Any CPU.Build.0 = Debug|Any CPU {72144E2C-B646-4AFF-9388-A80846B81D5D}.Release|Any CPU.ActiveCfg = Release|Any CPU {72144E2C-B646-4AFF-9388-A80846B81D5D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/Discount Solution/Discount Project/App.config

Chap15/Discount Solution/Discount Project/Discount Project.vbproj

Debug AnyCPU {E0989B9D-E445-4E27-A09F-54367AD8752C} WinExe Discount_Project.My.MyApplication Discount_Project Discount Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Discount Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Discount Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/Discount Solution/Discount Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.btnDisplay = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.txtDiscounts = New System.Windows.Forms.TextBox() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(25, 31) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(76, 20) Me.Label1.TabIndex = 2 Me.Label1.Text = "Discounts:" ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(223, 31) Me.btnDisplay.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(83, 39) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(223, 76) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(83, 39) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'txtDiscounts ' Me.txtDiscounts.Location = New System.Drawing.Point(29, 54) Me.txtDiscounts.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.txtDiscounts.Multiline = True Me.txtDiscounts.Name = "txtDiscounts" Me.txtDiscounts.ReadOnly = True Me.txtDiscounts.ScrollBars = System.Windows.Forms.ScrollBars.Vertical Me.txtDiscounts.Size = New System.Drawing.Size(153, 229) Me.txtDiscounts.TabIndex = 3 ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(333, 315) Me.Controls.Add(Me.txtDiscounts) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Discount Calculator" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents txtDiscounts As System.Windows.Forms.TextBox End Class

Chap15/Discount Solution/Discount Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True

Chap15/Discount Solution/Discount Project/frmMain.vb

' Name: Discount Project ' Purpose: Display discount amounts ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class

Chap15/Discount Solution/Discount Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Discount_Project.frmMain End Sub End Class End Namespace

Chap15/Discount Solution/Discount Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/Discount Solution/Discount Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Discount Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Discount Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("a8e8807e-b3dd-4182-a3d4-0c67064ae9b3")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/Discount Solution/Discount Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Discount_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/Discount Solution/Discount Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/Discount Solution/Discount Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Discount_Project.My.MySettings Get Return Global.Discount_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/Discount Solution/Discount Project/My Project/Settings.settings

Chap15/Discount Solution/Discount Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Discount Project", "Discount Project\Discount Project.vbproj", "{E0989B9D-E445-4E27-A09F-54367AD8752C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E0989B9D-E445-4E27-A09F-54367AD8752C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E0989B9D-E445-4E27-A09F-54367AD8752C}.Debug|Any CPU.Build.0 = Debug|Any CPU {E0989B9D-E445-4E27-A09F-54367AD8752C}.Release|Any CPU.ActiveCfg = Release|Any CPU {E0989B9D-E445-4E27-A09F-54367AD8752C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/FigureThisOut Solution/FigureThisOut Project/App.config

Chap15/FigureThisOut Solution/FigureThisOut Project/FigureThisOut Project.vbproj

Debug AnyCPU {6E40C41F-9D5E-4F50-984D-12EA3BD8D5E7} WinExe FigureThisOut_Project.My.MyApplication FigureThisOut_Project FigureThisOut Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ FigureThisOut Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ FigureThisOut Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/FigureThisOut Solution/FigureThisOut Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.lblAsterisks = New System.Windows.Forms.Label() Me.btnDisplay = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'lblAsterisks ' Me.lblAsterisks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblAsterisks.Font = New System.Drawing.Font("Segoe UI", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblAsterisks.Location = New System.Drawing.Point(90, 48) Me.lblAsterisks.Name = "lblAsterisks" Me.lblAsterisks.Size = New System.Drawing.Size(135, 124) Me.lblAsterisks.TabIndex = 2 ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(68, 198) Me.btnDisplay.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(86, 47) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(160, 198) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(86, 47) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(314, 289) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.lblAsterisks) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "FigureThisOut" Me.ResumeLayout(False) End Sub Friend WithEvents lblAsterisks As System.Windows.Forms.Label Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap15/FigureThisOut Solution/FigureThisOut Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True

Chap15/FigureThisOut Solution/FigureThisOut Project/frmMain.vb

' Name: FigureThisOut Project ' Purpose: Display asterisks ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click ' displays asterisks Dim intOuter As Integer Dim intInner As Integer intOuter = 3 Do While intOuter > 0 intInner = 1 Do While intInner <= intOuter lblAsterisks.Text = lblAsterisks.Text & "*" intInner += 1 Loop intOuter -= 1 lblAsterisks.Text = lblAsterisks.Text & ControlChars.NewLine Loop End Sub End Class

Chap15/FigureThisOut Solution/FigureThisOut Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.FigureThisOut_Project.frmMain End Sub End Class End Namespace

Chap15/FigureThisOut Solution/FigureThisOut Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/FigureThisOut Solution/FigureThisOut Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("FigureThisOut Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("FigureThisOut Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("40a0f110-fd67-46f6-980e-b4bf2ab2cf76")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/FigureThisOut Solution/FigureThisOut Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("FigureThisOut_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/FigureThisOut Solution/FigureThisOut Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/FigureThisOut Solution/FigureThisOut Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.FigureThisOut_Project.My.MySettings Get Return Global.FigureThisOut_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/FigureThisOut Solution/FigureThisOut Project/My Project/Settings.settings

Chap15/FigureThisOut Solution/FigureThisOut Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FigureThisOut Project", "FigureThisOut Project\FigureThisOut Project.vbproj", "{6E40C41F-9D5E-4F50-984D-12EA3BD8D5E7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6E40C41F-9D5E-4F50-984D-12EA3BD8D5E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6E40C41F-9D5E-4F50-984D-12EA3BD8D5E7}.Debug|Any CPU.Build.0 = Debug|Any CPU {6E40C41F-9D5E-4F50-984D-12EA3BD8D5E7}.Release|Any CPU.ActiveCfg = Release|Any CPU {6E40C41F-9D5E-4F50-984D-12EA3BD8D5E7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/Hotel Solution/Hotel Project/App.config

Chap15/Hotel Solution/Hotel Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.lblStars = New System.Windows.Forms.Label() Me.btnCreate = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'lblStars ' Me.lblStars.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblStars.Font = New System.Drawing.Font("Segoe UI", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblStars.Location = New System.Drawing.Point(27, 34) Me.lblStars.Name = "lblStars" Me.lblStars.Size = New System.Drawing.Size(200, 174) Me.lblStars.TabIndex = 2 ' 'btnCreate ' Me.btnCreate.Location = New System.Drawing.Point(27, 231) Me.btnCreate.Name = "btnCreate" Me.btnCreate.Size = New System.Drawing.Size(128, 37) Me.btnCreate.TabIndex = 0 Me.btnCreate.Text = "&Create Bar Chart" Me.btnCreate.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(161, 231) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(75, 37) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(261, 299) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCreate) Me.Controls.Add(Me.lblStars) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Hotel Ratings" Me.ResumeLayout(False) End Sub Friend WithEvents lblStars As System.Windows.Forms.Label Friend WithEvents btnCreate As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap15/Hotel Solution/Hotel Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True

Chap15/Hotel Solution/Hotel Project/frmMain.vb

' Name: Hotel Project ' Purpose: Display hotel ratings in a bar chart ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class

Chap15/Hotel Solution/Hotel Project/Hotel Project.vbproj

Debug AnyCPU {23F46E8E-1D6F-4EA8-B0AC-2F69887758C2} WinExe Hotel_Project.My.MyApplication Hotel_Project Hotel Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Hotel Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Hotel Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/Hotel Solution/Hotel Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Hotel_Project.frmMain End Sub End Class End Namespace

Chap15/Hotel Solution/Hotel Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/Hotel Solution/Hotel Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Hotel Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Hotel Project")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("e400e879-a140-491f-9e3b-bfd12092fe61")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/Hotel Solution/Hotel Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Hotel_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/Hotel Solution/Hotel Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/Hotel Solution/Hotel Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Hotel_Project.My.MySettings Get Return Global.Hotel_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/Hotel Solution/Hotel Project/My Project/Settings.settings

Chap15/Hotel Solution/Hotel Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Hotel Project", "Hotel Project\Hotel Project.vbproj", "{23F46E8E-1D6F-4EA8-B0AC-2F69887758C2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {23F46E8E-1D6F-4EA8-B0AC-2F69887758C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {23F46E8E-1D6F-4EA8-B0AC-2F69887758C2}.Debug|Any CPU.Build.0 = Debug|Any CPU {23F46E8E-1D6F-4EA8-B0AC-2F69887758C2}.Release|Any CPU.ActiveCfg = Release|Any CPU {23F46E8E-1D6F-4EA8-B0AC-2F69887758C2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/Investment Solution/Investment Project/App.config

Chap15/Investment Solution/Investment Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.btnCalc = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.txtSave = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.txtGoal = New System.Windows.Forms.TextBox() Me.SuspendLayout() ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(273, 77) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(94, 30) Me.btnCalc.TabIndex = 2 Me.btnCalc.Text = "&Calculate" Me.btnCalc.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(273, 113) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(94, 30) Me.btnExit.TabIndex = 3 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'txtSave ' Me.txtSave.Location = New System.Drawing.Point(30, 77) Me.txtSave.Multiline = True Me.txtSave.Name = "txtSave" Me.txtSave.ReadOnly = True Me.txtSave.ScrollBars = System.Windows.Forms.ScrollBars.Vertical Me.txtSave.Size = New System.Drawing.Size(187, 305) Me.txtSave.TabIndex = 4 ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(30, 22) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(85, 17) Me.Label2.TabIndex = 0 Me.Label2.Text = "&Savings goal:" ' 'txtGoal ' Me.txtGoal.Location = New System.Drawing.Point(117, 19) Me.txtGoal.Name = "txtGoal" Me.txtGoal.Size = New System.Drawing.Size(100, 25) Me.txtGoal.TabIndex = 1 ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(394, 407) Me.Controls.Add(Me.txtGoal) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.txtSave) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCalc) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Investment Calculator" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents txtSave As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents txtGoal As System.Windows.Forms.TextBox End Class

Chap15/Investment Solution/Investment Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True

Chap15/Investment Solution/Investment Project/frmMain.vb

' Name: Investment Project ' Purpose: Display the amount to save (or invest) each month ' to accumulate a specific amount at the end of ' 10 years, 20 years, and 30 years, using ' annual interest rates of 2%, 3%, and 4% ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class

Chap15/Investment Solution/Investment Project/Investment Project.vbproj

Debug AnyCPU {8DDA0B92-D46A-485D-BD1F-B0F0521A317C} WinExe Investment_Project.My.MyApplication Investment_Project Investment Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Investment Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Investment Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/Investment Solution/Investment Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Investment_Project.frmMain End Sub End Class End Namespace

Chap15/Investment Solution/Investment Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/Investment Solution/Investment Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Investment Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Investment Project")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("0092afc9-aa6f-4921-b44c-ca56a6551cc1")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/Investment Solution/Investment Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Investment_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/Investment Solution/Investment Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/Investment Solution/Investment Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Investment_Project.My.MySettings Get Return Global.Investment_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/Investment Solution/Investment Project/My Project/Settings.settings

Chap15/Investment Solution/Investment Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Investment Project", "Investment Project\Investment Project.vbproj", "{8DDA0B92-D46A-485D-BD1F-B0F0521A317C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {8DDA0B92-D46A-485D-BD1F-B0F0521A317C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8DDA0B92-D46A-485D-BD1F-B0F0521A317C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8DDA0B92-D46A-485D-BD1F-B0F0521A317C}.Release|Any CPU.ActiveCfg = Release|Any CPU {8DDA0B92-D46A-485D-BD1F-B0F0521A317C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/App.config

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.Label1 = New System.Windows.Forms.Label() Me.txtPrincipal = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.btnCalc = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.txtPayments = New System.Windows.Forms.TextBox() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(32, 33) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(79, 23) Me.Label1.TabIndex = 0 Me.Label1.Text = "&Principal:" ' 'txtPrincipal ' Me.txtPrincipal.Location = New System.Drawing.Point(35, 57) Me.txtPrincipal.Name = "txtPrincipal" Me.txtPrincipal.Size = New System.Drawing.Size(100, 30) Me.txtPrincipal.TabIndex = 1 ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(233, 33) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(88, 23) Me.Label3.TabIndex = 4 Me.Label3.Text = "Payments:" ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(36, 360) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(247, 45) Me.btnCalc.TabIndex = 2 Me.btnCalc.Text = "&Calculate Monthly Payments" Me.btnCalc.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(302, 360) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(75, 45) Me.btnExit.TabIndex = 3 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'txtPayments ' Me.txtPayments.Location = New System.Drawing.Point(237, 57) Me.txtPayments.Name = "txtPayments" Me.txtPayments.Size = New System.Drawing.Size(140, 30) Me.txtPayments.TabIndex = 5 ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 23.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(413, 428) Me.Controls.Add(Me.txtPayments) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCalc) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.txtPrincipal) Me.Controls.Add(Me.Label1) Me.Font = New System.Drawing.Font("Segoe UI", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Monthly Payment Calculator" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtPrincipal As System.Windows.Forms.TextBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents txtPayments As System.Windows.Forms.TextBox End Class

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/frmMain.vb

' Name: Monthly Payment Project ' Purpose: Display the monthly payment amounts ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub txtPrincipal_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtPrincipal.KeyPress ' allows the text box to accept only numbers, the period, and the Backspace key If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> "." AndAlso e.KeyChar <> ControlChars.Back Then e.Handled = True End If End Sub Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click ' calculates and displays monthly payment amounts ' using terms of 2 through 5 years and rates ' of 4% through 7% End Sub End Class

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/Monthly Payment Project.vbproj

Debug AnyCPU {A538C929-6137-4BB5-8424-44A30B9866F4} WinExe Monthly_Payment_Project.My.MyApplication Monthly_Payment_Project Monthly Payment Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Monthly Payment Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Monthly Payment Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Monthly_Payment_Project.frmMain End Sub End Class End Namespace

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Monthly Payment Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Monthly Payment Project")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("4be3d589-53b3-431a-a796-751938b78716")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Monthly_Payment_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Monthly_Payment_Project.My.MySettings Get Return Global.Monthly_Payment_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Project/My Project/Settings.settings

Chap15/Monthly Payment Solution-Version 1/Monthly Payment Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Monthly Payment Project", "Monthly Payment Project\Monthly Payment Project.vbproj", "{A538C929-6137-4BB5-8424-44A30B9866F4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A538C929-6137-4BB5-8424-44A30B9866F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A538C929-6137-4BB5-8424-44A30B9866F4}.Debug|Any CPU.Build.0 = Debug|Any CPU {A538C929-6137-4BB5-8424-44A30B9866F4}.Release|Any CPU.ActiveCfg = Release|Any CPU {A538C929-6137-4BB5-8424-44A30B9866F4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/SwatTheBugs Solution/SwatTheBugs Project/App.config

Chap15/SwatTheBugs Solution/SwatTheBugs Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.btnCalc = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.Label1 = New System.Windows.Forms.Label() Me.lblExam1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.lblExam2 = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(38, 124) Me.btnCalc.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(109, 36) Me.btnCalc.TabIndex = 0 Me.btnCalc.Text = "&Calculate" Me.btnCalc.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(165, 124) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(109, 36) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(34, 36) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(95, 20) Me.Label1.TabIndex = 2 Me.Label1.Text = "Exam 1 total:" ' 'lblExam1 ' Me.lblExam1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblExam1.Location = New System.Drawing.Point(39, 60) Me.lblExam1.Name = "lblExam1" Me.lblExam1.Size = New System.Drawing.Size(90, 35) Me.lblExam1.TabIndex = 3 Me.lblExam1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(178, 36) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(95, 20) Me.Label2.TabIndex = 4 Me.Label2.Text = "Exam 2 total:" ' 'lblExam2 ' Me.lblExam2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblExam2.Location = New System.Drawing.Point(183, 60) Me.lblExam2.Name = "lblExam2" Me.lblExam2.Size = New System.Drawing.Size(90, 35) Me.lblExam2.TabIndex = 5 Me.lblExam2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 20.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(318, 193) Me.Controls.Add(Me.lblExam2) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.lblExam1) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCalc) Me.Font = New System.Drawing.Font("Segoe UI", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "SwatTheBugs" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lblExam1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents lblExam2 As System.Windows.Forms.Label End Class

Chap15/SwatTheBugs Solution/SwatTheBugs Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True True True True

Chap15/SwatTheBugs Solution/SwatTheBugs Project/frmMain.vb

' Name: SwatTheBugs Project ' Purpose: Display the totals for Exams 1 and 2 ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click ' calculates and displays the total scores on Exam 1 and ' the total scores on Exam 2 Dim strInputScore As String Dim decScore As Decimal Dim decTotalScore As Decimal ' accumulator For intExams As Integer = 1 To 2 strInputScore = InputBox("Exam " & intExams & " score (Click Cancel to stop)", "Exam Totals") Do Until strInputScore = String.Empty Decimal.TryParse(strInputScore, decScore) decTotalScore = decTotalScore + decScore Loop If intExams = 1 Then lblExam1.Text = decTotalScore Else lblExam2.Text = decTotalScore End If Next intExams End Sub End Class

Chap15/SwatTheBugs Solution/SwatTheBugs Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.SwatTheBugs_Project.frmMain End Sub End Class End Namespace

Chap15/SwatTheBugs Solution/SwatTheBugs Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/SwatTheBugs Solution/SwatTheBugs Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("SwatTheBugs Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("SwatTheBugs Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("f038d697-d7ff-4798-8f44-4090c1323842")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/SwatTheBugs Solution/SwatTheBugs Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("SwatTheBugs_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/SwatTheBugs Solution/SwatTheBugs Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/SwatTheBugs Solution/SwatTheBugs Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.SwatTheBugs_Project.My.MySettings Get Return Global.SwatTheBugs_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/SwatTheBugs Solution/SwatTheBugs Project/My Project/Settings.settings

Chap15/SwatTheBugs Solution/SwatTheBugs Project/SwatTheBugs Project.vbproj

Debug AnyCPU {B4111746-6B17-47EE-BC83-9EF19B8E5207} WinExe SwatTheBugs_Project.My.MyApplication SwatTheBugs_Project SwatTheBugs Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ SwatTheBugs Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ SwatTheBugs Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/SwatTheBugs Solution/SwatTheBugs Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SwatTheBugs Project", "SwatTheBugs Project\SwatTheBugs Project.vbproj", "{B4111746-6B17-47EE-BC83-9EF19B8E5207}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B4111746-6B17-47EE-BC83-9EF19B8E5207}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B4111746-6B17-47EE-BC83-9EF19B8E5207}.Debug|Any CPU.Build.0 = Debug|Any CPU {B4111746-6B17-47EE-BC83-9EF19B8E5207}.Release|Any CPU.ActiveCfg = Release|Any CPU {B4111746-6B17-47EE-BC83-9EF19B8E5207}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/Table Solution/Table Project/App.config

Chap15/Table Solution/Table Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.btnDisplay = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.txtTable = New System.Windows.Forms.TextBox() Me.SuspendLayout() ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(221, 149) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(100, 40) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display Table" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(327, 149) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(100, 40) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'txtTable ' Me.txtTable.Location = New System.Drawing.Point(31, 30) Me.txtTable.Multiline = True Me.txtTable.Name = "txtTable" Me.txtTable.ReadOnly = True Me.txtTable.Size = New System.Drawing.Size(396, 85) Me.txtTable.TabIndex = 2 ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(455, 223) Me.Controls.Add(Me.txtTable) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Table" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents txtTable As System.Windows.Forms.TextBox End Class

Chap15/Table Solution/Table Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True

Chap15/Table Solution/Table Project/frmMain.vb

' Name: Table Project ' Purpose: Display a 3 by 7 table of numbers ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click ' displays the numbers 1, 2, and 3 in the first column of a table ' and the result of multiplying the numbers by 2 through 7 in the ' subsequent columns End Sub End Class

Chap15/Table Solution/Table Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.Table_Project.frmMain End Sub End Class End Namespace

Chap15/Table Solution/Table Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/Table Solution/Table Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Table Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Table Project")> <Assembly: AssemblyCopyright("Copyright © 2012")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("2d98b11d-8488-4d43-a5df-525079daee92")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/Table Solution/Table Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Table_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/Table Solution/Table Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/Table Solution/Table Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.Table_Project.My.MySettings Get Return Global.Table_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/Table Solution/Table Project/My Project/Settings.settings

Chap15/Table Solution/Table Project/Table Project.vbproj

Debug AnyCPU {542AF03E-D47B-495C-B478-2A4E03AF1B7C} WinExe Table_Project.My.MyApplication Table_Project Table Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Table Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Table Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/Table Solution/Table Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Table Project", "Table Project\Table Project.vbproj", "{542AF03E-D47B-495C-B478-2A4E03AF1B7C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {542AF03E-D47B-495C-B478-2A4E03AF1B7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {542AF03E-D47B-495C-B478-2A4E03AF1B7C}.Debug|Any CPU.Build.0 = Debug|Any CPU {542AF03E-D47B-495C-B478-2A4E03AF1B7C}.Release|Any CPU.ActiveCfg = Release|Any CPU {542AF03E-D47B-495C-B478-2A4E03AF1B7C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/App.config

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/frmMain.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmMain 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.lblAsterisks = New System.Windows.Forms.Label() Me.btnDisplay = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'lblAsterisks ' Me.lblAsterisks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblAsterisks.Font = New System.Drawing.Font("Segoe UI", 13.8!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblAsterisks.Location = New System.Drawing.Point(34, 31) Me.lblAsterisks.Name = "lblAsterisks" Me.lblAsterisks.Size = New System.Drawing.Size(150, 145) Me.lblAsterisks.TabIndex = 2 ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(199, 34) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(113, 34) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display Asterisks" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(199, 75) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(113, 34) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(334, 209) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.lblAsterisks) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5) Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Two To Ten Asterisks" Me.ResumeLayout(False) End Sub Friend WithEvents lblAsterisks As System.Windows.Forms.Label Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/frmMain.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True True True True

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/frmMain.vb

' Name: TwoToTenAsterisks Project ' Purpose: Display a pattern of asterisks ' Programmer: <your name> on <current date> Public Class frmMain Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.TwoToTenAsterisks_Project.frmMain End Sub End Class End Namespace

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/My Project/Application.myapp

<?xml version="1.0" encoding="utf-16"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>frmMain</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("TwoToTenAsterisks Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("TwoToTenAsterisks Project")> <Assembly: AssemblyCopyright("Copyright © 2013")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("93ff2dec-2b83-494b-957a-da9643dfbaaf")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' 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")>

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 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> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("TwoToTenAsterisks_Project.Resources", 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. '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.18010 ' ' 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 Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(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(Global.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 #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 End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.TwoToTenAsterisks_Project.My.MySettings Get Return Global.TwoToTenAsterisks_Project.My.MySettings.Default End Get End Property End Module End Namespace

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/My Project/Settings.settings

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Project/TwoToTenAsterisks Project.vbproj

Debug AnyCPU {F849C977-FED0-49AD-84F2-70D3E8BA9D22} WinExe TwoToTenAsterisks_Project.My.MyApplication TwoToTenAsterisks_Project TwoToTenAsterisks Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ TwoToTenAsterisks Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ TwoToTenAsterisks Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On Form frmMain.vb Form True Application.myapp True True Resources.resx True Settings.settings True frmMain.vb VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

Chap15/TwoToTenAsterisks Solution/TwoToTenAsterisks Solution.sln

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TwoToTenAsterisks Project", "TwoToTenAsterisks Project\TwoToTenAsterisks Project.vbproj", "{F849C977-FED0-49AD-84F2-70D3E8BA9D22}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {F849C977-FED0-49AD-84F2-70D3E8BA9D22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F849C977-FED0-49AD-84F2-70D3E8BA9D22}.Debug|Any CPU.Build.0 = Debug|Any CPU {F849C977-FED0-49AD-84F2-70D3E8BA9D22}.Release|Any CPU.ActiveCfg = Release|Any CPU {F849C977-FED0-49AD-84F2-70D3E8BA9D22}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal