Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleSplitContainer control properties cause errors
Description
KeywordsSplitContainer splitter, splitter control, VB.NET, VB 2005
CategoriesControls, VB.NET
 
When Visual Basic 2005's designer-generated code creates a SplitContainer control, it sets the panel's properties before it sizes the SplitContainer. That means properties such as SplitterDistance and Panel2MinSize can lead to illegal values. Visual Basic reports an error in the property values while trying to run the load the form. It's particularly confusing because you can look at the properties in the form designer and see that they have legal values. The error also occurs in designer-generated code not your code and that code is flagged to prevent the debugger from stopping inside it.

To work around this, set properties such as Panel2MinSize in the form's Load event handler after the form has been initialized.

Copyright © 1997-2006 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated