Just a shot in the dark--I haven't used HScroll--but what if you disable it
in the Paint event? After a resize, the control is invalidated and painted,
and it may be getting enabled sometime during the paint.

Signature
Brian Schwartz
FishNet Components
http://www.fishnetcomponents.com
Fish Grid .NET Light: Powerful Layouts for Small Datasets
>I have a user control that needs to allow vertical scrolling but not
> horizontal scrolling. In the user control's resize event, I need to
[quoted text clipped - 9 lines]
>
> Any ideas on how to get this to work?
Brian Schwartz - 10 May 2007 00:15 GMT
Or, as Peter Duniho has pointed out, you might want to override OnPaint to
accomplish this, rather than attaching to the event, depending on your
situation.

Signature
Brian Schwartz
FishNet Components
http://www.fishnetcomponents.com
Fish Grid .NET Light: Powerful Layouts for Small Datasets
> Just a shot in the dark--I haven't used HScroll--but what if you disable
> it in the Paint event? After a resize, the control is invalidated and
[quoted text clipped - 13 lines]
>>
>> Any ideas on how to get this to work?
j0rd4n - 10 May 2007 19:00 GMT
Unfortunately this didn't work quite like I had hoped. It worked in
some cases but not others. For instance, if the application starts up
maximized but the control needs scrollbars, and then it is restored to
its non-maximized size, the horizontal scrollbar appears.
Any other ideas? I tried using the Win32 ShowScrollBar method to
disable the horizontal scrollbar but this just hide it (didn't
actually affect the horizontal sizing of the form).
On May 9, 4:02 pm, "Brian Schwartz" <o...@fishnetcomponentswos.com>
wrote:
> Just a shot in the dark--I haven't used HScroll--but what if you disable it
> in the Paint event? After a resize, the control is invalidated and painted,
[quoted text clipped - 18 lines]
>
> > Any ideas on how to get this to work?