我是新手 问题有点简单 请关照
下面这段代码 我怎么编绎不过去,请高手帮忙 谢谢 left1.x=76 left1.y=348, left2.x=465 left2.y=716
right1.x=470 right1.y=348, right2.x=860 right1.y=716 是图上的四个点坐标procedure TmainForm.Start();
var
CurDC: HDC;
FullscreenCanvas:TCanvas;
i,j:Integer;
lx,ly,rx,ry:Integer;
lc,rc:TColor;
clr,clr2:Tcolor;
begin
if (bAuto=True) And (Not GetPos()) then
exit;
clr:=RGB(0,0,255);
clr2:=RGB(255,0,0);
CurDC := GetDC(0); //DC
FullscreenCanvas := TCanvas.Create;
FullscreenCanvas.Handle := CurDC;
FullscreenCanvas.Pen.Color:=clr;
FullscreenCanvas.Pen.Width:=1;
i:=left1.X;
j:=left1.Y;
while(i<=left2.X) do
begin
//
while(j<left2.Y) do
begin
//
lx:=i;ly:=j;
rx:=right1.X-left1.X+lx; ry:=ly;
lc:=GetColor(lx,ly);
rc:=GetColor(rx,ry);
if lc<>rc then
begin
//绘制点
FullscreenCanvas.Pixels[lx,ly]:=clr;
FullscreenCanvas.Pixels[lx+1,ly+1]:=clr2;
FullscreenCanvas.Pixels[lx-1,ly-1]:=clr;
FullscreenCanvas.Pixels[lx+1,ly-1]:=clr2;
FullscreenCanvas.Pixels[lx-1,ly+1]:=clr;
end;
//
j:=j+step;
end;
//
j:=left1.Y;
i:=i+step;
end;
FullscreenCanvas.Free;
ReleaseDC (0, CurDC);
end;
下面这段代码 我怎么编绎不过去,请高手帮忙 谢谢 left1.x=76 left1.y=348, left2.x=465 left2.y=716
right1.x=470 right1.y=348, right2.x=860 right1.y=716 是图上的四个点坐标procedure TmainForm.Start();
var
CurDC: HDC;
FullscreenCanvas:TCanvas;
i,j:Integer;
lx,ly,rx,ry:Integer;
lc,rc:TColor;
clr,clr2:Tcolor;
begin
if (bAuto=True) And (Not GetPos()) then
exit;
clr:=RGB(0,0,255);
clr2:=RGB(255,0,0);
CurDC := GetDC(0); //DC
FullscreenCanvas := TCanvas.Create;
FullscreenCanvas.Handle := CurDC;
FullscreenCanvas.Pen.Color:=clr;
FullscreenCanvas.Pen.Width:=1;
i:=left1.X;
j:=left1.Y;
while(i<=left2.X) do
begin
//
while(j<left2.Y) do
begin
//
lx:=i;ly:=j;
rx:=right1.X-left1.X+lx; ry:=ly;
lc:=GetColor(lx,ly);
rc:=GetColor(rx,ry);
if lc<>rc then
begin
//绘制点
FullscreenCanvas.Pixels[lx,ly]:=clr;
FullscreenCanvas.Pixels[lx+1,ly+1]:=clr2;
FullscreenCanvas.Pixels[lx-1,ly-1]:=clr;
FullscreenCanvas.Pixels[lx+1,ly-1]:=clr2;
FullscreenCanvas.Pixels[lx-1,ly+1]:=clr;
end;
//
j:=j+step;
end;
//
j:=left1.Y;
i:=i+step;
end;
FullscreenCanvas.Free;
ReleaseDC (0, CurDC);
end;
解决方案 »
- CBT钩子失效问题。
- blazingfire近来接分4(如何在内存中直接打开Word文档?)
- 实现IDispatch接口拦截弹出窗口 问题
- 请大虾快救我!我的主窗口设为MDIFORM,其中放置了面板,可在菜单中为什么打不开子窗口,(子窗口是MDICHILD)?
- 谁能告诉我怎么用dbexpress 的sqlconnection来连接sql2000数据库。装dephi的机器上的sql client可以连接的上sql 2000 server。
- Timage如何实现pan功能?
- 如何由正在运行的程序进程得到此程序主窗口句柄??(在线)
- 数据修改的问题?
- 求DBGrideh for D6的控件
- DateTimePicker控件的date属性为什么还包括时间,怎样只要日期,不要时间
- 關於Delphi連接數據庫建立動態菜單的問題
- 用delphi做一个MP3播放器
哈哈后来发现是罗辑问题
我猜一定没有提示,就是编译就死
不脱离调试环境就是内存读写错误脱离就是死界面,
j:=left1.Y;
问题在这句,虽我我不明白还有没有其它原因,也不知道left1.Y; 如何定义
但照现在发上来的码子看是这个问题