Results 1 to 3 of 3

Thread: App.config problem

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member JMvVliet's Avatar
    Join Date
    May 2001
    Location
    Papendrecht, Netherlands
    Posts
    310

    App.config problem

    Hello,

    I've got the following situation:

    I have an MDI base form. On that form, I've placed the Sandbar menu control (www.divil.co.uk, really good control, and free).

    Then, I have a form (frmInherit) with some components on it. I will not load it. Another form (frmOptions) derives from it.

    in frmInherit, I've got a local function, LoadDatabase. This function reads from the app.config file. When I run this code, nothing's wrong, and all works fine. The problem is in my designer, that's yelling every time: "An error occurred while loading the document. Fix the error and then try to load the document again. The error message says: Object reference not set to an instance of object"

    I've added the code in a Winzip file. Is there someone who would take a look at it, to show me what I'm doing wrong?

    You should take the following steps in the added code to reproduce behavior:

    -Create new form, frmOptions, that inherits from frmInherit.
    -Open designer window for frmOptions. Everything works fine.
    -Now, run the project. Immediately close the application.
    -Open designer window from frmOptions. Everything works fine.
    -Now, in the code from frmInherit, decomment the lines in LoadDatabase and WriteDatabase (first method is important).
    -Run application again, open via File --> Options the options form.
    -Close the form and the application.
    -Now try to open designer window for frmOptions. Then an error message appears.

    Looks like a bug in the .NET framework...
    Attached Files Attached Files

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