You are on page 1of 25

C# Language

For Humans
Using
Visual Studio
by
Christopher Topalian
Copyright 2021
All Rights Reserved
Dedicated
to
God the Father
Table of Contents
Download Visual Studio Community...................................4
Install Visual Studio Community...........................................5
Choose What to Install.............................................................6
We Install .Net Framework for C#........................................7
CREATE A NEW C# PROJECT....................................................8
CHOOSE C#, Windows Forms App........................................9
CHOOSE C#, Windows Forms App.......................................10
Our C# App Making Environment.........................................11
Resizing our Form Window...................................................12
Button – Add a Button to our Form.....................................13
Button – NAME our Button...................................................14
Label – Add a Label to our Form..........................................15
Label – NAME our Label.........................................................16
Button – Programming our Button.....................................17
Testing app by pressing Start Button................................18
ourApp is shown Running......................................................19
Saving ourApp as an EXE file!..............................................20
How to Find our Project Folder............................................21
We go to our C Drive and open our User Folder..............21
We next open the folder named source, then repos.....21
How to Find Our EXE File.......................................................22
We go to our bin folder, as shown above.........................22
We open our Debug Folder, as shown below.................22
How to Find Our EXE File, continued..................................23
HERE IS OUR EXE FILE!............................................................23
Dedicated to God the Father................................................24
Download Visual Studio Community

Download
Visual Studio
Community

Left Click
Free Download
We go to
https://visualstudio.microsoft.com/downloads/

We Download our Free Visual Studio!

After 30 Days, Microsoft simply requires a sign in to


continue using the development tools.
Install Visual Studio Community

Double Click
vs_Community.exe

IF YOU
AGREE
Left Click
READ Continue
License Terms

Read the License Terms. If you agree, then continue.


Next, we will decide what we want to install.

There are many choices, we will only install .Net


desktop development for C#, as shown on the next
pages.
Choose What to Install

Scroll Down
To See more

Install

By continuing, you agree to the license for the Visual Studio


edition you selected. We also offer the ability to download other
software with Visual Studio. This software is licensed separately,
as set out in the 3rd Party Notices or in its accompanying license.
By continuing, you also agree to those licenses.

We Scroll Down and Find the


.NET desktop Development for C#
We will INSTALL the .NET desktop develpment for C#
as shown on the next page.
We Install .Net Framework for C#

We just put a CHECKMARK in the CHECK BOX for


.NET desktop development

It automatically selects these options for us:

Install
We have a Checkmark in the Checkbox for .Net
desktop development and now we can press the
Install Button.
CREATE A NEW C# PROJECT

Left Click Create a new project


CHOOSE C#, Windows Forms App

Left Click Windows Forms App (.NET Framework)


CHOOSE C#, Windows Forms App

We make our Project name ourApp


and place a mark in t he Checkbox
Place solution and project in the same directory
Our C# App Making Environment

This is our Visual Studio C# Windows Form Maker


Enivornment.

On the left side are our tools, such as adding buttons.

In the middle is the Form itself that we are making.

On the right side is the properties of the Form.


Resizing our Form Window

Hold LEFT CLICK and DRAG the RESIZE HANDLE to


resize the Form Window.
Button – Add a Button to our Form

Left Click on Button in Tool Box

Hold Left Click and Draw a Button onto our Form


Window.
Button – NAME our Button

With our Button Currently Selected:


On the RIGHT SIDE of our screen we see the Properties.
We Look for the NAME property.
We change the name of our button to ButtonOne
Label – Add a Label to our Form

Hold Left Click and Draw a Label onto our Form


Window.
Label – NAME our Label

With our Label Currently Selected:


On the RIGHT SIDE of our screen we see the Properties.
We Look for the NAME property.
We change the name of our label to LabelOne
Button – Programming our Button

With our Button Currently Selected:


We Double Clicked on the Button we placed on our form.
By Double Clicking the Button, it opens the CODE editor.

We are Now READY to add our C# code.


We will add CODE to our Button, which is named ButtonOne.
When we the push ButtonOne, we will make it add some text
to LabelOne.
LabelOne.Text = "Hi Everyone";
When we push ButtonOne, it will add this text to LabelOne.
Testing app by pressing Start Button

We Left Click the Start Button, at the top of the screen.

The Start Button will Test our Application.

After pressing the Start Button it opens ourApp.

Good job! We have tested our first C# application, as


shown on the next page.
ourApp is shown Running

label1

button1

As we can see, ourApp starts with the text of label1.


When we click the button, it will change the text of the
this label, to Hi everyone, as shown below.

Hi Everyone

button1
Saving ourApp as an EXE file!

Left Click the Build Menu or press Ctrl + Shift + B.


This builds ourApp into an EXE file.
Our exe file is found in ourApp project folder.
We locate our exe file by finding the folder where our
project is located, as shown on the next page.
How to Find our Project Folder

We go to our C Drive and open our User Folder


We next open the folder named source, then repos.

Here is our Project folder, named ourApp.


How to Find Our EXE File

We go to our bin folder, as shown above.


We open our Debug Folder, as shown below.
How to Find Our EXE File, continued

HERE IS OUR EXE FILE!


Good Job. We can now share our Exe file with our
friends and family and with the world!

We can Copy this EXE and share it as a SINGLE FILE and


it will work on any Windows 10 computer!.

We are Now C# Programmers! :-)


Font – Size, Color, Type

label1

button1

We Left Click on our Button.


In Properties Window, Scroll Down to Find Font
We click on the 3 dots … to Edit the Font
Dedicated to God the Father
This book is created by the
College of Scripting Music & Science

Always remember, that each time you write code


with a pencil and paper, it becomes imprinted so
deeply in memory that the material and methods are
learned extremely well.

When you Type the code, the same is true. The more
you type and write out the code by keyboard or
pencil and paper, the more you will learn
programming!

Write and Type EVERY example that you find.


Keep all of your code organized.
Every code that you create increases your
programming abilities.

SEEING CODE, is one thing,


but WRITING CODE is another.
Write it, Type it, Speak It, See It, Dream It.

www.CollegeOfScripting.weebly.com

You might also like