Archive for the ‘Forms’ Category

How to Create Rounded Form

Wednesday, March 7th, 2007

How to Create Rounded Form

(more…)

How to Create a Gradient Filled Form

Friday, March 2nd, 2007

You can create a gradient filled form to make form that is more beautiful. (more…)

Hide the titlebar

Friday, February 16th, 2007

Hide the titlebar.
(more…)

Hide the window caption

Thursday, February 15th, 2007

If you want to prevent the user to move a window you have to hide the caption. This is done by changing the window attributes in the FormCreate event. Its also possible to set the property BorderStyle to ‘bsNone’, but than the window has no frame at all.
(more…)

How to make a desktop screenshot?

Sunday, January 21st, 2007

function GetDesktopScreenShot:TBitmap;
var
Desktop:HDC;
begin
Result:= TBitmap.Create;
Desktop:= GetDC(0);
try
try
Result.PixelFormat := pf32bit;
Result.Width := Screen.Width;
Result.Height := Screen.Height;
BitBlt(Result.Canvas.Handle,0,0, Result.Width, Result.Height, Desktop,0,0,SRCCOPY);
Result.Modified := True;
finally
ReleaseDC(0,Desktop);
end;
except
Result.Free;
Result:=nil;
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
Image1.Picture.Bitmap := GetDesktopScreenShot;
end;