Form Resize VB6

The place for programming-related topics.
Post Reply
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Form Resize VB6

Post by Mex »

Hallo Timo

Do you know, is it possible in VB6 somehow to "catch" forms resize_begin and resize_end events?
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: Form Resize VB6

Post by TiKu »

Subclassing the Form and handling WM_SIZING and WM_SIZE message should come close to this.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Form Resize VB6

Post 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?
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: Form Resize VB6

Post by TiKu »

Without knowing what you do within the control when it is resized, it's difficult to tell.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Form Resize VB6

Post 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?
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: Form Resize VB6

Post by TiKu »

Okay. But it might take some days as I'm short on time.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Form Resize VB6

Post by Mex »

Ok here is small sample and my listviews sourcecode.
data is loaded from data.xml(saved recordset)
Attachments
sample.zip
(118.32 KiB) Downloaded 525 times
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: Form Resize VB6

Post 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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Post Reply