Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i do not see shape on form

Status
Not open for further replies.

saun

Programmer
Jun 25, 2004
2
0
0
TR
i am writing an basic image processing app in delphi6 i need and use shapes to draw some thing on form. my problem is i see shapes in winxp but when i load my app to win98
i dont see them.

thanks for help.
 
Hi saun,

you'll have to show some code before we can help you uot here...

--------------------------------------
What You See Is What You Get
 
there is a paintbox on my shapes to draw on shapes
and all of them in panel i see only panel on form on win98
the code draw on paintbox:


procedure TForm1.BitBtn3Click(Sender: TObject);
var x,y,sx,sy:integer;
res:tbitmap;
ilkatson,ilknokta,atis:boolean;
son:TPoint;
tempx,tempy:string;
begin
memolin.Lines.Clear;
PaintBox1.Repaint;
ilknokta:=false;
atis:=false;
res:=TBitmap.Create;
for sx:=1 to bitmapcount do
begin
res.LoadFromFile('l\image'+inttostr(sx)+'.bmp');
noktabul(x,y,res);

tempx:=inttostr(x);tempy:=inttostr(y);
if Length(tempx)=1 then tempx:='0'+'0'+inttostr(x);
if Length(tempx)=2 then tempx:='0'+inttostr(x);
if Length(tempy)=1 then tempy:='0'+'0'+inttostr(y);
if Length(tempy)=2 then tempy:='0'+inttostr(y);

memolin.Lines.Add(tempx+'-'+tempy+' ');

x:=x*2;y:=y*2;
with PaintBox1.Canvas do
begin

if (x<>0) and (y<>0) and (ilknokta=false) then
begin
MoveTo(x,y);
Pen.Width:=TrackBar2.Position;
pen.Color:=clblue;
ilknokta:=true;
end;
if (ilknokta=true) and (x<>0) and (y<>0) then
begin
if (atis=false) and (ilknokta=true) then
pen.Color:=clblue else pen.Color:=clblack ;
if (atis=true) and (ilkatson=false) then
Pen.Color:=clolive;
lineTo(x,y);
son.X:=x;
son.Y:=y;
end;
if (ilknokta=true) and (atis=false) and (x=0) and (y=0) and ((son.X>20) and (son.x<620) ) and ((son.y>20) and (son.y<460) ) then
begin

Pen.Color:=clred;
Brush.Style:=bsSolid;
Brush.Color:=clred;
Ellipse(son.X-8,son.Y-8,son.X+8,son.Y+8);
atis:=true ;
end; //
if (ilkatson=false) and (atis=true) and (x<>0) and (y<>0) then
begin
ilkatson:=true;
Brush.Color:=clblue;

Ellipse(x-8,y-8,x+8,y+8);
end;
Sleep(round(500/TrackBar1.Position));

end;
end;
res.Free;
Button6.Enabled:=true;
end;
 
Check out this graphics tutorial...page 4 is particularly helpful:
Hope this helps!

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top