Form Resize VB6

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

Form Resize VB6

Post by Mex » 28 Sep 2009, 19:24

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 » 28 Sep 2009, 20:18

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: 129
Joined: 24 Sep 2009, 19:47

Re: Form Resize VB6

Post by Mex » 28 Sep 2009, 20:22

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 » 29 Sep 2009, 14:29

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: 129
Joined: 24 Sep 2009, 19:47

Re: Form Resize VB6

Post by Mex » 29 Sep 2009, 18:27

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 » 29 Sep 2009, 18:34

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: 129
Joined: 24 Sep 2009, 19:47

Re: Form Resize VB6

Post by Mex » 29 Sep 2009, 19:33

Ok here is small sample and my listviews sourcecode.
data is loaded from data.xml(saved recordset)
Attachments
sample.zip
(118.32 KiB) Downloaded 302 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 » 30 Sep 2009, 00:29

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