Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Other hexagora products
 Programs (Programmi)
 HexUniControls GDI usage
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

m.montesi
Novice

Italy
5 Posts

Posted - 09 Jun 2015 :  05:46:41  Show Profile  Reply with Quote
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

s.dav
Site Admin

Italy
3364 Posts

Posted - 14 Jun 2015 :  23:12:03  Show Profile  Visit s.dav's Homepage  Reply with Quote
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

Regards, Davide
Go to Top of Page

m.montesi
Novice

Italy
5 Posts

Posted - 15 Jun 2015 :  05:41:28  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000