Results 1 to 7 of 7

Thread: [RESOLVED] Something Wierd with default Constructor.

  1. #1

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Resolved [RESOLVED] Something Wierd with default Constructor.

    I keep getting an error on the line below saying type frmAddnote has no default constructor.
    However it's just a normal for it does have a constructor and I aint deleted nowt. If I close VS then open it again the error goes and the app compiles and runs fine, it's only when I open the form in design view that the error appears again?
    VB Code:
    1. If (objAddNote Is Nothing OrElse objAddNote.IsDisposed) And (objAgent.IfrmNewCall Is Nothing OrElse objAgent.IfrmNewCall.IsDisposed) Then
    2.                 objAddNote = [U]New frmAddNote[/U]                objAddNote.Show()
    3.                 Me.btnDial.Enabled = False
    4.                 Me.btnNote.Enabled = False
    Last edited by FishGuy; Oct 28th, 2005 at 04:11 AM.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Something Wierd with default Constructor.

    Maybe if you exclude the form from the project, try to compile it, and then add the file back to the project hat might refresh some project settings or something. That's wroked for me in the past with things like resource files.
    I don't live here any more.

  3. #3

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Something Wierd with default Constructor.

    That seems to have worked, what could have caused the problem?

  4. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: [RESOLVED] Something Wierd with default Constructor.

    Hard to say really, I think that there are SOOO many settings in VS one or two have become corupt somewhere along the line. Doing the above idea must reset some defaults.

    Just a hunch really.
    I don't live here any more.

  5. #5

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: [RESOLVED] Something Wierd with default Constructor.

    ARRGHHH,

    It's done it again!

    Is it something thats happening because it is a form inherited form?

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Something Wierd with default Constructor.

    Could be. Did you create it in the first place by selecting "Add Inherited Form" rather than "Add Windows Form"?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Something Wierd with default Constructor.

    Yes why what is the difference?
    ps I inherited it from another form on purpose as they are almost identical.

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