Hexagora Forum
Hexagora Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Other hexagora products
 Programs (Programmi)
 HexUniControls GDI usage

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert Email Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
m.montesi Posted - 09 Jun 2015 : 05:46:41
Hi Davide,
we are using HexUniControls wrapped in a custom usercontrols.

While working in our application to try to optimize GDI consumption, we found out that HexUniControls use more GDI objects than standard VB6 controls.
For example, a program with 4 VB6 textbox and 4 VB6 labels uses 34 GDI objects while the same program with 4 ctlUniTextBoxXP and 4 ctlUniLabelXP uses 62 GDI objects.
That means almost doubling the application's GDI cost in worst case scenario.

From the tests from one of our partners, it seems that there are some GDI objects (like Brush created with CreateSolidBrush API) that can be detroyed in the paint cycle (WM_PAINT). Now they seem to be destroyed on terminate event.

Of course this is not an issue, but it would be great if you can take a look into this and, if possible, try to optimize GDI consumption.


Thanks in advance
Mirko
2   L A T E S T    R E P L I E S    (Newest First)
m.montesi Posted - 15 Jun 2015 : 05:41:28
That's true, VB6 creates an additional window for Usercontrols so a small increase in GDI usage is inevitable.
As always Davide thank you for your time.

Mirko
s.dav Posted - 14 Jun 2015 : 23:12:03
Yes, we already know that our controls consume more GDI resources than the standard ones but I can assure you that they are very optimized;
in fact we also created a WindowsLess version of them (where possible) in order to avoid problems.
The GDI resources usage is mostly due to the VB6 stack, as you know our widgets have been created with VB6 so for every input control (text, combo, list) there is always ad additional window created by VB6 (the VB6 usercontrol window)
You are right, we also use a brush for drawing the background in response to some Windows messages but creating and destroying it at every message cycle is not fantastic IMO; but I can say you that they are very optimized and the resources freed as soon as possible

Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000