Canvas does not allow drawing delphi windows 7




















Other Threads 1. Error: Canvas does not allow drawing 2. Error Canvas does not allow drawing. Error: Canvas does not allow drawing 4. Error: Canvas does not allow drawing 6. Canvas does not allow drawing. Canvas does not allow drawing!

Canvas does not allow drawing??? If I repeat the same steps it does not necessarily reproduce the error. Is it a possible resource issue? Re:Error: canvas does not allow drawing Try this, Whereever you havve a bunch of code modifying or reading canvas data, wrap it up like this : MyObject. Unlock; end; Let me know if it works. Danny Thorpe. Try Canvas. Unlock end I still am getting the error. The DrawMap procedure calls other procedure that draw on my canvas as well.. Maybe I need to do it in each procedure I call?

I would think doing it at the top procedure would be enough. This WILL certainly reduce resources used by your program but it is not possible to be certain if your problem is caused by numerous loaded forms. By not using so many forms, components, bitmaps and so on. Quote so could this duplication create many copies of identical bitmaps, each using up a GDI handle? Quote Or is it the sheer number of windows? Re:Canvas does not allow drawing Well, thanks for your replies.

I certainly adhere to the principle of creating forms only when needed, but unfortunately the whole point of my application is to display a large amount of information at once on a multi-screen console.

Regards, Don Taylor. And as RandomAccess says, create forms and free them when they are no longer needed helps reducing the gdi usage. Nils Haeck. Re:Canvas does not allow drawing One tip: if you have a page control for example, you can put frames on the different pages, and only create the frame at the moment that the page is visible. So when you switch pages, you destroy the one that is now going to be hidden again and create the one that is visible. Also it might help to use controls that don't use GDI resources heavily.

For instance, use ownerdraw where applicable, to avoid having big image lists in use. Surely a good idea. Re:Canvas does not allow drawing Hi Don, Well you certainly seem to know what your doing. I just came across this really old post from Peter Below which may help. Hope it helps. Re:Canvas does not allow drawing Brilliant! I may think I know what I am doing, but reassurance is always very welcome.

Thanks for the help. All other forms at least the ones only used modally should be created as needed and destroyed when no longer needed. TGraphicControl do not use window handles.



0コメント

  • 1000 / 1000