DelphiFAQ Home Search:
General :: Programming :: Delphi :: VCL
About the Delphi VCL (Visual Component Library)

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

Msg 'Canvas does not allow drawing'

Question:

What does the error message 'Canvas does not allow drawing' mean?

Answer:

  1. you may have run out of resources, which means a new DC cannot be allocated. Usually this is a result of not freeing unused DCs or other objects.
  2. you are attempting to draw to an device context that is not yet valid. Such as in the create constructor of a component.
  3. you are trying to draw on a canvas while your last draw-operation has not finished yet. In this case you can use Canvas.Lock() or Canvas.TryLock() to fix it.


Generated 8:01:37 on Aug 25, 2019