toolbar separator causes System.OutOfMemoryException

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ari

    #1

    toolbar separator causes System.OutOfMemoryException

    I have a small form that comprises a toolbar, a treeview and a status
    bar.

    Everything was working fine until I decided to add a new button to the
    toolbar - and I decided for appearances sake to add a separator button
    to distance the new button from the old ones. When I do "show" on the
    form (which is an mdi-child) I get the following exception:

    System.OutOfMem oryException occurred in system.windows. forms.dll

    Additional Information: Error Creating Windows Handle

    When I delete the separator, everything works fine again. If I change
    the separator into a regular button, it works fine.

    Anyone encountered a problem like this? Anyone have any ideas?

    I am using framework version 1.1.4322 and visual studio version (2003)
    7.1.3088

  • ShaneO

    #2
    Re: toolbar separator causes System.OutOfMem oryException

    ari wrote:[color=blue]
    > I have a small form that comprises a toolbar, a treeview and a status
    > bar.
    >
    > Everything was working fine until I decided to add a new button to the
    > toolbar - and I decided for appearances sake to add a separator button
    > to distance the new button from the old ones. When I do "show" on the
    > form (which is an mdi-child) I get the following exception:
    >
    > System.OutOfMem oryException occurred in system.windows. forms.dll
    >
    > Additional Information: Error Creating Windows Handle
    >
    > When I delete the separator, everything works fine again. If I change
    > the separator into a regular button, it works fine.
    >
    > Anyone encountered a problem like this? Anyone have any ideas?
    >
    > I am using framework version 1.1.4322 and visual studio version (2003)
    > 7.1.3088
    >[/color]
    I've had similar experiences with VS2005 under Framework 2.0 except all
    my ToolStrip Controls would simply disappear from the ToolStrip and the
    only way I could get them back was to revert to an earlier version of
    the application!

    In my case, it appeared to be caused by a combination of setting
    AutoSize=False and adding enough Controls to cause the ToolStrip to
    trigger the Overflow Menu.

    I overcame it by reducing the Width of individual Controls on the ToolStrip.

    Hope this might help you.

    ShaneO

    There are 10 kinds of people - Those who understand Binary and those who
    don't.

    Comment

    • ari

      #3
      Re: toolbar separator causes System.OutOfMem oryException

      Thanks Shane - I don't think this is the case: I only have four buttons
      on the toolbar, and I wanted to add a separator and one more button....

      Comment

      Working...