Re: UserControl HELP
- From: "Ken Halter" <Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 10 Oct 2005 11:27:39 -0700
"Enrico Gobbo" <gobboe@xxxxxxxx> wrote in message
news:%23Mhs3TbzFHA.2792@xxxxxxxxxxxxxxxxxxxxxxx
> Good afternoon
> i've a big problem. I spent a lot of time for create an ocx as flessible
> as possible, but now it result very heavy in the project. My project read
> from a database how many control load and than load the page. (eg. with 70
> controls my page spent 10 seconds for load)
> I need to know if there is some tips for the create a faster ocx. I've
> read somewhere in the net, that there is a way to create it without his
> handle ("windowless") and someone suggest me to use the LINE method
> instead insert other objects in the ocx. is it correct? I've tried to
> insert 100 "custom" button in form1, and 100 standard button in form2.
> Opening form2, my pc spent less time than open form1... WHY?
>
> I hope that someone could help me, and i apologize for my horrible english
> (i'm italian..)
>
> Thanks Enrico
UserControls have a lot of overhead. First, they have to load the controls
you place on them and then the form has to load the UserControl. This can
easily be twice as slow. The more controls you have embedded in the
UserControl, the slower it'll get. There's really no way around that....
You can set the UserControls Windowless property = True and use "Microsoft
Windowless Controls" for command buttons, etc. That may help. Setting the
HasDC property = False may save a few resources too.
--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..
.
- Follow-Ups:
- Re: UserControl HELP
- From: Enrico Gobbo
- Re: UserControl HELP
- References:
- UserControl HELP
- From: Enrico Gobbo
- UserControl HELP
- Prev by Date: UserControl HELP
- Next by Date: Row selector out of synch with row selected Infragistics grid
- Previous by thread: UserControl HELP
- Next by thread: Re: UserControl HELP
- Index(es):
Relevant Pages
|