Results 1 to 5 of 5

Thread: event handler in designer code?

  1. #1
    MindGame3713 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0
    Join Date
    Feb 2011
    Posts
    2
    Reputation
    0

    event handler in designer code?

    I am using Visual Studio 2010 making simple programs for a class I have. I am trying to start a new project but am having some trouble. I have the design aspect of the project completed but now when I click on a control in order to start writing the proceedures it keeps displaying the sub class in the designer tab where the basic code for the controls and form is instead of in the form1.vb tab where it has been when I previously have used the program. How do I fix this? Sorry if this is in the wrong place or if the way I explained it is confusing. I am very new to the laguage and the program.

  2. #2
    jmcilhinney's Avatar
    jmcilhinney is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    11,339
    Reputation
    1543
    Can you attach a screen shot? What you're saying doesn't seem to make sense. It sounds like maybe you've created a WPF project, which displays the designer and XAML code in a split window, but it should still take you to the user code file when you double-click a control.

  3. #3
    MindGame3713 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0
    Join Date
    Feb 2011
    Posts
    2
    Reputation
    0
    I attached a screen shot. Number 1 is where the code is going when a control is clicked and number 2 is the tab where it usually goes when i have worked on other projects
    Attached Images Attached Images

  4. #4
    jmcilhinney's Avatar
    jmcilhinney is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    11,339
    Reputation
    1543
    I see. So your event handlers are being added to the designer code file rather than the user code file. That does seem odd. If you add another form to the same project, does the same thing happen? If not then I'd suggest copying and pasting all your controls to that new form and then deleting the old one. If another form behaves the same way, what about another project?

  5. #5
    frazzle is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.0
    Join Date
    Feb 2011
    Location
    Cape Coral Fl
    Posts
    6
    Reputation
    0
    I had this happen to me. I closed vs then reopened it. np

Bookmarks

Posting Permissions

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