iv been trying to figure simba out, and havnt found any tutorials for drawing or using forms. It doesnt look like ther are manyt tuts at all. I would really like to see a thread with many differences between scar and simba.
Ohh, i hink i found a bug,
program new;
var form : Tform;
begin
form := tform.create(nil);
form.show;
end.
Result is the border of the form appears but the form itself is transparent, and simba crashes.
EDIT: stupid stupid stupid, haha. didnt use threadsafecall.
Edit2:
program new;
var
form : tform;
dx1,dx2,dy1,dy2,cr,t,h,k:integer;
v : TVariantArray;
procedure paint(sender : TObject);
begin
t := t+1;
dx1 := round(cr*cos(t)+h)
dy1 := round(cr*sin(t)+k)
dx2 := round(cr*cos(t)-h)
dy2 := round(cr*sin(t)-k)
form.CANVAS.Ellipse(dx1-cr,dy1-cr,dx2+cr,dy2+cr)
end;
procedure show;
begin
cr := 2;
h := 250;
k := 250;
form := tform.Create(nil);
form.width := 500;
form.height := 500;
form.show;
form.ONPAINT := @paint;
end;
begin
ThreadSafeCall('show', v);
end.
output :
Error: Exception: Invalid type cast at line 30
Am i doing something wrong?