CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008
    Posts
    43

    open form onClick

    I created a form and added some buttons. when I click the button labeled "RESIDENTS". I want to open that form. I started this by inserting another form which is currently labeled Form2 but I changed the property under Design to "residents". I double clicked the "residents" button in Form1 and inserted this code

    Code:
     private void residentsBtn_Click(object sender, EventArgs e)
            {
                var residents = new Form2();
                residents.Show();
            }
    the error says, "type or Namespace could not be found

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,277

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured