Part 3 Setting up the Project
Creating the Project
This example was built using Visual Studio 2015. Different versions of Visual Studio may look different from the screenshots included and some options may not appear.
Using Visual Studio, create a New Project, select Visual C#, Windows Forms Application and supply a name and location for the project files.
In this case, I have named the project ‘Ares’, short for Account Reset.
In Solution Explorer, double click on Properties.
On the ‘Application’ tab, change the Target Framework to .NET Framework 4.6 (or higher if possible).
On the ‘Build’ tab, untick the ‘Prefer 32-bit’ box.
Close the ‘Preferences’ window.
Add the References
In the Solution Explorer window, right click on ‘References’ and select ‘Add Reference’.
Click on the tick box next to each reference in the following list.
The following References will be needed by the project:
Microsoft.BusinessData and System.Management.Automation can be found at:
‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\’
Build the Form
Now that the project has been created, the next thing to do is to delete the default form and replace it with a new form with a name that means something to us.
In the Solution Explorer window, right click on ‘Form 1’ and the select ‘Delete’.
Click ‘OK’ to acknowledge the message window that pops up.
In the Solution Explorer window, right click on ‘Ares’ and then select ‘Add’ and ‘New Item’.
In the ‘Add New Item – Ares’ window that pops up, select ‘Windows Form’ from the ‘Visual C# Items’ group.
Call it ‘AresForm.cs’.
Open the Form designer
Click on the form background.
Set the Size property to 1000, 700
Use the label tool to place instructions on the screen. Don’t forget to place a company logo somewhere to give it a corporate feel.
You will require one Text Box (which you can hide behind your logo. This text box will be used to collect the details from Users card.
Set the following properties:
Name: CardtextBox
Anchor: None (otherwise it will move on the screen if the resolution changes)
Create another Label and call it CatchError. This field will be used to display instructions to the user and notify them of any problems or error codes.
Set the following properties:
BackColor: White
Font / Size: 20pt
Text: Please touch your College Card to the reader.
TextAlign: MiddleCenter
Name: CatchError
Anchor: None
AutoSize: False
Location: <set a location that fits nicely on your screen>
Size: 663, 39