Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

draw funcation need help stuck with a problem

I been trying to make a simple draw funcation for my chat but I am stuck on trying to get the mouse courser point from the data the data is send from the server as a string then i convert the string to integer [ StrToInt(s) ] but when i try to draw i get all lines and no draw movement this is the server side bebug code showing how the server gets info and sends info the numbers are the integer from the mouse movement of the drawing.

my server gets the info [ Welcome lobby : Simon : 272
Welcome lobby : Simon : 283
Welcome lobby : Simon : 300
Welcome lobby : Simon : 316
Welcome lobby : Simon : 327
Welcome lobby : Simon : 332 ]

and sends the draw code IE 283/300 so on back to the client this that would be converted and show the lines being drawing by the user then the code below would add the info to the draw window.

[code]
procedure TChatForm.ShowDrawing(s: string);
var
lx, ly, x, y: Integer;
begin
Drawio.Canvas.MoveTo(lx, ly);
imgDraw.Canvas.MoveTo(lx, ly);
imgDraw.Canvas.LineTo(x, y);
Drawio.Canvas.LineTo(x, y);
lx := x;
ly := y;
end;
[/code]

can sumone please help thanks alot sorry for bad spelling i have dyslexia :(
Slewis
Sign In or Register to comment.