I am using Application.EnableVisualStyles() followed by a doevents.
When the program starts, there is a treeview docked on the form that contains a scrollbar on the bottom, which should not be there (there is not enough content in the treeview to require it). Additionally, the scrollbar does not use XP styles. When the treeview is resized to a size small enough that a scrollbar becomes necessary, the scrollbar partially takes on Xp styles. When the treeview is made larger again, the scrollbar finally dissapears. After this point, the scrollbar behaves as expected, visually as well as in the fact that it is only there when necessary.
The workaround I have used in the past is to set the treeview width to 1 and then back to the original size after the form is shown. This doesn't look so great though, the form flickers for a split second when it is shown.
Does anyone know a workaround or a property that can be modified to correct behavior?
When the program starts, there is a treeview docked on the form that contains a scrollbar on the bottom, which should not be there (there is not enough content in the treeview to require it). Additionally, the scrollbar does not use XP styles. When the treeview is resized to a size small enough that a scrollbar becomes necessary, the scrollbar partially takes on Xp styles. When the treeview is made larger again, the scrollbar finally dissapears. After this point, the scrollbar behaves as expected, visually as well as in the fact that it is only there when necessary.
The workaround I have used in the past is to set the treeview width to 1 and then back to the original size after the form is shown. This doesn't look so great though, the form flickers for a split second when it is shown.
Does anyone know a workaround or a property that can be modified to correct behavior?