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…
No TabStops in DLL?!?
>This all works, except for some reason I can’t switch between edit boxes >using tabs from the dll. It worked fine in the…
General: D5/D6 Error with DB-Access
Q: —- I have two query connect to DBDemos. Query1.sql select name from country Query2.sql (connect to query1) select * from country where…
JPEG: Read/write JPEG from/to Database
[code lang=”delphi”]PEGStream : TBLOBStream; JPEGImage : TJPEGImage; JPegImage := TJPEGImage.Create; JPEGStream := TBLOBStream.Create(TBLOBField(Table1.FieldByName(‘JPGImage’)),bmRead); JPegImage.Loadfromstream(JPEGSTREAM); JPegStream.Free [/code] [tags]Delphi, Database[/tags]