Page 1 of 1

Form Resize VB6

Posted: 28 Sep 2009, 19:24
by Mex
Hallo Timo

Do you know, is it possible in VB6 somehow to "catch" forms resize_begin and resize_end events?

Re: Form Resize VB6

Posted: 28 Sep 2009, 20:18
by TiKu
Subclassing the Form and handling WM_SIZING and WM_SIZE message should come close to this.

Re: Form Resize VB6

Posted: 28 Sep 2009, 20:22
by Mex
One more question :)

I have my own UniListview,all works fine. Now when i add manifest to my binary, resizing the listview is much slower.
Any idea what can cause this?

Re: Form Resize VB6

Posted: 29 Sep 2009, 14:29
by TiKu
Without knowing what you do within the control when it is resized, it's difficult to tell.

Re: Form Resize VB6

Posted: 29 Sep 2009, 18:27
by Mex
This is very strange problem and happens only with Vista and Windows 7, but when i remove manifest file everything is ok.

With Windows XP works everything fine with manifest too.

If you have time i can send sourcecode and sample app, maybe you can find out what causes this problem?

Re: Form Resize VB6

Posted: 29 Sep 2009, 18:34
by TiKu
Okay. But it might take some days as I'm short on time.

Re: Form Resize VB6

Posted: 29 Sep 2009, 19:33
by Mex
Ok here is small sample and my listviews sourcecode.
data is loaded from data.xml(saved recordset)

Re: Form Resize VB6

Posted: 30 Sep 2009, 00:29
by TiKu
I'd say the performance hit is caused by the UserControl_Resize event handler which resizes all columns. Resizing a column causes all its content to be redrawn, so effectively all displayed cells are redrawn when resizing the control. Drawing text seems to be more expensive with themes enabled - I've already noticed this effect in one of my controls.