Check if File matches Wildcards
Q: > i would like to make a function that return if the file is in that wildcards > > e.g. > wildcards(‘c:\*.txt’,’c:\test.txt’)…
Choose a Directory
the following code will bring up the standard “Browse for folders” dialog with the full directory tree available: [code lang=”delphi”]uses FileCtrl; procedure TForm1.Button1Click(Sender:…
Deltree
[code lang=”delphi”]procedure DelTree(StartDir: string); var Search : TSearchRec; begin if Startdir[Length(Startdir)] ‘\’ then startdir := startdir + ‘\’; if FindFirst(startdir + ‘*.*’, faAnyFile,…
FileTime 2 DateTime
[code lang=”delphi”]function GetModifiedDate(FileName: string): TDateTime; var SearchRec: TSearchRec; ModifiedTime: TFileTime; SystemTime: TSystemTime; begin Result := 0; If FindFirst(FileName, faAnyFile, SearchRec) = 0 then…
Get Short Pathname
[code lang=”delphi”]FName : String; SetLength(FName, MAX_PATH+1); GetShortPathName(PChar(SaveDialog1.Filename), PChar(FName), MAX_PATH); SetLength(FName, StrLen(PChar(FName))); [/code] [tags]Delphi, File[/tags]
GetShortFileName
[code lang=”delphi”]Function GetShortFileName(Const FileName : String) : String; var aTmp: array[0..255] of char; begin if GetShortPathName(PChar(FileName),aTmp,Sizeof(aTmp)-1)=0 then Result:= FileName else Result:=StrPas(aTmp); end;[/code] [tags]Delphi,…
Setting File Attributes (german)
Dateiattribute setzen (aus der D3 Onlinehilfe) Delphi ermöglicht es Ihnen, die Attribute jeder beliebigen Datei zu jedem beliebigen Zeitpunkt zu setzen. Um die…
MailTo with Subject and Body
[code lang=”delphi”]function TMainForm.SendEMail(Recipient, Subject, Body: string): HINST; var MailMsg: string; begin MailMsg := Format(‘mailto:%s?subject=%s&body=%s’, [Recipient, Subject, Body]); Result := ShellExecute(Application.Handle, ‘open’, PChar(MailMsg), nil,…
Open Outlook EMail Form (2)
Deane Hafling wrote in message news:7kdna0$ rs83@forums.borland.com… > How can I call up the Outlook New E-mail Form??? > > I am looking…
Open Outlook EMail Form
Deane Hafling wrote in message … >How can I call up the Outlook New E-mail Form??? > >I am looking at the outlook_tlb.pas…