Re: UserControl HELP
- From: "Enrico Gobbo" <gobboe@xxxxxxxx>
- Date: Tue, 11 Oct 2005 14:00:32 +0200
Ok, i change the HasDC property in FALSE and everythng still work, but when
i set WindowLess = True i get the error n° 398 ("Client Site Not
Disponible").
When i press the debug button i see that the error is on the
USERCONTROL.LINE method. Why?
My purpose is to draw a panel (like the sheridan panel) instead of insert it
into my ocx. I know that the only control that allow me to draw a line is
the PictureBox but if i work with a Windowless control i can't use that
control... Help please!!
Enrico
"Ken Halter" <Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx> ha scritto nel messaggio
news:uq9oMhczFHA.3188@xxxxxxxxxxxxxxxxxxxxxxx
> "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..
>
.
- References:
- UserControl HELP
- From: Enrico Gobbo
- Re: UserControl HELP
- From: Ken Halter
- UserControl HELP
- Prev by Date: treeview createdragimage error
- Next by Date: Re: treeview createdragimage error
- Previous by thread: Re: UserControl HELP
- Next by thread: Row selector out of synch with row selected Infragistics grid
- Index(es):