Launching a website from value DbEdit? lazarus / 16-Databases ---------------------------------------------------------------------- 1HuntnMan · 2024-11-09 15:08 This doesn't work, would anyone be able to correct my syntax or better way.  I did this as a double-click because the user needs to enter the URL into the DbEdit but if they want to launch the client's website, double-click... Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TFrmClientsMgt.DBEditClientURLDblClick(Sender: TObject);begin  //->ShellExecute(handle,'open','extract DBEditClientURL',nil,nil,SW_SHOWNORMAL);end; ---------------------------------------------------------------------- TRon · 2024-11-09 15:38 I see code using Lazarus. Alternatives are: - OpenDocument - OpenURL (link to ccr documentation seems broken) Details for the window only shellexecute solution can be read here. What exactly is it that you seem to have issues with ?  The actual run of shell execute (e.g. casting parameters) or the extraction of the clientURL from the database ? ---------------------------------------------------------------------- 1HuntnMan · 2024-11-09 17:11 If I uncomment this line of code, getting these 2 errors when compiling: clientsmgt.pas(215,3) Error: Identifier not found "ShellExecute" clientsmgt.pas(215,64) Error: Identifier not found "SW_SHOWNORMAL" Can't remember where I picked up this example, but it's not correct... ---------------------------------------------------------------------- 1HuntnMan · 2024-11-09 17:13 I think I got this from old code I have from back with Delphi 7, not sure. ---------------------------------------------------------------------- TRon · 2024-11-09 17:19 shellexecute is a windows (only) function. In order to be able to use it the unit windows needs to be included in the uses clause of your code. The same is true for the constant SW_SHOWNORMAL. Alternatively it is possible to use the shellapi unit. edit: example Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program test; {$mode delphi} uses  windows; var  ClientURL : string;begin  ClientURL := 'some url';   // https://learn.microsoft.com/en- us/windows/win32/api/shellapi/nf-shellapi-shellexecutea  ShellExecute  (    0,                 // (optional) handle to parent window    'open',            // (optional) string with action (verb) to be performed                       // verbs: edit, explore, find, open, print, runas or nil    pchar(ClientURL),  // file or object to be used (execute) by the verb    nil,               // (optional) parameters/arguments for file or object    nil,               // (optional) working directory    SW_SHOWNORMAL      // display flags option  );end. ---------------------------------------------------------------------- 1HuntnMan · 2024-11-09 22:06 Thanks TRon, more involved that what I thought but makes sense.