I want to link to a linkind profile via a WebLabelLink but cannot find an property that I can edit to link it to the hyperlink, I know it is not a Windows aplication so ShellAPI unit won’t work.
I tried to link it via ShellExecute with the following code:
uses
System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,
WEBLib.Forms, WEBLib.Dialogs, Windows,Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.ExtCtrls,
Messages, Variants, Graphics, Controls, Forms,
Dialogs, Vcl.Imaging.pngimage,ShellAPI;
procedure ShellOpen(const Url: string; const Params: string = ”);
begin
ShellAPI.ShellExecute(0, ‘Open’, PChar(Url), PChar(Params), nil, SW_SHOWNORMAL);
end;
procedure TfrmMain.WebLinkLabel1Click(Sender: TObject);
begin
ShellOpen(‘https://www.linkedin.com/company/companyname/’);
end;
end.
The error I was met with is cannot find unit “ShellAPI”
I assume it is due to the application not being a windows application
Puffer Fish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.