Hello.
I have created our custom ticket-like component. I must place multiple ticket's component on the form in runtime. This tickets must fit in the form's size. their size changes according the amount of tickets to fit on the screen, and this process is to slow. when I have more than 4 components on the form, and I put another one, all of the tickets size is changed and the screen is flickering. I tried Application.DoEvent(), Invalidate etc. but nothing gaved me the result I wanted. anyone knows what's the problem
I appreciate your help. thanks in advance.

performance problem
jeffehrl
Hello
I suggest that you review the Code you have written, there may be some Fractaius when the component is loading, like reading/writing to files, populating some data from database. Try to load data or any I/O Operation when your component load is complete. There is a new event introduce known is FirstShown try to load any data or perform any I/O Operation in that event insteed of OnLoad.
Lisa Z. Morgan
thanks for your replys.
I'm not calling extra functions when control is drawing. the control derives from Panel class. I create Bitmap object and draw it on the panel. that's it :)
rouie_a
I suggest to take a profiler and find you bottlenecks. A free profiler is Nprof, nice, free and easy.
When you want a full profiler with just some extra compared to Nprof i suggest ANTS Profiler.
Here is a full list of available tools:
jimoctezuma
You also don't mention how the custom control is being drawn. Is it derived from another control Is it owner drawn There might be ways to improve the performance of the Paint event handler, if that's what you're doing.