View Single Post
  #41  
Old 29-07-2018, 00:29
Jiva newstone's Avatar
Jiva newstone Jiva newstone is offline
Registered User
 
Join Date: Nov 2016
Location: India
Posts: 190
Thanks: 227
Thanked 412 Times in 96 Posts
Jiva newstone is on a distinguished road
use this for Round edges of form
[code]

function CreateRoundRectRgn(p1, p2, p3, p4, p5, p6: Integer): THandle; external 'CreateRoundRectRgn@gdi32 stdcall';
function SetWindowRgn(hWnd: HWND; hRgn: LongWord; bRedraw: BOOL): Integer; external '[email protected] stdcall';


procedure InitializeWizard;
var
RegisterWizardform : HWND;
begin
with TLabel.Create(WizardForm) do begin
Parent:=WizardForm;
SetBounds(25,364,0,0);
Font.Style := [fsBold];
AutoSize:=true;
Font.Size := 12;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Caption:=('Coded by JRD');
end;

RegisterWizardform:= CreateRoundRectRgn(0, 0, WizardForm.Width, WizardForm.Height, 5, 5);
SetWindowRgn(WizardForm.Handle, RegisterWizardform, True);
end;

and change the 5,5 value to anything u want ,like if u change it to 250,250 it will make the form round
Attached Images
File Type: png Rg.PNG (560.4 KB, 116 views)
Reply With Quote
The Following 2 Users Say Thank You to Jiva newstone For This Useful Post:
JRD! (29-07-2018), Stor31 (29-07-2018)