Complete Newbie Questions
Hey Everyone,
Ok, firstly let me apologise for my complete newbie questions as this is day 1: of me trying to learn visual C#. So if I post some pretty silly questions now and then you will no why :)
Ok, i've read some books on C# and i'm starting to read code and just looking at the basics etc. The one thing I am seemingly having a little trouble with is the Object Orientated side of things. I havent programmed for MANY MANY years and last time it was int he days of GWBasic and quickbasic lol. So it's taking me a bit to get my head around the more event driven side of things. Ultimately I am having a little trouble with the actualy graphical side of things with linking forms and setting visual C# up etc.
So first quickie question, how does one link between forms in C# Express. Say I start with the standard windows form application and then use the add item and add another form how do I set say an event on the first form to open the second form.
I understand that I would say add a button and then bring up the code window for that button and add the code for the event but what is the specific syntax and what would i place for say Form1 to open Form2 whilst hiding itself etc.
Also, how scaleable is C#. I've spoken to a few people and they keep telling me to not bother and jsut learn C++ as its the most used language these days. I take it though that pretty much for a newbie there isnt much that I would be doing in C++ that I couldnt do in C# given my lack of skills at this stage.
Would appreciate any help
Cheers
C# is awesome, strong, powerful or should I say - .NET is strong, powerful, amazing, beautiful. It's a developers heaven.
.NET has been around for almost 4-5 years now and its taken the world by storm - I don't care what anyone says.
Microsoft themselves develop projects on the .NET platform.
.NET has been included Windows Server 2003 itself as well as in Windows Vista (.NET 3.0) and will be as standard on the future MS OS's
.NET is the way to go, its managed (most of it if not all) and is easier to understand than C++
You can do everything in .NET:
From simple applications to Webservices and Web development on the .NET Framework.
From client products to Server products, xml integration and using SQL Server - all within the framework, the list goes on my friend.
.NET is now industry standard and as for the language itself, C# is industry standard HOWEVER there maybe some arguments that VB.NET is, but whichever it is, the point is - .NET is the framework which you can mix and match languages with (so you can have a project which has C# and VB.NET code but all using the same framework)
As for your first question...
//this is form 1 code. Lets place it in a button.
| |
.. Form2 theForm = new Form2(this); theForm.ShowDialog(); //ShowDialog will only allow the user to use the form (form2) until they close it, any forms behind it (such as this form, form1) will not be usable until they close that form. //form 2: .. private Form1 theFirstForm; public class Form2(Form1 firstForm) { this.theFirstForm = firstForm; ... }
|
does this make sense?
Thats perfect. Yup that certainly makes sense now. It just takes a while to get my head around teh syntax and jargon.
By the sound of it .NET is pretty awesome. I'm sure as I start getting a bit more familiar with visual C# that I'll start picking up on the differences between the languages but from just a few of the points youve made so far it sounds like a programmers wet dream lol :)
Anyway, again thanks for th code explanation.
cheers
no worries, I'm glad I could help.
Yes it will be hard to start with BUT after a while, experimenting, reading resources and asking questions here, you will learn alot.
Just to add...
you can also do Windows Mobile development using the .NET Compact Framework. So not only can you develop .NET apps on the PC but you can also develop it on the mobile device running Windows Mobile. How cool is that?
I think I saw one of our/Microsoft devs controlling a robot using .NET. Yes, an actual mini robot.
This is just the beginning.....
yeah i saw the template for mobile devices and thought that was pretty cool. I might write some nifty games for my PDA when i'm up to speed lol.
My first `little' project is nothing to major i'm just writing a small invoicing program for work which collects information in a invoice style tempalte and then allows you to save/change it and print it out ina nice format. So something fairly easy for me to cut my teeth on so to speak.
cheers
p.s that was cool about the robot. Starts to make me wonder about the applications of .NET framework for control of items like RC aircraft with servo's and gyroscopes on board. I wonder if you could interface it with GPS. lol hmmmm summer project lol :)