I need help with System Analysis and Design
Chap18/Airlines Solution/Airlines Project/Airlines Project.vbproj
Debug AnyCPU {7698800C-ECF1-473A-B45D-AD997757BE91} WinExe Airlines_Project.My.MyApplication Airlines_Project Airlines Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Airlines Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Airlines 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
Chap18/Airlines Solution/Airlines Project/App.config
Chap18/Airlines Solution/Airlines 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.lblOriginal = New System.Windows.Forms.Label() Me.lblDescending = New System.Windows.Forms.Label() Me.lblAscending = New System.Windows.Forms.Label() Me.btnDisplay = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.PictureBox1 = New System.Windows.Forms.PictureBox() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'lblOriginal ' Me.lblOriginal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblOriginal.Location = New System.Drawing.Point(147, 39) Me.lblOriginal.Name = "lblOriginal" Me.lblOriginal.Size = New System.Drawing.Size(101, 114) Me.lblOriginal.TabIndex = 3 ' 'lblDescending ' Me.lblDescending.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblDescending.Location = New System.Drawing.Point(403, 39) Me.lblDescending.Name = "lblDescending" Me.lblDescending.Size = New System.Drawing.Size(101, 114) Me.lblDescending.TabIndex = 7 ' 'lblAscending ' Me.lblAscending.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblAscending.Location = New System.Drawing.Point(271, 39) Me.lblAscending.Name = "lblAscending" Me.lblAscending.Size = New System.Drawing.Size(101, 114) Me.lblAscending.TabIndex = 5 ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(332, 171) Me.btnDisplay.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(83, 33) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(421, 171) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(83, 33) 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(143, 16) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(105, 20) Me.Label1.TabIndex = 2 Me.Label1.Text = "Original order:" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(401, 16) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(130, 20) Me.Label2.TabIndex = 6 Me.Label2.Text = "Descending order:" ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(266, 16) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(121, 20) Me.Label3.TabIndex = 4 Me.Label3.Text = "Ascending order:" ' 'PictureBox1 ' Me.PictureBox1.Image = Global.Airlines_Project.My.Resources.Resources.Plane Me.PictureBox1.Location = New System.Drawing.Point(12, 12) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(117, 95) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 8 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(543, 225) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.lblAscending) Me.Controls.Add(Me.lblDescending) Me.Controls.Add(Me.lblOriginal) 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 = "Airlines" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents lblOriginal As System.Windows.Forms.Label Friend WithEvents lblDescending As System.Windows.Forms.Label Friend WithEvents lblAscending As System.Windows.Forms.Label Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox End Class
Chap18/Airlines Solution/Airlines 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
Chap18/Airlines Solution/Airlines Project/frmMain.vb
' Name: Airlines Project ' Purpose: Display array in original, ascending, and descending order ' 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 array in original, ascending, ' and descending order ' procedure-level array ' clear labels ' display array in original order End Sub End Class
Chap18/Airlines Solution/Airlines 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.Airlines_Project.frmMain End Sub End Class End Namespace
Chap18/Airlines Solution/Airlines 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>
Chap18/Airlines Solution/Airlines 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("Airlines Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Airlines 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("7319a04e-2b3c-4064-868c-5bea71eb262a")> ' 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")>
Chap18/Airlines Solution/Airlines 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("Airlines_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 Plane() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("Plane", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace
Chap18/Airlines Solution/Airlines 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\Plane.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Chap18/Airlines Solution/Airlines 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.Airlines_Project.My.MySettings Get Return Global.Airlines_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/Airlines Solution/Airlines Project/My Project/Settings.settings
Chap18/Airlines Solution/Airlines Project/Resources/Plane.png
Chap18/Airlines Solution/Airlines Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Airlines Project", "Airlines Project\Airlines Project.vbproj", "{7698800C-ECF1-473A-B45D-AD997757BE91}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {7698800C-ECF1-473A-B45D-AD997757BE91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7698800C-ECF1-473A-B45D-AD997757BE91}.Debug|Any CPU.Build.0 = Debug|Any CPU {7698800C-ECF1-473A-B45D-AD997757BE91}.Release|Any CPU.ActiveCfg = Release|Any CPU {7698800C-ECF1-473A-B45D-AD997757BE91}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/FigureThisOut Solution/FigureThisOut Project/App.config
Chap18/FigureThisOut Solution/FigureThisOut Project/FigureThisOut Project.vbproj
Debug AnyCPU {BC523EF7-AB58-44E4-90D4-6DD70A7BC43E} 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
Chap18/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.btnExit = New System.Windows.Forms.Button() Me.btnFind = New System.Windows.Forms.Button() Me.lblLocation = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(30, 42) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(204, 20) Me.Label1.TabIndex = 2 Me.Label1.Text = "Location of letter in the array:" ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(209, 146) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(90, 34) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'btnFind ' Me.btnFind.Location = New System.Drawing.Point(81, 146) Me.btnFind.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnFind.Name = "btnFind" Me.btnFind.Size = New System.Drawing.Size(121, 34) Me.btnFind.TabIndex = 0 Me.btnFind.Text = "&Find a Letter" Me.btnFind.UseVisualStyleBackColor = True ' 'lblLocation ' Me.lblLocation.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblLocation.Location = New System.Drawing.Point(33, 69) Me.lblLocation.Name = "lblLocation" Me.lblLocation.Size = New System.Drawing.Size(266, 46) Me.lblLocation.TabIndex = 3 Me.lblLocation.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(338, 224) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnFind) Me.Controls.Add(Me.lblLocation) 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) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents btnFind As System.Windows.Forms.Button Friend WithEvents lblLocation As System.Windows.Forms.Label End Class
Chap18/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
Chap18/FigureThisOut Solution/FigureThisOut Project/frmMain.vb
' Name: FigureThisOut Project ' Purpose: Search for a letter in an array ' 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 btnFind_Click(sender As Object, e As EventArgs) Handles btnFind.Click ' searches for a letter in the array and then ' displays an appropriate message Dim strLetters() As String = {"A", "B", "C"} Dim strSearchFor As String Dim intSub As Integer strSearchFor = InputBox("Letter to search for", "FigureThisOut") If strSearchFor <> String.Empty Then strSearchFor = strSearchFor.ToUpper Do Until intSub = strLetters.Length OrElse strLetters(intSub) = strSearchFor intSub += 1 Loop If intSub = strLetters.Length Then lblLocation.Text = strSearchFor & " is not in the array" Else lblLocation.Text = strSearchFor & " is in array element " & intSub.ToString End If End If End Sub End Class
Chap18/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
Chap18/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>
Chap18/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("a51dc7c4-022f-4719-ad34-f345cf037716")> ' 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")>
Chap18/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
Chap18/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
Chap18/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
Chap18/FigureThisOut Solution/FigureThisOut Project/My Project/Settings.settings
Chap18/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", "{BC523EF7-AB58-44E4-90D4-6DD70A7BC43E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {BC523EF7-AB58-44E4-90D4-6DD70A7BC43E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BC523EF7-AB58-44E4-90D4-6DD70A7BC43E}.Debug|Any CPU.Build.0 = Debug|Any CPU {BC523EF7-AB58-44E4-90D4-6DD70A7BC43E}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC523EF7-AB58-44E4-90D4-6DD70A7BC43E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/Grades Solution/Grades Project/App.config
Chap18/Grades Solution/Grades 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.txtLetterGrade = New System.Windows.Forms.TextBox() Me.btnCount = 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(25, 142) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(93, 20) Me.Label1.TabIndex = 0 Me.Label1.Text = "&Letter grade:" ' 'txtLetterGrade ' Me.txtLetterGrade.Location = New System.Drawing.Point(124, 139) Me.txtLetterGrade.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.txtLetterGrade.Name = "txtLetterGrade" Me.txtLetterGrade.Size = New System.Drawing.Size(50, 27) Me.txtLetterGrade.TabIndex = 1 ' 'btnCount ' Me.btnCount.Location = New System.Drawing.Point(192, 136) Me.btnCount.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnCount.Name = "btnCount" Me.btnCount.Size = New System.Drawing.Size(64, 32) Me.btnCount.TabIndex = 2 Me.btnCount.Text = "&Count" Me.btnCount.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(262, 136) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(64, 32) Me.btnExit.TabIndex = 3 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'PictureBox1 ' Me.PictureBox1.Image = Global.Grades_Project.My.Resources.Resources.ABCDF Me.PictureBox1.Location = New System.Drawing.Point(12, 12) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(314, 98) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 4 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(349, 195) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCount) Me.Controls.Add(Me.txtLetterGrade) 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 = "Grades" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtLetterGrade As System.Windows.Forms.TextBox Friend WithEvents btnCount As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox End Class
Chap18/Grades Solution/Grades 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
Chap18/Grades Solution/Grades Project/frmMain.vb
' Name: Grades Project ' Purpose: Display the number of times a letter appears in an array ' 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
Chap18/Grades Solution/Grades Project/Grades Project.vbproj
Debug AnyCPU {1363E3B1-7A9D-491E-A167-07CE08C19A25} WinExe Grades_Project.My.MyApplication Grades_Project Grades Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Grades Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Grades 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
Chap18/Grades Solution/Grades 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.Grades_Project.frmMain End Sub End Class End Namespace
Chap18/Grades Solution/Grades 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>
Chap18/Grades Solution/Grades 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("Grades Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Grades 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("8bee89e2-0234-46a7-96dd-9e8f7aa37107")> ' 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")>
Chap18/Grades Solution/Grades 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("Grades_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 ABCDF() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("ABCDF", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace
Chap18/Grades Solution/Grades 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\ABCDF.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Chap18/Grades Solution/Grades 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.Grades_Project.My.MySettings Get Return Global.Grades_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/Grades Solution/Grades Project/My Project/Settings.settings
Chap18/Grades Solution/Grades Project/Resources/ABCDF.png
Chap18/Grades Solution/Grades Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Grades Project", "Grades Project\Grades Project.vbproj", "{1363E3B1-7A9D-491E-A167-07CE08C19A25}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {1363E3B1-7A9D-491E-A167-07CE08C19A25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1363E3B1-7A9D-491E-A167-07CE08C19A25}.Debug|Any CPU.Build.0 = Debug|Any CPU {1363E3B1-7A9D-491E-A167-07CE08C19A25}.Release|Any CPU.ActiveCfg = Release|Any CPU {1363E3B1-7A9D-491E-A167-07CE08C19A25}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/HighLow Solution/HighLow Project/App.config
Chap18/HighLow Solution/HighLow 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.lblResult = New System.Windows.Forms.Label() Me.btnHighest = New System.Windows.Forms.Button() Me.btnLowest = 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(22, 25) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(46, 17) Me.Label1.TabIndex = 3 Me.Label1.Text = "Result:" ' 'lblResult ' Me.lblResult.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblResult.Location = New System.Drawing.Point(26, 46) Me.lblResult.Name = "lblResult" Me.lblResult.Size = New System.Drawing.Size(189, 93) Me.lblResult.TabIndex = 4 Me.lblResult.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnHighest ' Me.btnHighest.Location = New System.Drawing.Point(252, 52) Me.btnHighest.Name = "btnHighest" Me.btnHighest.Size = New System.Drawing.Size(101, 34) Me.btnHighest.TabIndex = 0 Me.btnHighest.Text = "&Highest Score" Me.btnHighest.UseVisualStyleBackColor = True ' 'btnLowest ' Me.btnLowest.Location = New System.Drawing.Point(252, 92) Me.btnLowest.Name = "btnLowest" Me.btnLowest.Size = New System.Drawing.Size(101, 34) Me.btnLowest.TabIndex = 1 Me.btnLowest.Text = "&Lowest Score" Me.btnLowest.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(252, 132) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(101, 34) Me.btnExit.TabIndex = 2 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(383, 195) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnLowest) Me.Controls.Add(Me.btnHighest) Me.Controls.Add(Me.lblResult) 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 = "HighLow" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lblResult As System.Windows.Forms.Label Friend WithEvents btnHighest As System.Windows.Forms.Button Friend WithEvents btnLowest As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class
Chap18/HighLow Solution/HighLow 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
Chap18/HighLow Solution/HighLow Project/frmMain.vb
' Name: HighLow Project ' Purpose: Display the highest score and the number of students earning the highest score, ' and the lowest score and the number of students earning the lowest score ' Programmer: <your name> on <current date> Public Class frmMain Private intScores() As Integer = {35, 78, 99, 99, 45, 67, 99, 78, 75, 67, 85, 83, 82, 75, 74, 20, 55, 89, 30, 66, 98, 20, 68, 92, 91, 89, 87, 45, 99, 99} Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnHighest_Click(sender As Object, e As EventArgs) Handles btnHighest.Click ' display the highest score and the number of student earning that score End Sub Private Sub btnLowest_Click(sender As Object, e As EventArgs) Handles btnLowest.Click ' display the lowest score and the number of students earning that score End Sub End Class
Chap18/HighLow Solution/HighLow Project/HighLow Project.vbproj
Debug AnyCPU {E2B04E28-F6BF-4C7F-B103-30122437E377} WinExe HighLow_Project.My.MyApplication HighLow_Project HighLow Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ HighLow Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ HighLow 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
Chap18/HighLow Solution/HighLow 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.HighLow_Project.frmMain End Sub End Class End Namespace
Chap18/HighLow Solution/HighLow 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>
Chap18/HighLow Solution/HighLow 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("HighLow Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("HighLow 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("19a98103-7a84-4c79-9dca-2cc20c30461a")> ' 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")>
Chap18/HighLow Solution/HighLow 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("HighLow_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
Chap18/HighLow Solution/HighLow 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
Chap18/HighLow Solution/HighLow 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.HighLow_Project.My.MySettings Get Return Global.HighLow_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/HighLow Solution/HighLow Project/My Project/Settings.settings
Chap18/HighLow Solution/HighLow Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HighLow Project", "HighLow Project\HighLow Project.vbproj", "{E2B04E28-F6BF-4C7F-B103-30122437E377}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E2B04E28-F6BF-4C7F-B103-30122437E377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E2B04E28-F6BF-4C7F-B103-30122437E377}.Debug|Any CPU.Build.0 = Debug|Any CPU {E2B04E28-F6BF-4C7F-B103-30122437E377}.Release|Any CPU.ActiveCfg = Release|Any CPU {E2B04E28-F6BF-4C7F-B103-30122437E377}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/NumDays Solution/NumDays Project/App.config
Chap18/NumDays Solution/NumDays 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.lblDays = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.btnExit = New System.Windows.Forms.Button() Me.btnDisplay = New System.Windows.Forms.Button() Me.txtMonth = New System.Windows.Forms.TextBox() Me.Label1 = New System.Windows.Forms.Label() Me.PictureBox1 = New System.Windows.Forms.PictureBox() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'lblDays ' Me.lblDays.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblDays.Location = New System.Drawing.Point(309, 71) Me.lblDays.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblDays.Name = "lblDays" Me.lblDays.Size = New System.Drawing.Size(35, 26) Me.lblDays.TabIndex = 5 Me.lblDays.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(199, 76) Me.Label2.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(106, 17) Me.Label2.TabIndex = 4 Me.Label2.Text = "Number of days:" ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(279, 121) Me.btnExit.Margin = New System.Windows.Forms.Padding(2) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(97, 31) Me.btnExit.TabIndex = 3 Me.btnExit.Text = "E&xit" ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(178, 121) Me.btnDisplay.Margin = New System.Windows.Forms.Padding(2) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(97, 31) Me.btnDisplay.TabIndex = 2 Me.btnDisplay.Text = "&Display Days" ' 'txtMonth ' Me.txtMonth.Location = New System.Drawing.Point(301, 22) Me.txtMonth.Margin = New System.Windows.Forms.Padding(2) Me.txtMonth.Name = "txtMonth" Me.txtMonth.Size = New System.Drawing.Size(43, 25) Me.txtMonth.TabIndex = 1 ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(199, 25) Me.Label1.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(98, 17) Me.Label1.TabIndex = 0 Me.Label1.Text = "&Month number:" ' 'PictureBox1 ' Me.PictureBox1.Image = Global.NumDays_Project.My.Resources.Resources.Calendar Me.PictureBox1.Location = New System.Drawing.Point(12, 12) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(149, 140) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 6 Me.PictureBox1.TabStop = False ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(391, 185) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.lblDays) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.txtMonth) 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 = "Number of Days" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents lblDays As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents txtMonth As System.Windows.Forms.TextBox Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox End Class
Chap18/NumDays Solution/NumDays 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
Chap18/NumDays Solution/NumDays Project/frmMain.vb
' Name: NumDays Project ' Purpose: Displays the number of days in a specific month ' 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 txtMonth_TextChanged(sender As Object, e As EventArgs) Handles txtMonth.TextChanged lblDays.Text = String.Empty End Sub End Class
Chap18/NumDays Solution/NumDays 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.NumDays_Project.frmMain End Sub End Class End Namespace
Chap18/NumDays Solution/NumDays 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>
Chap18/NumDays Solution/NumDays 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("NumDays Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("NumDays 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("891b8673-64f8-46b3-8e2d-0e0ac1172b07")> ' 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")>
Chap18/NumDays Solution/NumDays 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("NumDays_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 Calendar() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("Calendar", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace
Chap18/NumDays Solution/NumDays 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\Calendar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Chap18/NumDays Solution/NumDays 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.NumDays_Project.My.MySettings Get Return Global.NumDays_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/NumDays Solution/NumDays Project/My Project/Settings.settings
Chap18/NumDays Solution/NumDays Project/NumDays Project.vbproj
Debug AnyCPU {AC25EC6A-6754-4980-871D-F071DFE1B39A} WinExe NumDays_Project.My.MyApplication NumDays_Project NumDays Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ NumDays Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ NumDays 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
Chap18/NumDays Solution/NumDays Project/Resources/Calendar.png
Chap18/NumDays Solution/NumDays Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NumDays Project", "NumDays Project\NumDays Project.vbproj", "{AC25EC6A-6754-4980-871D-F071DFE1B39A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AC25EC6A-6754-4980-871D-F071DFE1B39A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC25EC6A-6754-4980-871D-F071DFE1B39A}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC25EC6A-6754-4980-871D-F071DFE1B39A}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC25EC6A-6754-4980-871D-F071DFE1B39A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/Party List Solution/Party List Project/App.config
Chap18/Party List Solution/Party List 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.txtGuest = New System.Windows.Forms.TextBox() Me.btnVerify = 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(304, 49) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(128, 20) Me.Label1.TabIndex = 0 Me.Label1.Text = "&Guest's first name:" ' 'txtGuest ' Me.txtGuest.Location = New System.Drawing.Point(441, 46) Me.txtGuest.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.txtGuest.Name = "txtGuest" Me.txtGuest.Size = New System.Drawing.Size(106, 27) Me.txtGuest.TabIndex = 1 ' 'btnVerify ' Me.btnVerify.Location = New System.Drawing.Point(307, 108) Me.btnVerify.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnVerify.Name = "btnVerify" Me.btnVerify.Size = New System.Drawing.Size(126, 39) Me.btnVerify.TabIndex = 2 Me.btnVerify.Text = "&Verify Invitation" Me.btnVerify.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(441, 108) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(106, 39) Me.btnExit.TabIndex = 3 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'PictureBox1 ' Me.PictureBox1.Image = Global.Party_List_Project.My.Resources.Resources.Party Me.PictureBox1.Location = New System.Drawing.Point(14, 14) Me.PictureBox1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(270, 240) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 4 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(580, 298) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnVerify) Me.Controls.Add(Me.txtGuest) 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 = "Party List" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtGuest As System.Windows.Forms.TextBox Friend WithEvents btnVerify As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox End Class
Chap18/Party List Solution/Party List 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
Chap18/Party List Solution/Party List Project/frmMain.vb
' Name: Party List Project ' Purpose: Display a message indicating whether a name is contained in the array ' 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
Chap18/Party List Solution/Party List 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.Party_List_Project.frmMain End Sub End Class End Namespace
Chap18/Party List Solution/Party List 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>
Chap18/Party List Solution/Party List 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("Party List Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Party List 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("c4987b31-07d5-4d0d-9937-3f6ac8cf6ff7")> ' 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")>
Chap18/Party List Solution/Party List 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("Party_List_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 Party() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("Party", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace
Chap18/Party List Solution/Party List 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\Party.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Chap18/Party List Solution/Party List 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.Party_List_Project.My.MySettings Get Return Global.Party_List_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/Party List Solution/Party List Project/My Project/Settings.settings
Chap18/Party List Solution/Party List Project/Party List Project.vbproj
Debug AnyCPU {FC141F2D-3E02-4E76-8858-DEC0CD7F00C3} WinExe Party_List_Project.My.MyApplication Party_List_Project Party List Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Party List Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Party List 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
Chap18/Party List Solution/Party List Project/Resources/Party.png
Chap18/Party List Solution/Party List Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Party List Project", "Party List Project\Party List Project.vbproj", "{FC141F2D-3E02-4E76-8858-DEC0CD7F00C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {FC141F2D-3E02-4E76-8858-DEC0CD7F00C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FC141F2D-3E02-4E76-8858-DEC0CD7F00C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {FC141F2D-3E02-4E76-8858-DEC0CD7F00C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {FC141F2D-3E02-4E76-8858-DEC0CD7F00C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/Salary Solution/Salary Project/App.config
Chap18/Salary Solution/Salary 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.lblSalary = New System.Windows.Forms.Label() Me.btnDisplay = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.Label2 = New System.Windows.Forms.Label() Me.txtCode = New System.Windows.Forms.TextBox() 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(280, 13) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(52, 20) Me.Label1.TabIndex = 4 Me.Label1.Text = "Salary:" ' 'lblSalary ' Me.lblSalary.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblSalary.Location = New System.Drawing.Point(284, 33) Me.lblSalary.Name = "lblSalary" Me.lblSalary.Size = New System.Drawing.Size(96, 31) Me.lblSalary.TabIndex = 5 Me.lblSalary.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(153, 90) Me.btnDisplay.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(112, 32) Me.btnDisplay.TabIndex = 2 Me.btnDisplay.Text = "&Display Salary" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(284, 90) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(96, 32) Me.btnExit.TabIndex = 3 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(149, 13) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(91, 20) Me.Label2.TabIndex = 0 Me.Label2.Text = "&Code (1 - 6):" ' 'txtCode ' Me.txtCode.Location = New System.Drawing.Point(153, 37) Me.txtCode.Name = "txtCode" Me.txtCode.Size = New System.Drawing.Size(36, 27) Me.txtCode.TabIndex = 1 ' 'PictureBox1 ' Me.PictureBox1.Image = Global.Salary_Project.My.Resources.Resources.Money Me.PictureBox1.Location = New System.Drawing.Point(13, 13) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(103, 120) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 6 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(397, 151) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.txtCode) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.lblSalary) 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 = "Salary" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lblSalary As System.Windows.Forms.Label Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents txtCode As System.Windows.Forms.TextBox Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox End Class
Chap18/Salary Solution/Salary 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
Chap18/Salary Solution/Salary Project/frmMain.vb
' Name: Salary Project ' Purpose: Display the salary amount associated with a code ' Programmer: <your name> on <current date> Public Class frmMain ' class-level array Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub txtCode_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtCode.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 txtCode_TextChanged(sender As Object, e As EventArgs) Handles txtCode.TextChanged lblSalary.Text = String.Empty End Sub End Class
Chap18/Salary Solution/Salary 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.Salary_Project.frmMain End Sub End Class End Namespace
Chap18/Salary Solution/Salary 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>
Chap18/Salary Solution/Salary 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("Salary Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Salary 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("6beae18f-30ef-421a-abfe-255270e5c58c")> ' 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")>
Chap18/Salary Solution/Salary 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("Salary_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 Money() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("Money", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace
Chap18/Salary Solution/Salary 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\Money.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Chap18/Salary Solution/Salary 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.Salary_Project.My.MySettings Get Return Global.Salary_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/Salary Solution/Salary Project/My Project/Settings.settings
Chap18/Salary Solution/Salary Project/Resources/Money.png
Chap18/Salary Solution/Salary Project/Salary Project.vbproj
Debug AnyCPU {B7E9EF85-5AC2-47A8-A0DC-1C2D7B060E04} WinExe Salary_Project.My.MyApplication Salary_Project Salary Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Salary Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Salary 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
Chap18/Salary Solution/Salary Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Salary Project", "Salary Project\Salary Project.vbproj", "{B7E9EF85-5AC2-47A8-A0DC-1C2D7B060E04}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B7E9EF85-5AC2-47A8-A0DC-1C2D7B060E04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B7E9EF85-5AC2-47A8-A0DC-1C2D7B060E04}.Debug|Any CPU.Build.0 = Debug|Any CPU {B7E9EF85-5AC2-47A8-A0DC-1C2D7B060E04}.Release|Any CPU.ActiveCfg = Release|Any CPU {B7E9EF85-5AC2-47A8-A0DC-1C2D7B060E04}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/Sales Solution/Sales Project/App.config
Chap18/Sales Solution/Sales 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.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.lblCount = New System.Windows.Forms.Label() Me.txtSales = New System.Windows.Forms.TextBox() Me.btnSearch = 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(82, 20) Me.Label1.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(41, 17) Me.Label1.TabIndex = 0 Me.Label1.Text = "S&ales:" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(23, 85) Me.Label2.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(339, 17) Me.Label2.TabIndex = 4 Me.Label2.Text = "Number of salespeople selling at least the sales amount:" ' 'lblCount ' Me.lblCount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblCount.Font = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblCount.Location = New System.Drawing.Point(365, 80) Me.lblCount.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblCount.Name = "lblCount" Me.lblCount.Size = New System.Drawing.Size(45, 25) Me.lblCount.TabIndex = 5 Me.lblCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'txtSales ' Me.txtSales.Location = New System.Drawing.Point(85, 39) Me.txtSales.Margin = New System.Windows.Forms.Padding(2) Me.txtSales.Name = "txtSales" Me.txtSales.Size = New System.Drawing.Size(68, 25) Me.txtSales.TabIndex = 1 ' 'btnSearch ' Me.btnSearch.Location = New System.Drawing.Point(225, 33) Me.btnSearch.Margin = New System.Windows.Forms.Padding(2) Me.btnSearch.Name = "btnSearch" Me.btnSearch.Size = New System.Drawing.Size(67, 27) Me.btnSearch.TabIndex = 2 Me.btnSearch.Text = "&Search" ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(296, 33) Me.btnExit.Margin = New System.Windows.Forms.Padding(2) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(67, 27) Me.btnExit.TabIndex = 3 Me.btnExit.Text = "E&xit" ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(444, 139) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnSearch) Me.Controls.Add(Me.txtSales) Me.Controls.Add(Me.lblCount) 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.MaximizeBox = False Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Sales" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents lblCount As System.Windows.Forms.Label Friend WithEvents txtSales As System.Windows.Forms.TextBox Friend WithEvents btnSearch As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class
Chap18/Sales Solution/Sales 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
Chap18/Sales Solution/Sales Project/frmMain.vb
' Name: Sales Project ' Purpose: Displays the number of salespeople selling at least a specified amount ' Programmer: <your name> on <current date> Public Class frmMain Private intSales() As Integer = {5000, 4500, 2000, 6000, 3000} Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub txtSales_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtSales.KeyPress ' allow 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 txtSales_TextChanged(sender As Object, e As EventArgs) Handles txtSales.TextChanged lblCount.Text = String.Empty End Sub Private Sub btnSearch_Click(sender As Object, e As EventArgs) Handles btnSearch.Click ' searches the intSales array, looking for values that are ' greater than or equal to the value entered by the user End Sub End Class
Chap18/Sales Solution/Sales 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.Sales_Project.frmMain End Sub End Class End Namespace
Chap18/Sales Solution/Sales 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>
Chap18/Sales Solution/Sales 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("Sales Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Sales 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("5b29bae9-9839-432d-87c2-48a0f8ffde19")> ' 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")>
Chap18/Sales Solution/Sales 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("Sales_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
Chap18/Sales Solution/Sales 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
Chap18/Sales Solution/Sales 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.Sales_Project.My.MySettings Get Return Global.Sales_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/Sales Solution/Sales Project/My Project/Settings.settings
Chap18/Sales Solution/Sales Project/Sales Project.vbproj
Debug AnyCPU {B467A38E-3596-47E8-8918-76DCE51EE3BB} WinExe Sales_Project.My.MyApplication Sales_Project Sales Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Sales Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Sales 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
Chap18/Sales Solution/Sales Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Sales Project", "Sales Project\Sales Project.vbproj", "{B467A38E-3596-47E8-8918-76DCE51EE3BB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B467A38E-3596-47E8-8918-76DCE51EE3BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B467A38E-3596-47E8-8918-76DCE51EE3BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {B467A38E-3596-47E8-8918-76DCE51EE3BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {B467A38E-3596-47E8-8918-76DCE51EE3BB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/Scores Solution/Scores Project/App.config
Chap18/Scores Solution/Scores 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.btnExit = New System.Windows.Forms.Button() Me.btnDisplay = New System.Windows.Forms.Button() Me.PictureBox1 = New System.Windows.Forms.PictureBox() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(220, 65) Me.btnExit.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(97, 37) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(220, 22) Me.btnDisplay.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(97, 37) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display" ' 'PictureBox1 ' Me.PictureBox1.Image = Global.Scores_Project.My.Resources.Resources.ExamScores Me.PictureBox1.Location = New System.Drawing.Point(26, 22) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(178, 178) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 2 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(339, 232) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) 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 = "Final Exam" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) End Sub Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox End Class
Chap18/Scores Solution/Scores 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
Chap18/Scores Solution/Scores Project/frmMain.vb
' Name: Scores Project ' Purpose: Display the number of students earning a specific score ' 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
Chap18/Scores Solution/Scores 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.Scores_Project.frmMain End Sub End Class End Namespace
Chap18/Scores Solution/Scores 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>
Chap18/Scores Solution/Scores 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("Scores Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Scores 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("27808daf-6141-41c3-ae40-d9cdd849e085")> ' 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")>
Chap18/Scores Solution/Scores 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("Scores_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 ExamScores() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("ExamScores", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace
Chap18/Scores Solution/Scores 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\ExamScores.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Chap18/Scores Solution/Scores 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.Scores_Project.My.MySettings Get Return Global.Scores_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/Scores Solution/Scores Project/My Project/Settings.settings
Chap18/Scores Solution/Scores Project/Resources/ExamScores.png
Chap18/Scores Solution/Scores Project/Scores Project.vbproj
Debug AnyCPU {FAAFAE4C-C2A3-4025-8C4A-C68B5719C326} WinExe Scores_Project.My.MyApplication Scores_Project Scores Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Scores Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Scores 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
Chap18/Scores Solution/Scores Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Scores Project", "Scores Project\Scores Project.vbproj", "{FAAFAE4C-C2A3-4025-8C4A-C68B5719C326}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {FAAFAE4C-C2A3-4025-8C4A-C68B5719C326}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FAAFAE4C-C2A3-4025-8C4A-C68B5719C326}.Debug|Any CPU.Build.0 = Debug|Any CPU {FAAFAE4C-C2A3-4025-8C4A-C68B5719C326}.Release|Any CPU.ActiveCfg = Release|Any CPU {FAAFAE4C-C2A3-4025-8C4A-C68B5719C326}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/States Solution/States Project/App.config
Chap18/States Solution/States 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.txtState = New System.Windows.Forms.TextBox() Me.btnVisited = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.lblMessage = New System.Windows.Forms.Label() 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(158, 14) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(46, 20) Me.Label1.TabIndex = 0 Me.Label1.Text = "&State:" ' 'txtState ' Me.txtState.Location = New System.Drawing.Point(162, 38) Me.txtState.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) Me.txtState.Name = "txtState" Me.txtState.Size = New System.Drawing.Size(258, 27) Me.txtState.TabIndex = 1 ' 'btnVisited ' Me.btnVisited.Location = New System.Drawing.Point(437, 32) Me.btnVisited.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) Me.btnVisited.Name = "btnVisited" Me.btnVisited.Size = New System.Drawing.Size(98, 39) Me.btnVisited.TabIndex = 2 Me.btnVisited.Text = "&Visited?" Me.btnVisited.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(437, 83) Me.btnExit.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(98, 39) Me.btnExit.TabIndex = 3 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'lblMessage ' Me.lblMessage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblMessage.Location = New System.Drawing.Point(162, 102) Me.lblMessage.Name = "lblMessage" Me.lblMessage.Size = New System.Drawing.Size(258, 81) Me.lblMessage.TabIndex = 4 Me.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'PictureBox1 ' Me.PictureBox1.Image = Global.States_Project.My.Resources.Resources.Map Me.PictureBox1.Location = New System.Drawing.Point(13, 13) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(126, 90) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 5 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(551, 216) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.lblMessage) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnVisited) Me.Controls.Add(Me.txtState) 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 = "States" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtState As System.Windows.Forms.TextBox Friend WithEvents btnVisited As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents lblMessage As System.Windows.Forms.Label Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox End Class
Chap18/States Solution/States 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
Chap18/States Solution/States Project/frmMain.vb
' Name: States Project ' Purpose: Search an array for the name of a state ' Programmer: <your name> on <current date> Public Class frmMain ' class-level array Private strStates() As String = {"Hawaii", "Colorado", "Florida", "California", "Georgia", "Idaho", "North Carolina", "Texas", "New York"} Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnVisited_Click(sender As Object, e As EventArgs) Handles btnVisited.Click ' searches an array for the name of a state, and ' then displays an appropriate message End Sub Private Sub txtState_TextChanged(sender As Object, e As EventArgs) Handles txtState.TextChanged lblMessage.Text = String.Empty End Sub End Class
Chap18/States Solution/States 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.States_Project.frmMain End Sub End Class End Namespace
Chap18/States Solution/States 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>
Chap18/States Solution/States 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("States Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("States 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("be7f8fd2-ad83-43d3-b893-6be9d38ae33a")> ' 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")>
Chap18/States Solution/States 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("States_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 Map() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("Map", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace
Chap18/States Solution/States 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\Map.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Chap18/States Solution/States 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.States_Project.My.MySettings Get Return Global.States_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/States Solution/States Project/My Project/Settings.settings
Chap18/States Solution/States Project/Resources/Map.png
Chap18/States Solution/States Project/States Project.vbproj
Debug AnyCPU {BC3EA5EA-00AF-43F5-BADF-C2F0CCF20E22} WinExe States_Project.My.MyApplication States_Project States Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ States Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ States 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
Chap18/States Solution/States Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "States Project", "States Project\States Project.vbproj", "{BC3EA5EA-00AF-43F5-BADF-C2F0CCF20E22}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {BC3EA5EA-00AF-43F5-BADF-C2F0CCF20E22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BC3EA5EA-00AF-43F5-BADF-C2F0CCF20E22}.Debug|Any CPU.Build.0 = Debug|Any CPU {BC3EA5EA-00AF-43F5-BADF-C2F0CCF20E22}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC3EA5EA-00AF-43F5-BADF-C2F0CCF20E22}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/SwatTheBugs Solution/SwatTheBugs Project/App.config
Chap18/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.lblFirst = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.lblLast = New System.Windows.Forms.Label() Me.btnDisplay = 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(24, 37) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(77, 17) Me.Label1.TabIndex = 2 Me.Label1.Text = "First names:" ' 'lblFirst ' Me.lblFirst.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblFirst.Location = New System.Drawing.Point(28, 60) Me.lblFirst.Name = "lblFirst" Me.lblFirst.Size = New System.Drawing.Size(102, 114) Me.lblFirst.TabIndex = 3 ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(133, 37) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(76, 17) Me.Label2.TabIndex = 4 Me.Label2.Text = "Last names:" ' 'lblLast ' Me.lblLast.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblLast.Location = New System.Drawing.Point(136, 60) Me.lblLast.Name = "lblLast" Me.lblLast.Size = New System.Drawing.Size(102, 114) Me.lblLast.TabIndex = 5 ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(256, 37) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(75, 36) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(256, 79) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(75, 36) 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(361, 207) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.lblLast) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.lblFirst) 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 = "SwatTheBugs" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lblFirst As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents lblLast As System.Windows.Forms.Label Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class
Chap18/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
Chap18/SwatTheBugs Solution/SwatTheBugs Project/frmMain.vb
' Name: SwatTheBugs Project ' Purpose: Displays the first and last names ' Programmer: <your name> on <current date> Public Class frmMain Private strNames() As String = {"Carol", "Hanrahan", "Jeffrey", "Pershing", "Larry", "O'Reilly", "Khalid", "Patel", "Marcy", "Lathrop", "Joan", "York"} 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 first and last names in label controls lblFirst.Text = String.Empty lblLast.Text = String.Empty For intSub As Integer = 0 To strNames.Length - 1 lblFirst.Text = lblFirst.Text & strNames(intSub) & ControlChars.NewLine lblLast.Text = lblLast.Text & strNames(intSub + 1) & ControlChars.NewLine Next intSub End Sub End Class
Chap18/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
Chap18/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>
Chap18/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("59402237-0f9f-4eae-9525-e9fec05eaebb")> ' 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")>
Chap18/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
Chap18/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
Chap18/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
Chap18/SwatTheBugs Solution/SwatTheBugs Project/My Project/Settings.settings
Chap18/SwatTheBugs Solution/SwatTheBugs Project/SwatTheBugs Project.vbproj
Debug AnyCPU {B72AB00D-A3C0-43D6-B671-F71B4CA7E23C} 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
Chap18/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", "{B72AB00D-A3C0-43D6-B671-F71B4CA7E23C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B72AB00D-A3C0-43D6-B671-F71B4CA7E23C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B72AB00D-A3C0-43D6-B671-F71B4CA7E23C}.Debug|Any CPU.Build.0 = Debug|Any CPU {B72AB00D-A3C0-43D6-B671-F71B4CA7E23C}.Release|Any CPU.ActiveCfg = Release|Any CPU {B72AB00D-A3C0-43D6-B671-F71B4CA7E23C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/Tea Emporium Solution/Tea Emporium Project/App.config
Chap18/Tea Emporium Solution/Tea Emporium 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.lblTotal = New System.Windows.Forms.Label() Me.btnDisplay = 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.Tea_Emporium_Project.My.Resources.Resources.TeaCup Me.PictureBox1.Location = New System.Drawing.Point(26, 41) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(166, 161) 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(209, 41) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(99, 20) Me.Label1.TabIndex = 2 Me.Label1.Text = "Total pounds:" ' 'lblTotal ' Me.lblTotal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblTotal.Location = New System.Drawing.Point(213, 64) Me.lblTotal.Name = "lblTotal" Me.lblTotal.Size = New System.Drawing.Size(95, 38) Me.lblTotal.TabIndex = 3 Me.lblTotal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(213, 122) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(95, 34) Me.btnDisplay.TabIndex = 0 Me.btnDisplay.Text = "&Display" Me.btnDisplay.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(213, 168) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(95, 34) 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(338, 244) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDisplay) Me.Controls.Add(Me.lblTotal) 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 = "Tea Emporium" 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 lblTotal As System.Windows.Forms.Label Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button End Class
Chap18/Tea Emporium Solution/Tea Emporium 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
Chap18/Tea Emporium Solution/Tea Emporium Project/frmMain.vb
' Name: Tea Emporium Project ' Purpose: Display the total of the values stored in an array ' Programmer: <your name> on <current date> Public Class frmMain Private decPounds() As Decimal = {34.5, 67, 100.5, 89.5, 9.5, 11, 19, 45, 6.5} Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class
Chap18/Tea Emporium Solution/Tea Emporium 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.Tea_Emporium_Project.frmMain End Sub End Class End Namespace
Chap18/Tea Emporium Solution/Tea Emporium 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>
Chap18/Tea Emporium Solution/Tea Emporium 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("Tea Emporium Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Tea Emporium 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("8e871c26-1825-40ac-8c25-0e3f337954fe")> ' 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")>
Chap18/Tea Emporium Solution/Tea Emporium 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("Tea_Emporium_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 TeaCup() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("TeaCup", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace
Chap18/Tea Emporium Solution/Tea Emporium 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\TeaCup.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Chap18/Tea Emporium Solution/Tea Emporium 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.Tea_Emporium_Project.My.MySettings Get Return Global.Tea_Emporium_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/Tea Emporium Solution/Tea Emporium Project/My Project/Settings.settings
Chap18/Tea Emporium Solution/Tea Emporium Project/Resources/TeaCup.png
Chap18/Tea Emporium Solution/Tea Emporium Project/Tea Emporium Project.vbproj
Debug AnyCPU {2BBC2954-E81D-4F32-816C-6EF9E8D54840} WinExe Tea_Emporium_Project.My.MyApplication Tea_Emporium_Project Tea Emporium Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Tea Emporium Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Tea Emporium 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
Chap18/Tea Emporium Solution/Tea Emporium Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Tea Emporium Project", "Tea Emporium Project\Tea Emporium Project.vbproj", "{2BBC2954-E81D-4F32-816C-6EF9E8D54840}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2BBC2954-E81D-4F32-816C-6EF9E8D54840}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2BBC2954-E81D-4F32-816C-6EF9E8D54840}.Debug|Any CPU.Build.0 = Debug|Any CPU {2BBC2954-E81D-4F32-816C-6EF9E8D54840}.Release|Any CPU.ActiveCfg = Release|Any CPU {2BBC2954-E81D-4F32-816C-6EF9E8D54840}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/Tips Solution/Tips Project/App.config
Chap18/Tips Solution/Tips 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.lblAvg = New System.Windows.Forms.Label() Me.btnForNext = New System.Windows.Forms.Button() Me.btnDoLoop = 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(30, 35) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(78, 17) Me.Label1.TabIndex = 3 Me.Label1.Text = "Average tip:" ' 'lblAvg ' Me.lblAvg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblAvg.Location = New System.Drawing.Point(33, 56) Me.lblAvg.Name = "lblAvg" Me.lblAvg.Size = New System.Drawing.Size(97, 28) Me.lblAvg.TabIndex = 4 Me.lblAvg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btnForNext ' Me.btnForNext.Location = New System.Drawing.Point(172, 43) Me.btnForNext.Name = "btnForNext" Me.btnForNext.Size = New System.Drawing.Size(111, 28) Me.btnForNext.TabIndex = 0 Me.btnForNext.Text = "&For...Next" Me.btnForNext.UseVisualStyleBackColor = True ' 'btnDoLoop ' Me.btnDoLoop.Location = New System.Drawing.Point(172, 77) Me.btnDoLoop.Name = "btnDoLoop" Me.btnDoLoop.Size = New System.Drawing.Size(111, 28) Me.btnDoLoop.TabIndex = 1 Me.btnDoLoop.Text = "&Do...Loop" Me.btnDoLoop.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(172, 107) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(111, 28) Me.btnExit.TabIndex = 2 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'PictureBox1 ' Me.PictureBox1.Image = Global.Tips_Project.My.Resources.Resources.Waiter Me.PictureBox1.Location = New System.Drawing.Point(33, 99) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(97, 78) Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.PictureBox1.TabIndex = 6 Me.PictureBox1.TabStop = False ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(331, 205) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnDoLoop) Me.Controls.Add(Me.btnForNext) Me.Controls.Add(Me.lblAvg) 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 = "Tips" CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lblAvg As System.Windows.Forms.Label Friend WithEvents btnForNext As System.Windows.Forms.Button Friend WithEvents btnDoLoop As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox End Class
Chap18/Tips Solution/Tips 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
Chap18/Tips Solution/Tips Project/frmMain.vb
' Name: Tips Project ' Purpose: Display the average tip ' Programmer: <your name> on <current date> Public Class frmMain ' declare class-level array Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnForNext_Click(sender As Object, e As EventArgs) Handles btnForNext.Click ' displays the average tip End Sub Private Sub btnDoLoop_Click(sender As Object, e As EventArgs) Handles btnDoLoop.Click ' displays the average tip End Sub End Class
Chap18/Tips Solution/Tips 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.Tips_Project.frmMain End Sub End Class End Namespace
Chap18/Tips Solution/Tips 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>
Chap18/Tips Solution/Tips 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("Tips Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Tips 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("fc85e278-c653-4e91-9a82-3d37ccaaaab9")> ' 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")>
Chap18/Tips Solution/Tips 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("Tips_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 Waiter() As System.Drawing.Bitmap Get Dim obj As Object = ResourceManager.GetObject("Waiter", resourceCulture) Return CType(obj,System.Drawing.Bitmap) End Get End Property End Module End Namespace
Chap18/Tips Solution/Tips 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\Waiter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Chap18/Tips Solution/Tips 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.Tips_Project.My.MySettings Get Return Global.Tips_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/Tips Solution/Tips Project/My Project/Settings.settings
Chap18/Tips Solution/Tips Project/Resources/Waiter.png
Chap18/Tips Solution/Tips Project/Tips Project.vbproj
Debug AnyCPU {DA6ABF61-55EA-481F-8E63-ECBD2F3B0C66} WinExe Tips_Project.My.MyApplication Tips_Project Tips Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Tips Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Tips 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
Chap18/Tips Solution/Tips Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Tips Project", "Tips Project\Tips Project.vbproj", "{DA6ABF61-55EA-481F-8E63-ECBD2F3B0C66}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {DA6ABF61-55EA-481F-8E63-ECBD2F3B0C66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DA6ABF61-55EA-481F-8E63-ECBD2F3B0C66}.Debug|Any CPU.Build.0 = Debug|Any CPU {DA6ABF61-55EA-481F-8E63-ECBD2F3B0C66}.Release|Any CPU.ActiveCfg = Release|Any CPU {DA6ABF61-55EA-481F-8E63-ECBD2F3B0C66}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap18/Update Prices Solution/Update Prices Project/App.config
Chap18/Update Prices Solution/Update Prices 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.btnExit = New System.Windows.Forms.Button() Me.btnUpdate = New System.Windows.Forms.Button() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.lblOriginal = New System.Windows.Forms.Label() Me.lblUpdated = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(244, 53) Me.btnExit.Margin = New System.Windows.Forms.Padding(2) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(80, 27) Me.btnExit.TabIndex = 1 Me.btnExit.Text = "E&xit" ' 'btnUpdate ' Me.btnUpdate.Location = New System.Drawing.Point(244, 22) Me.btnUpdate.Margin = New System.Windows.Forms.Padding(2) Me.btnUpdate.Name = "btnUpdate" Me.btnUpdate.Size = New System.Drawing.Size(80, 27) Me.btnUpdate.TabIndex = 0 Me.btnUpdate.Text = "&Update" ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(136, 22) Me.Label1.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(76, 17) Me.Label1.TabIndex = 4 Me.Label1.Text = "New prices:" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(24, 22) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(96, 17) Me.Label2.TabIndex = 2 Me.Label2.Text = "Original prices:" ' 'lblOriginal ' Me.lblOriginal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblOriginal.Location = New System.Drawing.Point(27, 42) Me.lblOriginal.Name = "lblOriginal" Me.lblOriginal.Size = New System.Drawing.Size(52, 179) Me.lblOriginal.TabIndex = 3 Me.lblOriginal.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'lblUpdated ' Me.lblUpdated.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblUpdated.Location = New System.Drawing.Point(136, 42) Me.lblUpdated.Name = "lblUpdated" Me.lblUpdated.Size = New System.Drawing.Size(52, 179) Me.lblUpdated.TabIndex = 5 Me.lblUpdated.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(347, 246) Me.Controls.Add(Me.lblUpdated) Me.Controls.Add(Me.lblOriginal) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnUpdate) Me.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.MaximizeBox = False Me.Name = "frmMain" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "ABC Company" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents btnUpdate As System.Windows.Forms.Button Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents lblOriginal As System.Windows.Forms.Label Friend WithEvents lblUpdated As System.Windows.Forms.Label End Class
Chap18/Update Prices Solution/Update Prices 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
Chap18/Update Prices Solution/Update Prices Project/frmMain.vb
' Name: Update Prices Project ' Purpose: Update each value stored in an array ' Programmer: <your name> on <current date> Public Class frmMain Private dblPrices() As Double = {16.75, 12.5, 33.5, 10, 39.5, 25.5, 27.65, 58.35, 79.75, 93.5} Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnUpdate_Click(sender As Object, e As EventArgs) Handles btnUpdate.Click ' displays the contents of the array, ' updates each array element by $2, and ' displays the updated contents ' clear the label controls lblOriginal.Text = String.Empty lblUpdated.Text = String.Empty End Sub End Class
Chap18/Update Prices Solution/Update Prices 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.Update_Prices_Project.frmMain End Sub End Class End Namespace
Chap18/Update Prices Solution/Update Prices 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>
Chap18/Update Prices Solution/Update Prices 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("Update Prices Project")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("Update Prices 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("7b9108ae-b660-4d3f-be7f-c4ad68462a6e")> ' 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")>
Chap18/Update Prices Solution/Update Prices 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("Update_Prices_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
Chap18/Update Prices Solution/Update Prices 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
Chap18/Update Prices Solution/Update Prices 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.Update_Prices_Project.My.MySettings Get Return Global.Update_Prices_Project.My.MySettings.Default End Get End Property End Module End Namespace
Chap18/Update Prices Solution/Update Prices Project/My Project/Settings.settings
Chap18/Update Prices Solution/Update Prices Project/Update Prices Project.vbproj
Debug AnyCPU {AA8BD03E-916B-4B2A-BDAB-C22B744486AF} WinExe Update_Prices_Project.My.MyApplication Update_Prices_Project Update Prices Project 512 WindowsForms v4.5 AnyCPU true full true true bin\Debug\ Update Prices Project.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ Update Prices 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
Chap18/Update Prices Solution/Update Prices Solution.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Update Prices Project", "Update Prices Project\Update Prices Project.vbproj", "{AA8BD03E-916B-4B2A-BDAB-C22B744486AF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AA8BD03E-916B-4B2A-BDAB-C22B744486AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AA8BD03E-916B-4B2A-BDAB-C22B744486AF}.Debug|Any CPU.Build.0 = Debug|Any CPU {AA8BD03E-916B-4B2A-BDAB-C22B744486AF}.Release|Any CPU.ActiveCfg = Release|Any CPU {AA8BD03E-916B-4B2A-BDAB-C22B744486AF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap17/Bonus Solution-TRY THIS 1/Bonus Project/App.config
Chap17/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
Chap17/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
Chap17/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
Chap17/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
Chap17/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
Chap17/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>
Chap17/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")>
Chap17/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
Chap17/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
Chap17/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
Chap17/Bonus Solution-TRY THIS 1/Bonus Project/My Project/Settings.settings
Chap17/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
Chap17/Concert Solution/Concert Project/App.config
Chap17/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
Chap17/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
Chap17/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
Chap17/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(ByVal intNum As Integer, ByVal decSub As Decimal, ByRef decDisc As Decimal) 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 decDiscount As Decimal Dim decTotalDue 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 Call AssignDiscount(intTickets, decSubtotal, decDiscount) ' 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
Chap17/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
Chap17/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>
Chap17/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")>
Chap17/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
Chap17/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
Chap17/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
Chap17/Concert Solution/Concert Project/My Project/Settings.settings
Chap17/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
Chap17/Doughnut.png
Chap17/Favorite Title Solution/Favorite Title Project/App.config
Chap17/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
Chap17/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
Chap17/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
Chap17/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 DisplayMsg(ByVal strType As String, ByVal strName As String) ' displays a book or TV show title lblMsg.Text = "Your favorite " & strType & " is " & strName & "." End Sub 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 Call DisplayMsg(strCategory, strTitle) End Sub End Class
Chap17/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
Chap17/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>
Chap17/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")>
Chap17/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
Chap17/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
Chap17/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
Chap17/Favorite Title Solution/Favorite Title Project/My Project/Settings.settings
Chap17/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
Chap17/FigureThisOut Solution/FigureThisOut Project/App.config
Chap17/FigureThisOut Solution/FigureThisOut Project/FigureThisOut Project.vbproj
Debug AnyCPU {03865ABA-039A-4AB1-9275-42758B07B52A} 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
Chap17/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.txtOperation = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.txtSecond = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.txtFirst = New System.Windows.Forms.TextBox() Me.btnCalc = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.Label4 = New System.Windows.Forms.Label() Me.lblResult = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Location = New System.Drawing.Point(28, 32) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(123, 17) Me.Label1.TabIndex = 0 Me.Label1.Text = "&Operation (A or M):" ' 'txtOperation ' Me.txtOperation.Location = New System.Drawing.Point(156, 29) Me.txtOperation.MaxLength = 1 Me.txtOperation.Name = "txtOperation" Me.txtOperation.Size = New System.Drawing.Size(30, 25) Me.txtOperation.TabIndex = 1 ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(28, 83) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(84, 17) Me.Label2.TabIndex = 2 Me.Label2.Text = "&First number:" ' 'txtSecond ' Me.txtSecond.Location = New System.Drawing.Point(137, 104) Me.txtSecond.Name = "txtSecond" Me.txtSecond.Size = New System.Drawing.Size(64, 25) Me.txtSecond.TabIndex = 5 ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(133, 83) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(103, 17) Me.Label3.TabIndex = 4 Me.Label3.Text = "&Second number:" ' 'txtFirst ' Me.txtFirst.Location = New System.Drawing.Point(32, 104) Me.txtFirst.Name = "txtFirst" Me.txtFirst.Size = New System.Drawing.Size(64, 25) Me.txtFirst.TabIndex = 3 ' 'btnCalc ' Me.btnCalc.Location = New System.Drawing.Point(260, 32) Me.btnCalc.Name = "btnCalc" Me.btnCalc.Size = New System.Drawing.Size(85, 29) Me.btnCalc.TabIndex = 6 Me.btnCalc.Text = "&Calculate" Me.btnCalc.UseVisualStyleBackColor = True ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(260, 67) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(85, 29) Me.btnExit.TabIndex = 7 Me.btnExit.Text = "E&xit" Me.btnExit.UseVisualStyleBackColor = True ' 'Label4 ' Me.Label4.AutoSize = True Me.Label4.Location = New System.Drawing.Point(29, 149) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(46, 17) Me.Label4.TabIndex = 8 Me.Label4.Text = "Result:" ' 'lblResult ' Me.lblResult.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblResult.Location = New System.Drawing.Point(33, 169) Me.lblResult.Name = "lblResult" Me.lblResult.Size = New System.Drawing.Size(203, 25) Me.lblResult.TabIndex = 9 Me.lblResult.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(375, 229) Me.Controls.Add(Me.lblResult) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.btnExit) Me.Controls.Add(Me.btnCalc) Me.Controls.Add(Me.txtFirst) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.txtSecond) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.txtOperation) 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 txtOperation As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents txtSecond As System.Windows.Forms.TextBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents txtFirst As System.Windows.Forms.TextBox Friend WithEvents btnCalc As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents lblResult As System.Windows.Forms.Label End Class
Chap17/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 True
Chap17/FigureThisOut Solution/FigureThisOut Project/frmMain.vb
' Name: FigureThisOut Project ' Purpose: Display the sum or product of two numbers ' Programmer: <your name> on <current date> Public Class frmMain Private Function GetResult(ByVal strOp As String, ByVal intN1 As Integer, ByVal intN2 As Integer) As Integer Dim intResult As Integer If strOp = "A" Then intResult = intN1 + intN2 Else intResult = intN1 * intN2 End If Return intResult End Function Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click ' displays the sum or product of two numbers Dim strOperation As String Dim intNum1 As Integer Dim intNum2 As Integer Dim intAnswer As Integer ' assign input to variables strOperation = txtOperation.Text.ToUpper Integer.TryParse(txtFirst.Text, intNum1) Integer.TryParse(txtSecond.Text, intNum2) ' use function to calculate the sum or product intAnswer = GetResult(strOperation, intNum1, intNum2) If strOperation = "A" Then lblResult.Text = intNum1.ToString & " + " & intNum2.ToString & " = " & intAnswer Else lblResult.Text = intNum1.ToString & " * " & intNum2.ToString & " = " & intAnswer End If 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 txtOperation_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtOperation.KeyPress ' allows the text box to accept only A, a, M, m, and the Backspace key If e.KeyChar <> "A" AndAlso e.KeyChar <> "a" AndAlso e.KeyChar <> "M" AndAlso e.KeyChar <> "m" 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 lblResult.Text = String.Empty End Sub Private Sub txtOperation_TextChanged(sender As Object, e As EventArgs) Handles txtOperation.TextChanged lblResult.Text = String.Empty End Sub Private Sub txtSecond_TextChanged(sender As Object, e As EventArgs) Handles txtSecond.TextChanged lblResult.Text = String.Empty End Sub Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class
Chap17/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
Chap17/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>
Chap17/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("d6e2d393-0318-4bee-a75e-a29d1a3431fd")> ' 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")>
Chap17/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
Chap17/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
Chap17/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
Chap17/FigureThisOut Solution/FigureThisOut Project/My Project/Settings.settings
Chap17/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", "{03865ABA-039A-4AB1-9275-42758B07B52A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {03865ABA-039A-4AB1-9275-42758B07B52A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {03865ABA-039A-4AB1-9275-42758B07B52A}.Debug|Any CPU.Build.0 = Debug|Any CPU {03865ABA-039A-4AB1-9275-42758B07B52A}.Release|Any CPU.ActiveCfg = Release|Any CPU {03865ABA-039A-4AB1-9275-42758B07B52A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Chap17/Grade Solution/Grade Project/App.config
Chap17/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
Chap17/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