toolbar separator causes System.OutOfMemoryException

A

ari

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.OutOfMemoryException 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
 
S

ShaneO

ari said:
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.OutOfMemoryException 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
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.
 
A

ari

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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top