Stupide problem with With and Self

Giganews Newsgroups
Subject: Stupide problem with With and Self
Posted by:  John (prout@nospam.com)
Date: Fri, 24 Mar 2006

Hello,

In a form I have this code

with TMetafileCanvas.Create(MyMetafile, 0) do
        begin
        //I have to draw on the MetafileCanvas so I do
        WideCanvasTextOut(self,x,y,MyWideString);
        end;

the problem is that the compiler consider the Self as the Form not as the
MetafileCanvas.
Ho to solve this?

Thanks

John

Replies