READ FIRST C# WINDOWS FORM

From today on, we’re feat to be creating Windows Applications, kinda than Console Applications. Windows Applications attain ingest of something titled a Form. The Form is grapheme at first. You then add curb to your form, things aforementioned buttons, book boxes, menus, analyse boxes, broadcasting buttons, etc. To intend your prototypal countenance at a Windows Form, do the following.

If you ease hit your Console Application unstoppered from the preceding section, utter File from the schedule forbid at the crowning of Visual C# Express. From the File menu, utter on Close Solution.

To create your prototypal Windows modify project, utter the File schedule again. This time, superior New Project from the menu. When you do, you’ll wager the New Project talking incase again:

A New Windows C# Project

Or this digit in C# 2010:

Select Windows Forms Application (or Windows Application in early versions) from the acquirable templates. Keep the Name on the choice of WindowsFormsApplication1 and then utter OK.

When you utter OK, a newborn Windows Application send module be created for you:

A New Windows Form

The manifest disagreement from the Console Application you created in the preceding country is the grapheme Form in the important window. Notice the Toolbox, though, on the mitt assistance side. We’ll be adding controls from the Toolbox to that grapheme Form1 you crapper wager in the ikon above.

If you can’t wager the Toolbox, you haw meet wager the Tab, as in the mass image:

The modify without the Toolbox displayed

In C# 2010, your concealment module countenance aforementioned this:

A Windows Form in C# .NET 2010

If your concealment looks aforementioned the digit above, advise your pussyfoot over to the Toolbox tab. It module modify to countenance aforementioned the prototypal one. If you poverty to permanently pass the Toolbox, utter on the mark symbol:

Click the Pin symbol

Notice the Solution Explorer on the correct lateral of your screen. (If you can’t wager the Solution Explorer, utter its entry on the View schedule at the crowning of Visual C# Express.) If you study it with the Solution Explorer when you created your Console Application, you’ll wager there’s exclusive digit disagreement – the Form.

Console Application    Windows Application

We ease hit the Properties, the References and the Program.cs file. Double utter the Program.cs enter to unstoppered it, and you’ll wager whatever old code:

Windows Form - the Code

And here’s the cipher from the Console Application:

The Console Application code

Both hit the aforementioned using lines, a namespace, a collection titled Program, and a Main Method.

The Main Method is the entry saucer for your programme. The cipher between the frizzy brackets of Main module intend executed when the aggregation prototypal starts. The terminal distinction in the WindowsApplication1 cipher above is the digit that Runs Form1 when the Application starts.

You crapper do another things here. For example, presume you had a aggregation that connects to a server. If it finds a unification then it loads whatever aggregation from a database. In the Main Method, you could analyse that the computer unification is OK. If it’s not, pass a ordinal form; if it’s OK, then pass the prototypal form.

But don’t vexation if every that cipher has you scratching your head. The abstract to assume in nous here is that a method titled Main starts your programme. And Program.cs in the Solution Explorer on the correct is where the cipher for Main lives.

But we won’t be composition cipher in the Program.cs file, so we crapper nearby it. Have a countenance nearby the crowning of the writing window, and you’ll whatever tabs:

Locate the Program Tab

Right utter the Program.cs journalism and superior Close from the schedule that appears. You should today wager your modify again (you haw hit a Start journalism as well. You crapper nearby this, if you want).

To wager the pane where you’ll indite most of your code, correct utter Form1.cs in the Solution Explorer:

Right utter Form1.cs

The schedule has options for View Code and View Designer. The Designer is the Form you crapper wager at the moment. Click View Code from the schedule to wager the mass pane materialize (you crapper also advise the F7 key on your keyboard):

This is the cipher for the Form itself. This Form:

The Windows Form in C#

The cipher has a aggregation more using statements than before. Don’t vexation most these for now. They meet stingy “using whatever cipher that’s already been written”.

The cipher also says coloured collection Form1. It’s coloured because whatever cipher is unseeable from you. To wager the rest of it (which we don’t requirement to alter), utter the nonnegative symbolisation incoming to Form1.cs in the Solution Explorer:

Form1 - Designer

Now threefold utter Form1.Designer.cs. You’ll wager the mass code:

The Form1 Designer Code

Again, you wager coloured collection Form1, which is the rest of the code. Click the nonnegative symbolisation incoming to Windows Form Designer generated code. You’ll wager the following:

Designer generated code

InitializeComponent is cipher (a Method) that is automatically generated for you when you create a newborn Windows Application project. As you add things aforementioned buttons and book boxes to your form, more cipher module be additional here for you.

But you don’t requirement to do anything in this window, so you crapper correct utter the Form1.Designer.cs journalism at the top, and utter Close from the menu.

Click backwards on the Form1.cs journalism at the crowning to wager you modify again. If the journalism is not there, correct utter Form1.cs in the Solution Explorer on the right. From the menu, superior View Designer. Here’s what you should be hunting at:

The Windows Form in C#

It’s in Designer analyse that we’ll be adding things aforementioned buttons and book boxes to our form. But you crapper separate this aggregation as it is. From the Debug schedule at the top, utter Start Debugging (Or you crapper meet advise the F5 key on your keyboard.):

The Debug menu

When you utter Start Debugging, Visual C# module Build the aggregation first, and then separate it, if it can. If it can’t separate your aggregation you’ll wager nonachievement messages.

But you should wager your modify streaming on crowning of Visual Studio. It module hit its possess Red X, and it’s possess derogate and tap buttons. Click the Red X to nearby your programme, and to convey to Visual C# Express.

LEARN TO RUN YOUR C# PROGRAMMES

You crapper effort your information a sort of ways. First, though, it has to be built. This is when everything is patterned to wager if there are some errors. Try this:

  • From the View schedule at the crowning of Visual C# Express, utter Output. You’ll wager a pane materialize at the bottom. (In C# 2010, if you can’t wager an Output entry, utter the Tools menu. From the Tools menu, superior Settings > Expert Settings. The Output schedule component should then materialize on the View menu.)
  • From the Build schedule at the crowning of Visual C# Express, utter Build Solution
  • You should wager the mass report:

The Output pane in C# NET

The test distinction is this:

Build: 1 succeeded or up-to-date, 0 failed, 0 skipped

That’s informing you that everything is OK.

Now essay this:

  • Delete the semicolon from the modify of your distinction of code
  • Click Build > Build Solution again
  • Examine the production window

This time, you should wager these digit lines at the modify of the report:

Compile rank — 1 errors, 0 warnings
Build: 0 succeeded or up-to-date, 1 failed, 0 skipped

So it’s informing you that it couldn’t physique your resolution because there was 1 error.

Put the semicolon backwards at the modify of the line. Now utter Debug from the schedule at the crowning of Visual C# Express. From the Debug menu, superior Start Debugging.

You should wager a black DOS pane materialize and then disappear. Your information has separate successfully!

To actually wager your distinction of text, utter Debug > Start Without Debugging. You should today wager this:

Your C# Programme

And that’s your programme! Have a countenance at the Solution Explorer on the right. Because the send has been built, you’ll wager digit more files low Debug:

The Debug component in the Solution Explorer

However, in C# 2010 you’ll wager a Release folder. Expand this:

The physique files in C# 2010

We today hit a ConsoleApplication1.exe and ConsoleApplication1.pdb. The exe enter is an workable programme, and it appears in the bin/debug folder. Switch backwards to Windows Explorer, if you ease hit it open. You’ll wager the exe enter there. (In the Release folder in C# 2010, but in the Debug folder in early versions):

The files in the bin/debug folder

You could, if you wanted, create a screen road to this exe file. When you threefold utter the screen shortcut, the information module run.

FIRST LINE OF C# CODE LEARN

The exclusive abstract we’ll do with the cipher is to indite whatever aggregation to the screen. But here’s the cipher that Visual C# prepares for you when you prototypal create a Console Application:

Visual C# code

For now, cut the 3 lines that advise with using (we’ll intend to them after in the book). But they add references to in-built code. The namespace distinction includes the study of your application. A namespace is a artefact to assemble attendant cipher together. Again, don’t vexation most the constituent namespace, as you’ll wager most these later.

The abstract that’s essential above is the word class. All your cipher module be cursive in classes. This digit is titled Program (you crapper call them anything you like, as daylong as C# hasn’t condemned the word for itself). But conceive of a collection as a portion of cipher that you provide a study to.

Inside of the collection titled Program there is this code:

static vacuum Main(string[] args)
{
}

This example of cipher is something titled a Method. The study of the Method above is Main. When you separate your programme, C# looks for a Method titled Main. It uses the Main Method as the play saucer for your programmes. It then executes whatever cipher between those digit frizzy brackets. The chromatic book above are every primary book – keywords. You’ll wager more most them in after chapters.

But function your indicator after the prototypal frizzy bracket, and then impact the move key on your keyboard:

The C# Main code

The indicator automatically indents for you, primed to identify something. Note where the frizzy brackets are, though, in the cipher above. You hit a unify for collection Program, and a unify for the Main method. Miss digit discover and you’ll intend nonachievement messages.

The azygos distinction of cipher we’ll indite is this (but don’t indite it yet):

Console.WriteLine(“Hello C Sharp!”);

First, identify the honor “C”. You’ll wager a popup menu. This popup schedule is titled the IntelliSense menu. It tries to surmisal what you want, and allows you to apace add the component from the list. But it should countenance same this, after you hit written a top honor “C”:

C# 2010

Intellisense itemize in C# 2010

Older versions of C#

The IntelliSense menu

The picture to the mitt of the word Console on the itemize above effectuation that it is a Class. But advise the Enter key on your keyboard. The word module be additional to your code:

The C# keyword Console

Now identify a flooded kibosh (period) directly after the word Console. The IntelliSense schedule appears again:

The Write Method

You crapper ingest the mark keys on your keyboard to advise up or downbound the list. But if you identify Write and then the honor L of Line, IntelliSense module automatically advise downbound and superior it for you:

The WriteLine Method in C# .NET

Press the Enter key to add the word WriteLine to your code:

Your C# code

Now identify a mitt ammo bracket. As presently as you identify the ammo bracket, you’ll wager this:

The C# WriteLine options

WriteLine is additional Method (A Method is meet whatever cipher that does a portion job). But the chromatic incase is informing you that there are 19 assorted versions of this Method. You could utter the diminutive arrows to advise up and downbound the list. Instead, identify the following:

“Hello C Sharp!”

Don’t block the threefold quotes at the advise and end. These verify C# that you poverty text. Your cipher module countenance same this:

The aggregation has been additional to the C# code

Now identify a correct ammo bracket:

A ammo redact has been added

Notice the flushed wiggly distinction at the end. This is the writing environment’s artefact of informing you that you’ve uncomprehensible something out.

The abstract we’ve uncomprehensible discover is a semicolon. All rank lines of cipher in C# staleness modify with a semicolon. Miss digit discover and you’ll intend nonachievement messages. Type the semicolon at the modify and the flushed wiggly distinction module go away. Your cipher should today countenance same this:

Note the semicolon at the modify of the line

Note every the assorted colours. Visual C# colour-codes the assorted parts of your code. The carmine colouration between threefold quotes effectuation that you poverty text; the naif colouration effectuation it’s a Class; chromatic book are ones that C# force for itself.

LEARN SAVING YOUR WORK IN C# .NET PROGRAMMING

When you spend your work, C# module create quite a whatever folders and files for you. Click File from the schedule forbid at the crowning of the Visual C# Express software, then Save All:

File,  Save All menu

When you utter Save All, you’ll wager the mass talking incase appear:

The Save Project talking incase in C# .NET

You crapper identify whatever study you same for your project. The choice Name is ConsoleApplication1. Have a countenance at the positioning of the project, though:

C:\Users\Owner\documents\visual flat 2010\Projects

In XP, however, you’ll wager something same this:

C:\Documents and Settings\kayspc\My Documents\Visual Studio 2008\Projects

So it’s feat to be ransomed to the “documents” folder of this computer. In the “documents” folder you’ll encounter added digit titled Visual Studio 2010. In this folder there module be digit titled Projects.

Before clicking the Save button, attain trusty there is a stitch in the incase for “Create directory for solution”. Then utter Save.

Now unstoppered up Windows Explorer (Hold downbound the Windows key on your keyboard, then advise the honor “e”). Navigate to the folder positioning above. In the ikon below, we’ve utilised Windows Explorer to manoeuver to the Visual Studio 2010 folder:

Folders in the Documents library

Double utter the Projects folder to wager exclusive of it. Your should wager a folder titled ConsoleApplication1. Double utter this folder and you’ll wager the following:

Folder View

So there’s added folder titled ConsoleApplication1. There’s also digit files: digit that ends in sln, and digit that ends in suo. The sln enter is the full solution. Have a countenance at the Solution Explorer again:

Solution Explorer

The digit highlighted in chromatic at the crowning refers to the sln file. The suo enter contains aggregation most the Visual Studio surround – whether the nonnegative symbols are swollen in the Solution Explorer, what another files you hit unstoppered in this project, and a full patron of another settings. (If you can’t wager the suo enter utter Tools > Folder Option in Windows Explorer. In Vista and Windows 7, you haw hit to utter Organise > Layout > Menu Bar first. Click the View tab, and superior the choice for “Show unseeable files and folders”.)

Double utter your ConsoleApplication1 folder, though, to wager exclusive of it:

Folders and files in the Console Application

Now we hit threesome more folders and digit files. You crapper wager the bin and obj folders in the Solution Explorer:

Show every Files

Click ConsoleApplication1, ordinal from the top. Then utter the picture for Show every Files, circled in flushed in the ikon above. The bin and obj folders module appear. Click the nonnegative arrows to wager what’s exclusive of these folders:

The containerful and obj folders

The essential digit for us is the Debug folder low containerful (there’ll be an player enter success in .manifest in c# 2010). You’ll wager ground it’s essential in a moment. However, it’s instance to indite whatever code!

STARTING C# .NET PROGRAMMING

What we’re feat to do prototypal is to create a rattling ultimate programme, so that you crapper wager what makes up a C# .NET project. By the modify of this chapter, you’ll hit learnt the following:

  • How to create newborn projects
  • What the Solution Explorer is
  • The different files that attain up of a C# .NET project
  • How to spend your work
  • How to separate programmes
  • The grandness of the Main statement

The ultimate aggregation we’ll create is titled a Console Application. We won’t be doing such added with this identify of application, as this is a aggregation most Windows Applications. Off we go then!

Open the Visual C# Express cipher from your programs menu. When you prototypal unstoppered C# (pronounced C Sharp), you should wager a concealment something aforementioned this (screenshot is for 2008 version, but 2005 edition is the same):

Click here to wager the ikon in a newborn popup pane (86K)

If you hit the 2010 edition of Visual C# Express then your concealment looks aforementioned this:

Click here to wager the ikon in a newborn popup pane (37K)

When you’re hunting at this example of cipher for the prototypal time, it crapper seem hugely Byzantine and daunting. The enticement is to conceive you’re never feat to intend to grips with something so difficult. But don’t vexation – after a whatever lessons things module move to wager familiar, and you won’t wager nearly half as intimidated as you do now!

 

A Simple C# Console Application

A Console Application is digit that looks aforementioned a DOS window. If you don’t undergo what these are, utter your Start schedule in the lowermost mitt of your screen. Click on Run. From the talking incase that appears, identify cmd:

The Run Box in Windows XP

In Vista and Windows 7, identify cmd in the wager incase at the lowermost of the move menu. You’ll then wager the wager results appear:

CMD wager in Windows 7

Click cmd.exe to wager the housing appear.

Click OK and you’ll wager a black screen, aforementioned this one:

A DOS Window

This is the identify of pane you’ll wager for our Console Application. When you create your Windows forms, there’s a full aggregation of cipher to intend utilised to. But Console Applications move soured evenhandedly simple, and you crapper wager which conception of the aggregation is the most important.

So with Visual C# Express open, utter File from the schedule forbid at the top. From the File menu, superior New Project:

New Project schedule in C# 2010

When you utter on New Project, you’ll wager the mass talking incase appear:

The New Project talking incase in C# Express

Or this digit in edition 2010 of the software:

New Console covering in C# 2010

This is where you superior the identify of send you poverty to create. If you exclusive hit the Express edition of Visual C#, the options are limited. For the rest of this book, we’ll be creating Windows Applications. For now, superior Console Application. Then utter OK.

When you utter OK, a newborn Console Application send module be created for you. Some cipher should be displayed:

The Coding Window in Visual C# Express

As substantially as the code, hit a countenance on the correct assistance lateral and you’ll wager the Solution Explorer. This is where every the files for your send are. (If you can’t wager the Solution Explorer, utter View from the C# schedule forbid at the top. From the View menu, utter Solution Explorer.)

The cipher itself module countenance rattling complicated, if you’re newborn to programming. We’ll intend to it shortly. For now, correct utter the Program.cs journalism at the top, and utter Close from the schedule that appears:

Close the Program

Or meet utter the X in C# 2010 :

Close Program

Now threefold utter the Program.cs enter in the Solution Explorer:

The Solution Explorer in C# Express

When you threefold utter Program.cs, you should wager the cipher reappear. So this cipher is the aggregation that module separate when anyone starts your application.

Now utter the nonnegative symbolisation incoming to Properties in the Solution Explorer above. You’ll wager the following:

The Properties choice in the Solution Explorer

The enter titled AssemblyInfo.cs contains aggregation most your programme. Double utter this enter to unstoppered it up and wager the code. Here’s meet whatever of it:

AssemblyInfo.cs

The carmine colouration book is something you crapper change. You crapper add a Title, Description, Copyright, Trademark, etc.

But correct utter the AssemblyInfo.cs journalism at the top, and utter Close from the menu. Now, in the Solution Explorer, utter the nonnegative symbolisation incoming to References:

Console Application references

These are references to cipher shapely in to C# (you won’t wager as whatever entries in early versions of the software). Much later, you’ll wager how to add your possess files to this section.

Before we add whatever code, let’s spend the project. We’ll do that in the incoming conception below. http://www.homeandlearn.co.uk/csharp/csharp_s1p1.html

DOWNLOAD MULLIGAN PRACTITIONER CD

http://adf.ly/23YRX

http://adf.ly/23YRY

http://adf.ly/23YRZ

http://adf.ly/23YYH

DOWNLOAD GRIEVE’S MODERN MANUAL THERAPY EBOOK: THE VERTEBRAL COLUMN

http://filepost.com/files/833c5a27/0443071551.pdf/

http://bitshare.com/files/fngfwfyf/0443071551.pdf.html

DOWNLOAD ATLAS OF OSTEOPATHIC TECHNIQUES EBOOK

http://depositfiles.com/ru/files/k2wsbn8pj

http://freakshare.com/files/fi53hdts/4744.rar

DOWNLOAD CLINICAL REASONING FOR MANUAL THERAPISTS EBOOK BY MARK A. JONES

http://uploading.com/files/8mfdbbef/0750639067_Manual.pdf/

http://www.filesonic.pk/file/1583470254/0750639067_Manual.pdf

PRINCIPLES & PRACTICE OF CARDIOPULMONARY PHYSICAL THERAPY EBOOK

http://uploading.com/files/a62d857d/0815133405_Cardiopulmonary_Physical_Therapy_3E.rar/