Register for your free account! | Forgot your password?

Go Back   elitepvpers > Off-Topics > Tutorials
You last visited: Today at 16:32

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Lesson1 - How to make your first c# programe

Discussion on Lesson1 - How to make your first c# programe within the Tutorials forum part of the Off-Topics category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2007
Posts: 47
Received Thanks: 16
Lesson1 - How to make your first c# programe

hi

i have decided to do a toturial every week on step to step guide on using c# to the fullest im aiming to get whoever reads my toturials to stage where he can atleast code his own small project on w/e he wishes but im gana go from the real basics to the expert lvl i hope u guys enjoy it.

today i will be showing you how to make a C# programe very very basic
this will give you a genral idea on some of the stuff on c# this is what you will be needing.

you will need following :-

a computer :P
Windows XP
Visual C # ( i am using 2005 i prefer it but u can choose a updated version
if you choose to)

if you have this YOU ARE READY !

lets begin

Step One

open up you Visual c# programe there should be a start page, click on
File and then New Project.. in Name: type Hello World this is our projects name and click on the Windows Application once you have done this sucesfully please click Ok and it will create your form.

Step Two

You will have a Form1 as you can see and right next to it is a tab called
ToolBox. toolbox has all the neceserry buttons, text boxes ect you will be using this in your application in the future and is a big Help.

but for know we will only useing the AB button click and drag this on to your Form1 anywhere is OK just dont place it outside of you form.

you will see know once you let go that a button has been placed you can change the buttons name buttons name and properties but for now i wont tell that maybe in future totrials.

Step Three

go ahead and double click the Button automatically you will see a code interface pops up this is where you will be spending most your time when u code your own software or programs you can switch between the Disgin view and Form1.cs * view on the tabs above i presume they will not be hard to find :P.

Step Four

know for the fun bit when you click on your button a code interface appears you will se somthing like this :-

namespace HelloWorld
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
THIS IS WHERE YOU WILL RIGHT YOUR CODE
}
}
}


looks complicating? dont worry later on will get much easier we will be righting 1 code line in between the curley braces where i have high lighted
what are the curley braces you might ask? {} <<-- they are just to make life easier in between is where you right ur code this is called a code block i would like you to use that termnolgy atm beocoues it will be used in future purposes i dont want you to get confused if you dont right in between them curley braces your code will be invalid and you program wont work

you might ask

private void button1_Click(object sender, EventArgs e)

why dosnt this code be in between the curley braces this is a event handler when you double clicked the button c# IDE - intractive develpmont enviroment automatically added a event ill explain in later toturials what a IDE is so dont worry about it.

to get back on to the point a event handler never bees in between your code line.

Step Five

right know to right the code, where i stated i want you to write the following i would prefrer you dont copy and past coz wont be practical and this will stik in your memory better

MessageBox.Show("HelloWorld");

Please follow my toturial and do this....

i will know explain in detail what this code means for the people who dont realy understand...

Messagebox.Show - what this does is once you click your button it will make another little screen that will have your message in it.

(" ") - this brackets are to break your code up and the " " are very imprtant this will be used in the future what they do is tell c# a message is gana be written. if u are gaan write a message it must always start and end with a semi colon "".

; - lastly this is a very imortant code all your codes WILL END WITH THIS; if not you programme will never run it just breaks up a 1 code line to another one. and is very imortant.

Step Six

right so know our code is written go back to your design view, we will test our programme know in debugg view please press F5 on your keyboard and c# will start processing what you write once your the programme appears click your Button1 and a Hello World message will appear



Congraulation you have made your first c# programme

this toutrial was amied for NEWLY bigginers in c# Hope you Enjoyed it Please check regulary i will be making a 2nd toturial on Lesson 2 i will be explanning about IDE and how to change properties of your form buttons and start introducing new toolbars and start getting you more familier in the controls.



if you want to ask questions i am willing to answer them so dont hasitate
Thx for reading.

InsaneCoder
InsaneCoder is offline  
Thanks
4 Users
Old 10/02/2007, 20:17   #2
 
elite*gold: 0
Join Date: Jun 2007
Posts: 43
Received Thanks: 8
where do you get visual c#?
shadycharacter is offline  
Old 10/02/2007, 21:18   #3
 
elite*gold: 0
Join Date: Sep 2007
Posts: 47
Received Thanks: 16
you can search it in google visual c# download and there loads of places u can download it
InsaneCoder is offline  
Thanks
1 User
Old 10/07/2007, 21:22   #4
 
elite*gold: 0
Join Date: Aug 2006
Posts: 147
Received Thanks: 360
thanks for tutorial i'm waiting second part
darkirax is offline  
Old 10/07/2007, 23:40   #5
 
bawynne90's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 16
Received Thanks: 0
great :]

cool now can you make a tut for checkboxes and other examples
make a autoclicker example
checkbox example
and etc.
good tut keep making em
bawynne90 is offline  
Old 10/08/2007, 10:43   #6
 
elite*gold: 0
Join Date: Sep 2007
Posts: 47
Received Thanks: 16
sure i could do that but first we must learn variables, expersions and statments next lesson will be more about IDE and getting to know the enviroment u will be using to code in. im doing this because later as we progress through the totrials some people might know understand a certin aspect of the program i am talking about if i explain it ealier they can refrence to it will make eveyones life much easier.

and to answer shadycharcter here is the link for 2005 c# programme there is a new updated version c# 2007 but i dont reccomend u use it since its still in beta links below enjoy



insaneCoder
InsaneCoder is offline  
Thanks
1 User
Old 10/09/2007, 01:18   #7
 
bawynne90's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 16
Received Thanks: 0
:D

if you dont mind can you explain variables, expersions and statments
and how to use them plz?
bawynne90 is offline  
Old 10/10/2007, 17:16   #8
 
elite*gold: 0
Join Date: Sep 2007
Posts: 47
Received Thanks: 16
yes i will be the new tut is comming up soon im just finishing it off on IDE i need exlain this first about lesson 3 - 4 will be about variables expressions , and statments
InsaneCoder is offline  
Old 10/10/2007, 17:59   #9
 
elite*gold: 20
Join Date: Dec 2006
Posts: 839
Received Thanks: 91
An alle, die ernsthaft C# lernen wollen: Kauft euch ein Buch oder lest die Hilfe im MSDN durch - dieses Tutorial ist nicht unbedingt der Hammer und ich meine sogar, es schonmal gesehen zu haben - nur mit weniger Rechtschreibfehlern.
Assass1n is offline  
Old 10/12/2007, 06:47   #10
 
elite*gold: 0
Join Date: Oct 2007
Posts: 3
Received Thanks: 0
is there any way i can open an exe/program that has been made by this i have a program made by this but cant open it as its an exe :S (sorry if thats a newb question but i aint got a clue lol)
GohanWarrior is offline  
Old 10/17/2007, 16:12   #11
 
elite*gold: 0
Join Date: Sep 2007
Posts: 47
Received Thanks: 16
serach this in help on c# it tells u how to compile all the files so
it`s a exe.
InsaneCoder is offline  
Reply


Similar Threads Similar Threads
I Need Help_How can get all programe for make new item and add to navicat?
08/07/2010 - CO2 Weapon, Armor, Effects & Interface edits - 1 Replies
I Need Help_How can get all programe for make new item and add to navicat? pel...i need now i need get yahoo exprince my yahoo is ssll32
Nice Little programe i found
07/19/2010 - EO PServer Hosting - 5 Replies
010 Editor - The Professional Text/Hex Editor with Binary Templates scoop it out
I am looking for a programe
11/13/2009 - Silkroad Online - 2 Replies
YoYo Guys I am Looking for the last edited Media PK2 Can someone here gemme the link to download it on condition that it's not affected or containing any virus Thank you :)
Lesson1 - How to make your first c# programe
11/06/2008 - Coding Tutorials - 8 Replies
hi today i will be showing you how to make a C# programe veyr very basic this will give you a genrale idea on some of the stuff on c# this is what you will be needing. you will need following :- a computer :P Windows XP Visual C # ( i am using 2005 i prefer it but u can choose a updated version
I HAVE THE PROGRAME TBOT BUT ...WHAT NEXT?
12/02/2007 - Silkroad Online - 1 Replies
Hi everyone. I want to use the programe tbot (and i have it) but what should i do next?:confused: Some friends have told me that i have to use " loopback". IF i have to use loopback how is it supposed to be? Can someone explain me how all the proccess to start botting? Thank you :)



All times are GMT +1. The time now is 16:32.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.