Hi, I am Luke, it's my first Instructable. I want to show you how to create a simple phone book application in Microsoft Visual Studio using C#. It's good to have some basic knowledge of programming before making this project.
Let's get started.
We need Microsoft Visual Studio, it's free for students, you can get Professional Edition from MSDNAA. Search google for more information.
This is how our application will look like:
Step 1: Creating new project in Microsoft Visual Studio
Start Microsoft Visual Studio, and create new Project, choose Windows Forms Application remeber project type is Visual C#. You can name your project whatever you want and change location for the project if nessesary.
Step 2: Adding everything to Form
Now, it's a empty Form. Let's add to it some components from toolbox as seen on the picture. They are: DataGridView, SaveFileDioalog, OpenFileDialog and menuStrip
Step 3: Adding Columns
After adding DataGridView, We have empty space, click right mouse button on it and select edit Columns.
Step 4: Before writing a code
Make sure your form looks like this and DataGridView is named "GRID". You can set it in properies window
Step 5: Writing a code
Click two times on each element of your menu, to create events, each time a window with a code will be showed, so go back and to it with all (Save, Open, Close)
That what we need in code :
private void SaveToolStripMenuItem_Click(object sender, EventArgs e)
private void OpenToolStripMenuItem_Click(object sender, EventArgs e)
private void CloseToolStripMenuItem_Click(object sender, EventArgs e)