[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Drawing On Screen

Hi Experts!

How To Hide Our Application's Form And Then Draw a (Example: Line,Arc,...) On The Current Screen?
Can I Use CANVAS?

I'm Using Delphi 5.0

Bye
Programmer-x
0
Hamidreza Vakilian
Asked:
Hamidreza Vakilian
1 Solution
 
cqhallCommented:
Try something along these lines...

Procedure EllipseOnDeskTop(X1, Y1, X2, Y2: integer; msDelay: word=3000; color: integer=clRed; fill: boolean=false);
var C : TCanvas;
  W : integer;
  diff: integer;
begin
 C:=TCanvas.Create;
 C.Handle:=GetDC(0);
 if fill then C.Brush.Color:=color else C.Brush.Style:=bsClear;
 C.Pen.color:=Color;
 C.Pen.Width:=2;
 C.Ellipse(X1, Y1, X2, Y2);
 W:=GetTickCount+msDelay;
 diff:=W-integer(GetTickCount);
 while diff>0 do
 begin
 if diff<>round(W - integer(GetTickCount)) then
 begin
  diff:=integer(W - integer(GetTickCount));
 end;
 end;
 ReleaseDC(0,C.Handle);
 C.Free;
 SystemParametersInfo(SPI_SETDESKWALLPAPER,0,nil,SPIF_SENDCHANGE);
end;
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now