CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Basic Visual C# question

  1. #1
    Join Date
    Sep 2009
    Posts
    1

    Basic Visual C# question

    Hi all -

    I'm relatively new to VC# and have a few questions! I'm writing a program that will do all the design of our foundations here at the engineering company that I work for. I am doing it in Visual C# for a few reasons, one of which is the nice visual interface you have to work with and how easy it is to manipulate.

    I'm still trying to get used to the way everything is set up inside the form class. As a quick explanation, the way I plan to tackle this program is like so:

    Main window -> select type of foundation to design (opens new window) -> set parameters -> design foundation -> output (new window) -> rinse and repeat

    Given the shear magnitude of the number of variable parameters there are to work with, I had the initial plan to have classes (or methods? I'm not sure of the difference here) that would handle the design of each foundation and one output class/method. But this is where I run into my dilemma.

    When a WPF application is created and the form is initialized, this is the setup (I hope this formats how I type it...):



    Using statements

    namespace
    {

    class window
    {

    window
    {
    initialize();
    }

    form load/button click/etc etc
    {

    }
    }
    }




    That's a very general layout, but I'm pretty sure the point is there. I'm not sure where to start "writing" my initial program. Also, I'm not sure where I can start putting the classes/methods to accept and store input and do the design. (Can someone explain class vs method here? I'm confused and am not sure which would be what I need to implement)

    I realize that this is a vague yet basic question to be asking, but I really appreciate the help. I have two books that I'm working to get through and understand. The problem that I'm running into is that one is all about C# and another is all about Visual C#, and for whatever reason, I never seem to understand how to work the basic structure of the program into my visual application. If there's a good and easy way to go about this, I'd love to know!

    Thanks again for the help. I look forward to getting some help so I can make some progress on this!

  2. #2
    Join Date
    Jun 2006
    Posts
    645

    Re: Basic Visual C# question

    you got a little disoriented here it seems.
    First of all the GUI is provided by win forms which form a part of .NET framework ( and not Visual C#...as u said)
    C# is just an object oriented language that takes help of .NET classes to get the work done.
    The difference is that, .NET is a framework that is compiled in to an intermediate language which is understood by many a languages that are supported by the framework say C#, VB.NET, J#, F#, C++, cobol, etc.
    Well, that brings me to your Q: Where shall you write your code...
    Ans: Well,..that depends. Have you done a bit of windows (or event-driven) programming before or u just have been doing console applications? If not then it might help to get a brief look at how things are done. If yes, then it is simple. There is a starter function in all the windows applications that show up GUI. This is similar to the main function in the console applications; except for the fact that in a gui application we do not do much in this function. There are other functions to perform an action when the user clicks a button or selects a text or clicks somewhere ......there are a thousand + actions each having a handler function called event handler and it is in these individual handlers, that u put your code (i.e. implementation logic).
    For instance, the Form_Load event in your code does have the info about the form UI when it is loaded initially, i,e, how it will look the first time it is loaded.....
    You can read more and learn pretty quickly...
    Regards,
    Bhushan

  3. #3
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,539

    Re: Basic Visual C# question

    Maybe I would have a nice starter video for you.
    But its to big for posting it here. So please send me an email and I'll sent you the file. ( Its done by me so no problems to get it for free)
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)