Tankernn 7 роки тому
батько
коміт
feeb9b5ec0

+ 22 - 0
Multiplication training.sln

@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2013 for Windows Desktop
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Multiplication training", "Multiplikationsträning\Multiplication training.vbproj", "{01E2E62B-7992-4A0B-ABFC-7EABAF02D429}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{01E2E62B-7992-4A0B-ABFC-7EABAF02D429}.Debug|x86.ActiveCfg = Debug|x86
+		{01E2E62B-7992-4A0B-ABFC-7EABAF02D429}.Debug|x86.Build.0 = Debug|x86
+		{01E2E62B-7992-4A0B-ABFC-7EABAF02D429}.Release|x86.ActiveCfg = Release|x86
+		{01E2E62B-7992-4A0B-ABFC-7EABAF02D429}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 183 - 0
Multiplication-training/Multiplication training.vbproj

@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{01E2E62B-7992-4A0B-ABFC-7EABAF02D429}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <StartupObject>multtraining.My.MyApplication</StartupObject>
+    <RootNamespace>multtraining</RootNamespace>
+    <AssemblyName>Multiplication training</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MyType>WindowsForms</MyType>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DocumentationFile>Multiplication training.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DocumentationFile>Multiplication training.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionExplicit>On</OptionExplicit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionCompare>Binary</OptionCompare>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionStrict>Off</OptionStrict>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionInfer>On</OptionInfer>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+  </ItemGroup>
+  <ItemGroup>
+    <Import Include="Microsoft.VisualBasic" />
+    <Import Include="System" />
+    <Import Include="System.Collections" />
+    <Import Include="System.Collections.Generic" />
+    <Import Include="System.Data" />
+    <Import Include="System.Drawing" />
+    <Import Include="System.Diagnostics" />
+    <Import Include="System.Windows.Forms" />
+    <Import Include="System.Linq" />
+    <Import Include="System.Xml.Linq" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="SettingsForm.vb">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="SettingsForm.Designer.vb">
+      <DependentUpon>SettingsForm.vb</DependentUpon>
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="My Project\AssemblyInfo.vb" />
+    <Compile Include="My Project\Application.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Application.myapp</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Resources.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Settings.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <Compile Include="ResultsForm.Designer.vb">
+      <DependentUpon>ResultsForm.vb</DependentUpon>
+    </Compile>
+    <Compile Include="ResultsForm.vb">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="ProgressForm.Designer.vb">
+      <DependentUpon>ProgressForm.vb</DependentUpon>
+    </Compile>
+    <Compile Include="ProgressForm.vb">
+      <SubType>Form</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="SettingsForm.resx">
+      <DependentUpon>SettingsForm.vb</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="My Project\Resources.resx">
+      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
+      <CustomToolNamespace>My.Resources</CustomToolNamespace>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="ResultsForm.resx">
+      <DependentUpon>ResultsForm.vb</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="ProgressForm.resx">
+      <DependentUpon>ProgressForm.vb</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="My Project\Application.myapp">
+      <Generator>MyApplicationCodeGenerator</Generator>
+      <LastGenOutput>Application.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="My Project\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <CustomToolNamespace>My</CustomToolNamespace>
+      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 4.5</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 38 - 0
Multiplication-training/My Project/Application.Designer.vb

@@ -0,0 +1,38 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     This code was generated by a tool.
+'     Runtime Version:4.0.30319.34209
+'
+'     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.multtraining.SettingsForm
+        End Sub
+    End Class
+End Namespace

+ 10 - 0
Multiplication-training/My Project/Application.myapp

@@ -0,0 +1,10 @@
+<?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>SettingsForm</MainForm>
+  <SingleInstance>false</SingleInstance>
+  <ShutdownMode>0</ShutdownMode>
+  <EnableVisualStyles>true</EnableVisualStyles>
+  <AuthenticationMode>0</AuthenticationMode>
+  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData>

+ 35 - 0
Multiplication-training/My Project/AssemblyInfo.vb

@@ -0,0 +1,35 @@
+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("Multiplikationsträning")> 
+<Assembly: AssemblyDescription("")> 
+<Assembly: AssemblyCompany("")> 
+<Assembly: AssemblyProduct("Multiplikationsträning")> 
+<Assembly: AssemblyCopyright("Copyright ©  2014")> 
+<Assembly: AssemblyTrademark("")> 
+
+<Assembly: ComVisible(False)>
+
+'The following GUID is for the ID of the typelib if this project is exposed to COM
+<Assembly: Guid("12525106-0c63-4eaa-b35c-021235979490")> 
+
+' 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")> 

+ 63 - 0
Multiplication-training/My Project/Resources.Designer.vb

@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     This code was generated by a tool.
+'     Runtime Version:4.0.30319.34209
+'
+'     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("multtraining.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
+    End Module
+End Namespace

+ 117 - 0
Multiplication-training/My Project/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 73 - 0
Multiplication-training/My Project/Settings.Designer.vb

@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     This code was generated by a tool.
+'     Runtime Version:4.0.30319.34209
+'
+'     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", "12.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.multtraining.My.MySettings
+            Get
+                Return Global.multtraining.My.MySettings.Default
+            End Get
+        End Property
+    End Module
+End Namespace

+ 7 - 0
Multiplication-training/My Project/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 68 - 0
Multiplication-training/ProgressForm.Designer.vb

@@ -0,0 +1,68 @@
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
+Partial Class ProgressForm
+    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.ProgressBar1 = New System.Windows.Forms.ProgressBar()
+        Me.Label1 = New System.Windows.Forms.Label()
+        Me.ProgressBar2 = New System.Windows.Forms.ProgressBar()
+        Me.SuspendLayout()
+        '
+        'ProgressBar1
+        '
+        Me.ProgressBar1.Location = New System.Drawing.Point(12, 35)
+        Me.ProgressBar1.Name = "ProgressBar1"
+        Me.ProgressBar1.Size = New System.Drawing.Size(260, 23)
+        Me.ProgressBar1.TabIndex = 0
+        '
+        'Label1
+        '
+        Me.Label1.Location = New System.Drawing.Point(10, 9)
+        Me.Label1.Name = "Label1"
+        Me.Label1.Size = New System.Drawing.Size(262, 23)
+        Me.Label1.TabIndex = 1
+        Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
+        '
+        'ProgressBar2
+        '
+        Me.ProgressBar2.Location = New System.Drawing.Point(13, 65)
+        Me.ProgressBar2.Name = "ProgressBar2"
+        Me.ProgressBar2.Size = New System.Drawing.Size(259, 23)
+        Me.ProgressBar2.TabIndex = 2
+        '
+        'Progress
+        '
+        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+        Me.ClientSize = New System.Drawing.Size(284, 98)
+        Me.Controls.Add(Me.ProgressBar2)
+        Me.Controls.Add(Me.Label1)
+        Me.Controls.Add(Me.ProgressBar1)
+        Me.Name = "Progress"
+        Me.Text = "Progress"
+        Me.ResumeLayout(False)
+
+    End Sub
+    Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar
+    Friend WithEvents Label1 As System.Windows.Forms.Label
+    Friend WithEvents ProgressBar2 As System.Windows.Forms.ProgressBar
+End Class

+ 120 - 0
Multiplication-training/ProgressForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 3 - 0
Multiplication-training/ProgressForm.vb

@@ -0,0 +1,3 @@
+Public Class ProgressForm
+
+End Class

+ 84 - 0
Multiplication-training/ResultsForm.Designer.vb

@@ -0,0 +1,84 @@
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
+Partial Class ResultsForm
+    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.lblPoäng = New System.Windows.Forms.Label()
+        Me.cmdOK = New System.Windows.Forms.Button()
+        Me.pbAndelrätt = New System.Windows.Forms.ProgressBar()
+        Me.lblAndel = New System.Windows.Forms.Label()
+        Me.SuspendLayout()
+        '
+        'lblPoäng
+        '
+        Me.lblPoäng.BackColor = System.Drawing.Color.White
+        Me.lblPoäng.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
+        Me.lblPoäng.Location = New System.Drawing.Point(12, 9)
+        Me.lblPoäng.Name = "lblPoäng"
+        Me.lblPoäng.Size = New System.Drawing.Size(260, 172)
+        Me.lblPoäng.TabIndex = 0
+        '
+        'cmdOK
+        '
+        Me.cmdOK.Location = New System.Drawing.Point(13, 235)
+        Me.cmdOK.Name = "cmdOK"
+        Me.cmdOK.Size = New System.Drawing.Size(259, 23)
+        Me.cmdOK.TabIndex = 1
+        Me.cmdOK.Text = "OK"
+        Me.cmdOK.UseVisualStyleBackColor = True
+        '
+        'pbAndelrätt
+        '
+        Me.pbAndelrätt.Location = New System.Drawing.Point(13, 206)
+        Me.pbAndelrätt.Name = "pbAndelrätt"
+        Me.pbAndelrätt.Size = New System.Drawing.Size(259, 23)
+        Me.pbAndelrätt.TabIndex = 2
+        '
+        'lblAndel
+        '
+        Me.lblAndel.AutoSize = True
+        Me.lblAndel.Location = New System.Drawing.Point(16, 185)
+        Me.lblAndel.Name = "lblAndel"
+        Me.lblAndel.Size = New System.Drawing.Size(101, 13)
+        Me.lblAndel.TabIndex = 3
+        Me.lblAndel.Text = "Percentage correct:"
+        '
+        'Results
+        '
+        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+        Me.ClientSize = New System.Drawing.Size(284, 262)
+        Me.Controls.Add(Me.lblAndel)
+        Me.Controls.Add(Me.pbAndelrätt)
+        Me.Controls.Add(Me.cmdOK)
+        Me.Controls.Add(Me.lblPoäng)
+        Me.Name = "Results"
+        Me.Text = "Results"
+        Me.ResumeLayout(False)
+        Me.PerformLayout()
+
+    End Sub
+    Friend WithEvents lblPoäng As System.Windows.Forms.Label
+    Friend WithEvents cmdOK As System.Windows.Forms.Button
+    Friend WithEvents pbAndelrätt As System.Windows.Forms.ProgressBar
+    Friend WithEvents lblAndel As System.Windows.Forms.Label
+End Class

+ 120 - 0
Multiplication-training/ResultsForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 17 - 0
Multiplication-training/ResultsForm.vb

@@ -0,0 +1,17 @@
+Public Class ResultsForm
+
+    Private Sub cmdOK_Click(sender As System.Object, e As System.EventArgs) Handles cmdOK.Click
+        Me.Close()
+    End Sub
+
+    Private Sub Results_Shown(sender As Object, e As System.EventArgs) Handles Me.Shown
+        'Print all data as text
+        lblPoäng.Text = "Questions: " & SettingsForm.iArrayLength * SettingsForm.iTestLength & vbCrLf & "Correct answers: " & SettingsForm.iCorrect & vbCrLf & "Incorrect answers: " & SettingsForm.iIncorrect
+
+        'Text to clarify the progressbar
+        lblAndel.Text = "Percentage correct: " & SettingsForm.iCorrect & " / " & SettingsForm.iArrayLength * SettingsForm.iTestLength
+
+        pbAndelrätt.Maximum = SettingsForm.iArrayLength * SettingsForm.iTestLength 'Set the maximum value to the number of questions
+        pbAndelrätt.Value = SettingsForm.iCorrect 'Set the value to the number of correct answers
+    End Sub
+End Class

+ 352 - 0
Multiplication-training/SettingsForm.Designer.vb

@@ -0,0 +1,352 @@
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
+Partial Class SettingsForm
+    Inherits System.Windows.Forms.Form
+
+    'Form overrides dispose to clean up the component list.
+    <System.Diagnostics.DebuggerNonUserCode()> _
+    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+        Try
+            If disposing AndAlso components IsNot Nothing Then
+                components.Dispose()
+            End If
+        Finally
+            MyBase.Dispose(disposing)
+        End Try
+    End Sub
+
+    'Required by the Windows Form Designer
+    Private components As System.ComponentModel.IContainer
+
+    'NOTE: The following procedure is required by the Windows Form Designer
+    'It can be modified using the Windows Form Designer.  
+    'Do not modify it using the code editor.
+    <System.Diagnostics.DebuggerStepThrough()> _
+    Private Sub InitializeComponent()
+        Me.GroupBox1 = New System.Windows.Forms.GroupBox()
+        Me.rbStraight = New System.Windows.Forms.RadioButton()
+        Me.rbRandom = New System.Windows.Forms.RadioButton()
+        Me.GroupBox2 = New System.Windows.Forms.GroupBox()
+        Me.rbTryAgain = New System.Windows.Forms.RadioButton()
+        Me.rbCorrectAnswer = New System.Windows.Forms.RadioButton()
+        Me.GroupBox3 = New System.Windows.Forms.GroupBox()
+        Me.cbAll = New System.Windows.Forms.CheckBox()
+        Me.cb10 = New System.Windows.Forms.CheckBox()
+        Me.cb9 = New System.Windows.Forms.CheckBox()
+        Me.cb8 = New System.Windows.Forms.CheckBox()
+        Me.cb7 = New System.Windows.Forms.CheckBox()
+        Me.cb6 = New System.Windows.Forms.CheckBox()
+        Me.cb5 = New System.Windows.Forms.CheckBox()
+        Me.cb4 = New System.Windows.Forms.CheckBox()
+        Me.cb3 = New System.Windows.Forms.CheckBox()
+        Me.cb2 = New System.Windows.Forms.CheckBox()
+        Me.cb1 = New System.Windows.Forms.CheckBox()
+        Me.GroupBox4 = New System.Windows.Forms.GroupBox()
+        Me.rbShort = New System.Windows.Forms.RadioButton()
+        Me.rbMedium = New System.Windows.Forms.RadioButton()
+        Me.rbLong = New System.Windows.Forms.RadioButton()
+        Me.cmdStart = New System.Windows.Forms.Button()
+        Me.GroupBox1.SuspendLayout()
+        Me.GroupBox2.SuspendLayout()
+        Me.GroupBox3.SuspendLayout()
+        Me.GroupBox4.SuspendLayout()
+        Me.SuspendLayout()
+        '
+        'GroupBox1
+        '
+        Me.GroupBox1.Controls.Add(Me.rbStraight)
+        Me.GroupBox1.Controls.Add(Me.rbRandom)
+        Me.GroupBox1.Location = New System.Drawing.Point(13, 13)
+        Me.GroupBox1.Name = "GroupBox1"
+        Me.GroupBox1.Size = New System.Drawing.Size(141, 67)
+        Me.GroupBox1.TabIndex = 0
+        Me.GroupBox1.TabStop = False
+        Me.GroupBox1.Text = "Straight or randomized?"
+        '
+        'rbStraight
+        '
+        Me.rbStraight.AutoSize = True
+        Me.rbStraight.Location = New System.Drawing.Point(7, 44)
+        Me.rbStraight.Name = "rbStraight"
+        Me.rbStraight.Size = New System.Drawing.Size(61, 17)
+        Me.rbStraight.TabIndex = 1
+        Me.rbStraight.Text = "Straight"
+        Me.rbStraight.UseVisualStyleBackColor = True
+        '
+        'rbRandom
+        '
+        Me.rbRandom.AutoSize = True
+        Me.rbRandom.Checked = True
+        Me.rbRandom.Location = New System.Drawing.Point(7, 20)
+        Me.rbRandom.Name = "rbRandom"
+        Me.rbRandom.Size = New System.Drawing.Size(84, 17)
+        Me.rbRandom.TabIndex = 0
+        Me.rbRandom.TabStop = True
+        Me.rbRandom.Text = "Randomized"
+        Me.rbRandom.UseVisualStyleBackColor = True
+        '
+        'GroupBox2
+        '
+        Me.GroupBox2.Controls.Add(Me.rbTryAgain)
+        Me.GroupBox2.Controls.Add(Me.rbCorrectAnswer)
+        Me.GroupBox2.Location = New System.Drawing.Point(161, 13)
+        Me.GroupBox2.Name = "GroupBox2"
+        Me.GroupBox2.Size = New System.Drawing.Size(214, 67)
+        Me.GroupBox2.TabIndex = 1
+        Me.GroupBox2.TabStop = False
+        Me.GroupBox2.Text = "What happens on wrong answer?"
+        '
+        'rbTryAgain
+        '
+        Me.rbTryAgain.AutoSize = True
+        Me.rbTryAgain.Location = New System.Drawing.Point(7, 44)
+        Me.rbTryAgain.Name = "rbTryAgain"
+        Me.rbTryAgain.Size = New System.Drawing.Size(69, 17)
+        Me.rbTryAgain.TabIndex = 1
+        Me.rbTryAgain.Text = "Try again"
+        Me.rbTryAgain.UseVisualStyleBackColor = True
+        '
+        'rbCorrectAnswer
+        '
+        Me.rbCorrectAnswer.AutoSize = True
+        Me.rbCorrectAnswer.Checked = True
+        Me.rbCorrectAnswer.Location = New System.Drawing.Point(7, 20)
+        Me.rbCorrectAnswer.Name = "rbCorrectAnswer"
+        Me.rbCorrectAnswer.Size = New System.Drawing.Size(177, 17)
+        Me.rbCorrectAnswer.TabIndex = 0
+        Me.rbCorrectAnswer.TabStop = True
+        Me.rbCorrectAnswer.Text = "The correct answer is presented"
+        Me.rbCorrectAnswer.UseVisualStyleBackColor = True
+        '
+        'GroupBox3
+        '
+        Me.GroupBox3.Controls.Add(Me.cbAll)
+        Me.GroupBox3.Controls.Add(Me.cb10)
+        Me.GroupBox3.Controls.Add(Me.cb9)
+        Me.GroupBox3.Controls.Add(Me.cb8)
+        Me.GroupBox3.Controls.Add(Me.cb7)
+        Me.GroupBox3.Controls.Add(Me.cb6)
+        Me.GroupBox3.Controls.Add(Me.cb5)
+        Me.GroupBox3.Controls.Add(Me.cb4)
+        Me.GroupBox3.Controls.Add(Me.cb3)
+        Me.GroupBox3.Controls.Add(Me.cb2)
+        Me.GroupBox3.Controls.Add(Me.cb1)
+        Me.GroupBox3.Location = New System.Drawing.Point(13, 87)
+        Me.GroupBox3.Name = "GroupBox3"
+        Me.GroupBox3.Size = New System.Drawing.Size(179, 170)
+        Me.GroupBox3.TabIndex = 2
+        Me.GroupBox3.TabStop = False
+        Me.GroupBox3.Text = "Which tables?"
+        '
+        'cbAll
+        '
+        Me.cbAll.AutoSize = True
+        Me.cbAll.Location = New System.Drawing.Point(7, 140)
+        Me.cbAll.Name = "cbAll"
+        Me.cbAll.Size = New System.Drawing.Size(37, 17)
+        Me.cbAll.TabIndex = 10
+        Me.cbAll.Text = "All"
+        Me.cbAll.UseVisualStyleBackColor = True
+        '
+        'cb10
+        '
+        Me.cb10.AutoSize = True
+        Me.cb10.Location = New System.Drawing.Point(95, 116)
+        Me.cb10.Name = "cb10"
+        Me.cb10.Size = New System.Drawing.Size(68, 17)
+        Me.cb10.TabIndex = 9
+        Me.cb10.Text = "Table 10"
+        Me.cb10.UseVisualStyleBackColor = True
+        '
+        'cb9
+        '
+        Me.cb9.AutoSize = True
+        Me.cb9.Location = New System.Drawing.Point(95, 92)
+        Me.cb9.Name = "cb9"
+        Me.cb9.Size = New System.Drawing.Size(62, 17)
+        Me.cb9.TabIndex = 8
+        Me.cb9.Text = "Table 9"
+        Me.cb9.UseVisualStyleBackColor = True
+        '
+        'cb8
+        '
+        Me.cb8.AutoSize = True
+        Me.cb8.Location = New System.Drawing.Point(95, 68)
+        Me.cb8.Name = "cb8"
+        Me.cb8.Size = New System.Drawing.Size(62, 17)
+        Me.cb8.TabIndex = 7
+        Me.cb8.Text = "Table 8"
+        Me.cb8.UseVisualStyleBackColor = True
+        '
+        'cb7
+        '
+        Me.cb7.AutoSize = True
+        Me.cb7.Location = New System.Drawing.Point(95, 44)
+        Me.cb7.Name = "cb7"
+        Me.cb7.Size = New System.Drawing.Size(62, 17)
+        Me.cb7.TabIndex = 6
+        Me.cb7.Text = "Table 7"
+        Me.cb7.UseVisualStyleBackColor = True
+        '
+        'cb6
+        '
+        Me.cb6.AutoSize = True
+        Me.cb6.Location = New System.Drawing.Point(95, 20)
+        Me.cb6.Name = "cb6"
+        Me.cb6.Size = New System.Drawing.Size(62, 17)
+        Me.cb6.TabIndex = 5
+        Me.cb6.Text = "Table 6"
+        Me.cb6.UseVisualStyleBackColor = True
+        '
+        'cb5
+        '
+        Me.cb5.AutoSize = True
+        Me.cb5.Location = New System.Drawing.Point(7, 116)
+        Me.cb5.Name = "cb5"
+        Me.cb5.Size = New System.Drawing.Size(62, 17)
+        Me.cb5.TabIndex = 4
+        Me.cb5.Text = "Table 5"
+        Me.cb5.UseVisualStyleBackColor = True
+        '
+        'cb4
+        '
+        Me.cb4.AutoSize = True
+        Me.cb4.Location = New System.Drawing.Point(7, 92)
+        Me.cb4.Name = "cb4"
+        Me.cb4.Size = New System.Drawing.Size(62, 17)
+        Me.cb4.TabIndex = 3
+        Me.cb4.Text = "Table 4"
+        Me.cb4.UseVisualStyleBackColor = True
+        '
+        'cb3
+        '
+        Me.cb3.AutoSize = True
+        Me.cb3.Location = New System.Drawing.Point(7, 68)
+        Me.cb3.Name = "cb3"
+        Me.cb3.Size = New System.Drawing.Size(62, 17)
+        Me.cb3.TabIndex = 2
+        Me.cb3.Text = "Table 3"
+        Me.cb3.UseVisualStyleBackColor = True
+        '
+        'cb2
+        '
+        Me.cb2.AutoSize = True
+        Me.cb2.Location = New System.Drawing.Point(7, 44)
+        Me.cb2.Name = "cb2"
+        Me.cb2.Size = New System.Drawing.Size(62, 17)
+        Me.cb2.TabIndex = 1
+        Me.cb2.Text = "Table 2"
+        Me.cb2.UseVisualStyleBackColor = True
+        '
+        'cb1
+        '
+        Me.cb1.AutoSize = True
+        Me.cb1.Location = New System.Drawing.Point(7, 20)
+        Me.cb1.Name = "cb1"
+        Me.cb1.Size = New System.Drawing.Size(62, 17)
+        Me.cb1.TabIndex = 0
+        Me.cb1.Text = "Table 1"
+        Me.cb1.UseVisualStyleBackColor = True
+        '
+        'GroupBox4
+        '
+        Me.GroupBox4.Controls.Add(Me.rbShort)
+        Me.GroupBox4.Controls.Add(Me.rbMedium)
+        Me.GroupBox4.Controls.Add(Me.rbLong)
+        Me.GroupBox4.Location = New System.Drawing.Point(199, 87)
+        Me.GroupBox4.Name = "GroupBox4"
+        Me.GroupBox4.Size = New System.Drawing.Size(177, 170)
+        Me.GroupBox4.TabIndex = 3
+        Me.GroupBox4.TabStop = False
+        Me.GroupBox4.Text = "How long test?"
+        '
+        'rbShort
+        '
+        Me.rbShort.AutoSize = True
+        Me.rbShort.Location = New System.Drawing.Point(7, 68)
+        Me.rbShort.Name = "rbShort"
+        Me.rbShort.Size = New System.Drawing.Size(50, 17)
+        Me.rbShort.TabIndex = 2
+        Me.rbShort.TabStop = True
+        Me.rbShort.Text = "Short"
+        Me.rbShort.UseVisualStyleBackColor = True
+        '
+        'rbMedium
+        '
+        Me.rbMedium.AutoSize = True
+        Me.rbMedium.Location = New System.Drawing.Point(7, 44)
+        Me.rbMedium.Name = "rbMedium"
+        Me.rbMedium.Size = New System.Drawing.Size(62, 17)
+        Me.rbMedium.TabIndex = 1
+        Me.rbMedium.TabStop = True
+        Me.rbMedium.Text = "Medium"
+        Me.rbMedium.UseVisualStyleBackColor = True
+        '
+        'rbLong
+        '
+        Me.rbLong.AutoSize = True
+        Me.rbLong.Checked = True
+        Me.rbLong.Location = New System.Drawing.Point(7, 20)
+        Me.rbLong.Name = "rbLong"
+        Me.rbLong.Size = New System.Drawing.Size(49, 17)
+        Me.rbLong.TabIndex = 0
+        Me.rbLong.TabStop = True
+        Me.rbLong.Text = "Long"
+        Me.rbLong.UseVisualStyleBackColor = True
+        '
+        'cmdStart
+        '
+        Me.cmdStart.Location = New System.Drawing.Point(13, 264)
+        Me.cmdStart.Name = "cmdStart"
+        Me.cmdStart.Size = New System.Drawing.Size(363, 23)
+        Me.cmdStart.TabIndex = 4
+        Me.cmdStart.Text = "Start test!"
+        Me.cmdStart.UseVisualStyleBackColor = True
+        '
+        'SettingsForm
+        '
+        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+        Me.ClientSize = New System.Drawing.Size(388, 294)
+        Me.Controls.Add(Me.cmdStart)
+        Me.Controls.Add(Me.GroupBox4)
+        Me.Controls.Add(Me.GroupBox3)
+        Me.Controls.Add(Me.GroupBox2)
+        Me.Controls.Add(Me.GroupBox1)
+        Me.Name = "SettingsForm"
+        Me.Text = "Multiplication training"
+        Me.GroupBox1.ResumeLayout(False)
+        Me.GroupBox1.PerformLayout()
+        Me.GroupBox2.ResumeLayout(False)
+        Me.GroupBox2.PerformLayout()
+        Me.GroupBox3.ResumeLayout(False)
+        Me.GroupBox3.PerformLayout()
+        Me.GroupBox4.ResumeLayout(False)
+        Me.GroupBox4.PerformLayout()
+        Me.ResumeLayout(False)
+
+    End Sub
+    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
+    Friend WithEvents rbStraight As System.Windows.Forms.RadioButton
+    Friend WithEvents rbRandom As System.Windows.Forms.RadioButton
+    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
+    Friend WithEvents rbTryAgain As System.Windows.Forms.RadioButton
+    Friend WithEvents rbCorrectAnswer As System.Windows.Forms.RadioButton
+    Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
+    Friend WithEvents cbAll As System.Windows.Forms.CheckBox
+    Friend WithEvents cb10 As System.Windows.Forms.CheckBox
+    Friend WithEvents cb9 As System.Windows.Forms.CheckBox
+    Friend WithEvents cb8 As System.Windows.Forms.CheckBox
+    Friend WithEvents cb7 As System.Windows.Forms.CheckBox
+    Friend WithEvents cb6 As System.Windows.Forms.CheckBox
+    Friend WithEvents cb5 As System.Windows.Forms.CheckBox
+    Friend WithEvents cb4 As System.Windows.Forms.CheckBox
+    Friend WithEvents cb3 As System.Windows.Forms.CheckBox
+    Friend WithEvents cb2 As System.Windows.Forms.CheckBox
+    Friend WithEvents cb1 As System.Windows.Forms.CheckBox
+    Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
+    Friend WithEvents rbShort As System.Windows.Forms.RadioButton
+    Friend WithEvents rbMedium As System.Windows.Forms.RadioButton
+    Friend WithEvents rbLong As System.Windows.Forms.RadioButton
+    Friend WithEvents cmdStart As System.Windows.Forms.Button
+
+End Class

+ 120 - 0
Multiplication-training/SettingsForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 338 - 0
Multiplication-training/SettingsForm.vb

@@ -0,0 +1,338 @@
+Public Class SettingsForm
+    'Variables for settings
+    Public boolRandomize, boolTryAgain As Boolean
+    Public iIncorrect, iCorrect, iArrayLength, iTestLength As Integer
+    'Array to hold the questions
+    Public iQuestions(2, 0) As Integer
+
+    Dim progress As New ProgressForm
+
+
+    Private Sub cmdStart_Click(sender As System.Object, e As System.EventArgs) Handles cmdStart.Click
+
+        readSettings()
+
+        Try 'Catch exception if no table was selected
+            createQuestions()
+        Catch ex As Exception
+            MsgBox("You must select at least one table!")
+            Exit Sub
+        End Try
+
+
+        'Do the test the desired amount of times
+
+        'Set maximum value for the prograssbar
+        progress.ProgressBar2.Maximum = iTestLength
+        Try
+            For i = 1 To iTestLength
+                If boolRandomize Then 'Shuffle the array?
+                    performTest(shuffleArray(iQuestions)) 'Shuffle and test
+                Else
+                    performTest(iQuestions) 'Just test
+                End If
+                'Update value on ProgressBar2
+                progress.ProgressBar2.Value = i
+            Next
+
+            progress.Close()
+            Me.Show()
+        Catch ex As Exception 'Return to the settings form
+            Me.Show()
+            progress.Close()
+            Exit Sub
+        End Try
+
+
+        'Create and show the ResultsForm
+        Dim pf As New ResultsForm
+        pf.Show()
+
+    End Sub
+
+    Private Sub cbAlla_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles cbAll.CheckedChanged
+        'Set all checkboxes to checked or not
+        If cbAll.Checked Then
+            cb1.Checked = True
+            cb2.Checked = True
+            cb3.Checked = True
+            cb4.Checked = True
+            cb5.Checked = True
+            cb6.Checked = True
+            cb7.Checked = True
+            cb8.Checked = True
+            cb9.Checked = True
+            cb10.Checked = True
+        Else
+            cb1.Checked = False
+            cb2.Checked = False
+            cb3.Checked = False
+            cb4.Checked = False
+            cb5.Checked = False
+            cb6.Checked = False
+            cb7.Checked = False
+            cb8.Checked = False
+            cb9.Checked = False
+            cb10.Checked = False
+        End If
+    End Sub
+
+    Private Sub performTest(uppgifter As Integer(,))
+        'Reset counters
+        iIncorrect = 0
+        iCorrect = 0
+
+        Dim iUserAnswer, iCorrectAnswer As Integer
+        Dim boolAlreadyGuessedWrong As Boolean 'Keeps track of if the user has already guessed wrong, so that no points will be awarded after having guessed wrong once
+
+
+
+        'Set progressbar max value
+        progress.ProgressBar1.Maximum = iArrayLength
+        'Set label start value
+        progress.Label1.Text = "1 / " & iArrayLength
+        'Show the progress window
+        progress.Show()
+
+        'Hide settings-box
+        Me.Hide()
+
+        'Go through the questions and get answers
+        For i = 0 To iArrayLength - 1
+            'Calculate correct answer
+            iCorrectAnswer = uppgifter((0), (i)) * uppgifter((1), (i))
+
+            'Try until a number is entered, and if the user selected, try again until the correct answer is given
+            While True
+                Try
+                    'Ask for the answer
+                    Dim strAnswer As String = InputBox(uppgifter((0), (i)) & " X " & uppgifter((1), (i)))
+
+                    'Allow the user to abort
+                    If strAnswer = "" Then
+                        Throw New OperationCanceledException
+                    End If
+
+                    iUserAnswer = strAnswer
+                Catch ex1 As OperationCanceledException
+                    If MsgBox("Are you sure you want to cancel?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
+                        Throw ex1
+                    Else
+                        Continue While
+                    End If
+
+                Catch ex As Exception 'Catch errors
+                    MsgBox("Only numbers please!")
+                    Continue While 'Try again
+                End Try
+
+
+                'Check answer
+                If iCorrectAnswer = iUserAnswer Then 'Correct
+                    'If the user already guessed wrong, no points are awarded
+                    If Not boolAlreadyGuessedWrong Then
+                        iCorrect += 1
+                    End If
+                    boolAlreadyGuessedWrong = False 'Reset variable
+
+                    'Next question
+                    Exit While
+                Else 'Incorrect
+
+                    'Try again or continue
+                    If boolTryAgain Then
+                        MsgBox("Wrong, try again!")
+
+                        'If the user already guessed wrong, give no more incorrect points
+                        If Not boolAlreadyGuessedWrong Then
+                            iIncorrect += 1
+                        End If
+
+                        boolAlreadyGuessedWrong = True 'The user has been wrong
+
+                        'Retry
+                        Continue While
+                    Else
+                        MsgBox("Wrong, the answer is: " & iCorrectAnswer)
+                        iIncorrect += 1
+                        'Continue
+                        Exit While
+                    End If
+
+                End If
+            End While
+
+            'Update progress form
+            progress.Label1.Text = i + 1 & " / " & iArrayLength 'Label
+            progress.ProgressBar1.Value = i + 1 'ProgressBar
+        Next
+
+    End Sub
+
+    Private Sub createQuestions()
+        'Reset the arraylength
+        iArrayLength = 0
+
+        'Read all checkboxes and create questions
+
+        If cb1.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 1
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        If cb2.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 2
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        If cb3.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 3
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        If cb4.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 4
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        If cb5.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 5
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        If cb6.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 6
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        If cb7.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 7
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        If cb8.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 8
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        If cb9.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 9
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        If cb10.Checked Then
+            For i = 1 To 10
+                'Redim array
+                ReDim Preserve iQuestions(2, iArrayLength + 1)
+                'Add all values at the end
+                iQuestions((0), (iArrayLength)) = 10
+                iQuestions((1), (iArrayLength)) = i
+                iArrayLength += 1
+            Next
+        End If
+
+        Try
+            'Try to get the first value, if there is none, throw exception
+            Dim temp As Integer = iQuestions(0, 1)
+        Catch ex As Exception
+            Throw ex
+        End Try
+        'Remove the last position
+        ReDim Preserve iQuestions(2, iArrayLength - 1)
+    End Sub
+
+    Private Function shuffleArray(oldArray As Integer(,)) As Integer(,) 'Shuffle the array, and return the shuffle one
+        Dim r As New Random 'Randomizer
+        Dim newArray(2, iArrayLength) As Integer 'The new, shuffled array
+        Dim iTagna(iArrayLength) As Integer 'Keeping track of which positions are already taken
+
+
+        For i = 0 To iArrayLength - 1 'Go through the entire array
+            While True 'Try again until Exit While
+                Dim randomnummer As Integer = r.Next(0, iArrayLength)
+
+                If iTagna(randomnummer) = 1 Then 'Check that the position is not taken
+                    Continue While 'Try again
+                Else
+
+                    newArray((0), (i)) = oldArray((0), (randomnummer)) 'First factor
+                    newArray((1), (i)) = oldArray((1), (randomnummer)) 'Second factor
+                    iTagna(randomnummer) = 1 'Mark the position as taken
+                    Exit While 'Stop trying
+                End If
+
+            End While
+        Next
+
+        Return newArray
+
+    End Function
+
+    Private Sub readSettings() 'Reads settings from the form
+        boolRandomize = rbRandom.Checked
+        boolTryAgain = rbTryAgain.Checked
+
+        'Test length
+        If rbLong.Checked Then
+            iTestLength = 3 'All questions trice
+        ElseIf rbMedium.Checked Then
+            iTestLength = 2 'All questions twice
+        Else
+            iTestLength = 1 'All questions once
+        End If
+    End Sub
+End Class