C#-APP: Getting an OutofMemory in an MDI application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • waheed azad
    New Member
    • Mar 2007
    • 5

    C#-APP: Getting an OutofMemory in an MDI application

    Hello Everybody:

    I'm having this un-usual bug in my application. The whole scenario is as follows.

    Application starts with a login form which is the main form, excuted using Application.Run () in Main function.

    If login is successfull then an MDI Form is shown. The different forms that are displayed in MDI form, some of them contain GridViewX and thin wrapper over Windows GridView, created by DevComponents in DotnetBar.

    The Scenario is that when i open the form that contains the gridview, it opens nice displaying the data selected by default. when i open another form on its show() function i get the bug.

    Now in following scenarios bug didn't appear.

    1. When the Gridview isn't set to Dock Full, there isn't any bug
    2. When no data is loaded no bug is generated.
    3. If active form isn't the form containing the grid then on bug is generated.

    Thanks for any responses in advance.
  • waheed azad
    New Member
    • Mar 2007
    • 5

    #2
    Ok, I had solved the problem. It was really difficult to figure what was happening that, in MDI container, while showing one form, the form with the gridview was redrawing itself, and causing outofMemory.

    I'd solved by enclosing the call to Show( ) in SuspendLayout and ResumeLayout of the Active MDI child.

    It works fine...

    Comment

    Working...