How to Launch default browser on a URL?



How to Launch default browser on a URL?..

Answer / Avnish Kumar Awasthi

To launch the default browser on a URL in Delphi, you can use the ShellExec function. Here's an example:nn```delphinfunction OpenURL(const Url: string): Boolean;nvar
ShellProc: TShellExecuteResult;nbegin
ShellProc := ShellExec(0, PChar('open'), nil, PChar(Url), nil, SW_SHOWNORMAL, 0, nil);
if ShellProc.Success thenn Result := True
elsen Result := False;n end;nend;n``

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

Why won't the virtual key codes work in program?

1 Answers  


How to Retrieve a users login name ?

1 Answers  


How to use TADOTable Seek procedure?1

3 Answers  


How to Change the owner of a component at runtime ?

0 Answers  


How to Convert ASCII files to Paradox tables?

1 Answers  


How to Change the default width/height of the editor?

0 Answers  


How to execute a stored procedure with TIBSQL?

1 Answers  


What is the tag property useful for?

1 Answers  


How to Change the Windows wallpaper in code?

1 Answers  


why Paradox slow on some computers and not on others ?

1 Answers  


How to Get the current line number of a TMemo?

1 Answers  


How to Avoid an Application Error when using EM_POSFROMCHAR ?

1 Answers  


Categories