+ Post New Thread
Results 1 to 6 of 6
Coding Thread, c# help in Coding and Web Development; Hi, I am making an application in c# but need help as I want it so when a user clicks ...
  1. #1
    My220x's Avatar
    Join Date
    Feb 2008
    Location
    UK
    Posts
    257
    Thank Post
    9
    Thanked 3 Times in 3 Posts
    Blog Entries
    8
    Rep Power
    14

    c# help

    Hi,

    I am making an application in c# but need help as I want it so when a user clicks on a button a new form popups. Can anyone point me in the right direction?

  2. #2

    Join Date
    Oct 2007
    Posts
    10
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi,

    If you second form is called Form2 you can simply call the following code inside your buttons onclick event function:

    Form2 newform = new Form2();
    newform.Show();

  3. #3
    bizzel's Avatar
    Join Date
    Jul 2007
    Location
    Cambridge
    Posts
    654
    Thank Post
    102
    Thanked 204 Times in 72 Posts
    Rep Power
    51
    Quote Originally Posted by jasonyates View Post
    Hi,

    If you second form is called Form2 you can simply call the following code inside your buttons onclick event function:

    Form2 newform = new Form2();
    newform.Show();
    Yep. This is right but make sure that Form2 is actually the name of the second form in the designer. What software are you using to program in?

  4. #4

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    Need to get back into C# - got a few prog's in mind
    An ICT Admin's Log for password resets, etc

  5. #5
    bizzel's Avatar
    Join Date
    Jul 2007
    Location
    Cambridge
    Posts
    654
    Thank Post
    102
    Thanked 204 Times in 72 Posts
    Rep Power
    51
    The more I use it, the more I realise what a great language it is - very much like Java but with a great IDE and a lot of the minor hassles sorted out.

  6. #6

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    I use Visual Studio for my apps - just about to start using 2008 version.

SHARE:
+ Post New Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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