>Form1->Canvas->TextOut与Label1->Caption在坐标上的区别</P>1 h h7 Y }! ?/ c& T7 @
>前者在LEFT〈100,TOP〈100左右,时反映的不是真的坐标,不知道怎么回事?</P>
>如String str="";
>两者LEFT〈100,TOP〈100左右,数值不一样。且若没有第四行,第二行写成str=str+"x="+X+" "+"y="+Y;也可。不知道什么原因?</P>[em06][em06]
>Note: TextOut does not erase the background before writing Text. To erase the background first, use the FillRect method.</P><
>上面是TextOut的一个注释!意思是TextOut方法在写之前是不能自动清除背景的!为了清除需要使用FillRect方法!所以可以将代码改成:</P><
>String str="";
>这样就没有问题了!</P>
>Form1->Canvas->FillRect(Rect(0,0,100,100));</P><
>是清除(0,0),(100,100)的屏幕吗?</P>| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |