Gallery
Software
Music
Programming
Archive
Friday, Mar 22 Week 12

Page 1 of 1  
Showing no. 1 to 4 of 4 items

Delphi: Use TLabel as link to a web site (URL). Create new label on the form, and doubleclick on it to create OnClick event. uses windows,shellApi,forms; function launchUrl(url:ansiString;h:THandle=INVALID_HANDLE_VALUE):boolean; begin if h=INVALID_HANDLE_VALUE then h:=application.handle; result:=shellExecuteA(h,'open',pAnsiChar(url),nil,nil,SW_NORMAL)>0; end; procedure TForm1.Label1Click(Sender: TObject); begin launchUrl('http://www.mortenbs.com/delphi-programming/') end;

Delphi: Run a program or web-link using ShellExecute API-command. Run a program or web-link using ShellExecute api command. uses shellApi; function launch(pFileName:pAnsiChar;pParams:pAnsiChar=nil):boolean; const sz=sizeOf(TShellExecuteInfoA); var si:TShellExecuteInfoA; begin pFill(@si,sz); si.cbSize := sz; si.fMask := SEE_MASK_NOCLOSEPROCESS; si.wnd := windows.getDesktopWindow; si.lpFile := pFileName; si.lpParameters := pParams; si.lpDirectory := nil; si.nShow

Read and write NetStumbler NS1 file-format with Delphi. Read and write NetStumbler .ns1 file-format with Delphi. Supports .ns1 file-versions: 12,11,8,6,1 (Used by NetStumbler &MiniStumbler) Make a descendant class of the TNs1Object-object to exchange data to your list. 1. Make an inherited class of TNs1Object. 2. Override all virtual parameters for read. 3. Override all virtual parameters for write. 4. In readEntry, create your external object. (used for load) 5. In writeEntry, define from your external

Delphi: Get filename and arguments from a LNK-shortcut file. uses windows,shellApi,comObj,shlObj,activeX; type TPathStr = array[byte] of ansiChar; function getLnkShortcut(aFileName:string;out aFile,aArgu:string):boolean; var s :TPathStr; wfs :TWin32FindDataA; psl :iShellLinkA; ppf :iPersistFile; begin result:=false; aFile:=''; aArgu:=''; if coCreateInstance(CLSID_SHELLLINK,nil,CLSCTX_INPROC_SERVER,iShellLinkA,psl)=NOERROR then if