Hi everyone!
I was a VS user, then i discovered DEV c++ and Sharpdevelop, and figured out that these IDE works much better and has all that i need, without loading extra stuff on my poor machine :)
Now the problem: i am learning c#, after learning Vb6 and C++; and with console apps i am pretty decent; but now i am starting to do windows forms....and here the problem starts!
I have no idea how the files are organized in a visual solution based on forms.... i created a new project and i have
references
assemblyinfo.cs
mainform.cs
program.cs
Is there a place where get documentation about what each one of these files does? because i am trying to figure out, and i discovered that i can put the main() directly into the mainform file, deleting program.cs
In VB i used to make a class file, stuff it with constructors, accessors and properties/methods, then call it in the main form and use it as instance or as global item that is shared by all the forms; while here, in SD (abbreviation for sharp develop), i noticed that i cannot create (or better i do not know if is possible) a file that can be compared to a class in VB (or a header file in C++).
In particular, the problem that i have is:
i have my nice form, i know how to access the various controls that i put on it, but then i need to create an object that will be used by the form to save data on it (a sort of address book), i have no idea about how to make this object available inside the handlers of the buttons (something like clicking the add button will get the text from the textboxes and send it to the method add() of my address book class); with the result that i have no idea how to call this object, since using
This
Program
Application
with the dot do not show the new item addressbook that i have created in the public constructor of the form (the function that has InitializeComponents() call inside, that in my case is called MainForm.
As you can understand (i hope that my explanation do not require to spend more than 1 minute to get what i said, otherwise i am only wasting your time), my problem is related to the total lack of knowledge of forms and how tehy works in conjunctions with classes; and i would be glad if someone can point me out to a tutorial or a bit of code that shows how the heck to use objects in forms, since seems that all teh tutorials around related to C# (and the books) are only worried to explain how the form works and how to create a calculator...but noone say how to create a calculator using an external class that get info from the form and interact with the class....and this is frustrating, since is a basic problem that sooner or later everyone must face...you can't continue forever to write in teh handler of each button the entire logic of an operation :)
Thanks a lot for your time, and thanks for making this cool IDE; my issue is with the language, not with the product ^_^