Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Categoria: Programmazione

Digital Innovation Partner

Execute or open a file with Delphi on all platforms

Platform : Delphi XE5 Update 2 Only a function to open file in Windows,Android, Ios…. Windows –> shellExecute Android –> sending an intent to SO Ios –> using NSUrl uses … IdGlobalProtocols,{$IFDEF MSWINDOWS}, WinFolderSelectUtils {$ENDIF} {$IFDEF MSWINDOWS }, WinAPI.ShellApi, WinAPI.Windows {$ENDIF} {$IFDEF ANDROID} ,FMX.Helpers.Android, Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Net, Androidapi.JNI.JavaTypes, idUri,Androidapi.IOUtils {$ENDIF ANDROID} {$IFDEF IOS} ,iOSapi.Foundation, FMX.Helpers.iOS {$ENDIF…
Leggi tutto

Generate UID with Delphi

to generate uid or GUID with delphi: program Guid; {$APPTYPE CONSOLE} uses SysUtils; var Uid: TGuid; Result: HResult; begin Result := CreateGuid(Uid); if Result = S_OK then WriteLn(GuidToString(Uid)); end.

TidHTTPServer decode content type multipart/form-data

Come tutti sappiamo, creare un webServer con Delphi è semplicissimo, cosa meno banale è invece decodificare una post che che contiene un multipart/form-data. Quando una paginetta http esegue una http submit da un form in metodo post, magari con un file in upload il browser genera uno stream codificato in UTF8 in cui ci sono…
Leggi tutto

Export from FastReport 4 to PDF Stream

Con FastReport 4 esportare un report in PDF su stream è semplicissimo, bastano 5 minuti … peccato che non è spiegato nella documentazione, quindi per capire come funzionava l’arcano ci ho perso due ore… di seguito una porzione di codice come esempio: procedure TForm1.Button3Click(Sender: TObject); var st : TMemoryStream; begin st := TMemoryStream.Create; Try TBlobField(csReports.FieldByName(‘Report’)).SaveToStream(st);…
Leggi tutto

FasteReport 4 per Firemonkey [fast-reportFMX]

Il famoso report designer per C++, Delphi e DotNet è ora disponibile nella varsione per il framework grafico Firemonkey. Grazie a quest’estensione di Fast-Report è possibile combinare designer e engine-report in applicazioni cross-platform. Il nome del progetto è appunto fastreportFMX , questo tool è ovviamente compatibile con le versioni di rad-studio dalla XE2 in su.…
Leggi tutto

[Android] how to import android contacts in your application

A very simple way to search, select and import contact information from your phone (Android Contacts) to your android app is: 1) Send the specific android intent “ACTION_PICK”: private void startContactPicker() { Intent contactPickerIntent = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI); startActivityForResult(contactPickerIntent, CONTACT_PICKER_REQ_CODE); } This intent will do for us and “for free” the operation of opening the…
Leggi tutto