View Single Post
  #3  
Old 14-02-2024, 17:25
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 692
Thanks: 481
Thanked 2,567 Times in 565 Posts
BLACKFIRE69 is on a distinguished road
Arrow ShapeForm

i created this just for fun; it seems a little easier to use.


ShapeForm.dll:

Code:
* Automatically resizes the form according to the image.
* Supports mouse dragging by default.
* Supports form transparency by default.
* Bmp form does not overlay on the InnoSetup's components, 
  so they will show up on the Bmp form.

* Does not require extra work; everything is automated.

ImageMasker.exe:

Code:
* Drag and drop a PNG file onto this; it will generate mask.bmp and base.bmp.
* Requires Visual C++ Redistributable 2015 or later.

Functions:

Quote:
function zCreateRgnFromBmp(WndH: HWND; const sMaskBmp: WideString; iTrRGBColor: Integer): Integer;

function zCreateFormFromBmp(WndH: HWND; const sBmpFile: WideString; bACPremultiplied: Boolean): Integer;

function zCreateFormFromBmpEx(WndH: HWND; const sBmpFile: WideString; bACPremultiplied, bDraggableForm: Boolean; iOpacityPct: Byte): Integer;

Example:

Code:
procedure InitializeWizard();
begin
  ExtractTemporaryFile('mask.bmp');
  ExtractTemporaryFile('base.bmp');

  { ShapeForm }
  zCreateRgnFromBmp(WizardForm.Handle, ExpandConstant('{tmp}\mask.bmp'), clBlack);

  zCreateFormFromBmpEx(WizardForm.Handle, ExpandConstant('{tmp}\base.bmp'), False, True, 100);

end;

Download:

ShapeForm + Example.rar



.
Attached Images
File Type: png 5.png (14.0 KB, 240 views)
File Type: png 0.png (66.5 KB, 239 views)
File Type: png 1.png (67.2 KB, 232 views)
File Type: png 2.png (69.2 KB, 233 views)
File Type: png 3.png (140.0 KB, 236 views)
File Type: png 4.png (130.5 KB, 224 views)
File Type: gif 01.gif (266.4 KB, 229 views)

Last edited by BLACKFIRE69; 16-02-2024 at 03:50.
Reply With Quote
The Following 6 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (14-02-2024), Cesar82 (15-02-2024), LinkSystem (29-10-2024), Lord.Freddy (14-02-2024), nordi (14-02-2024), ScOOt3r (14-02-2024)