Anasayfa / Etiket Arşivi: delphi

Etiket Arşivi: delphi

CreateFirebirdDB Firedac

Firebird DB Create Delphi Fdconnection nesnesi ile firebird database oluşturmak için kullandığım kod parçası.               function CreateFirebirdDB(const ClientLibPath :string; const DbPath:string; const Username:string; const Password:string; const Dialect :SmallInt=3; const CharacterSet :string ='UTF8'; const Page_Size:integer=16384; DefCharacterSet:string ='UTF8'):Boolean; var FdConn :TFDConnection; FdScript :TFDScript; sVal :string; begin …

Devamını Oku »

Object Pascal TFormatSettings

Object Pascal TFormatSettings Format Settings uses System.SysUtils Winapi.Windows formatSettings : TFormatSettings; {$REGION 'SET FORMATSETINGS'} GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, formatSettings); formatSettings.ThousandSeparator := ','; formatSettings.DecimalSeparator := '.'; formatSettings.DateSeparator := '.'; formatSettings.TimeSeparator := ':'; formatSettings.ShortDateFormat := 'dd.mm.yyyy'; formatSettings.ShortTimeFormat := 'hh:mm'; formatSettings.LongTimeFormat := 'hh:mm'; {$ENDREGION}  

Devamını Oku »

Object Pascal TDateTime türü

TDate Time türü aslında kayan noktalı bir sayıdır. Bu sayının tam kısmı 12/30/1899 tarihinden, OLE otomasyonu ve Microsoft Win32 uygulamaları tarafından kullanılan temel tarihten bu güne kadar geçen gün sayısını gösterir.(Daha önceki yılları belirtmek için eksi değerler kullanmak gerekir) ondalık kısmı ise zamanı gösterir. Örneğin : 3,75 değeri 1990 yılının …

Devamını Oku »

Firebird Error loading plugin Engine12 Error loading plugin Engine12 plugins/Engine12 exists but can not be loaded.

Error loading plugin Engine12 Module D:\FBEMBED3\plugins/Engine12 exists but can not be loaded. bilgisayarım da firebird 2.5 versiyonunu kullanıyorum ama firebird  3 bir veritabanına bağlanmam gerekti bunun için firebird 3 embed versiyonunu indirdim. D:\FBEMBED3 klasörüne dosyaları çıkardım delphi tarafında conFb.Disconnect; conFb.Server:=fbServer; conFb.Database:=fbDatabase; conFb.Username:=fbUsername; conFb.Password:=fbPassword; conFb.Port:=fbPort; conFb.SpecificOptions.Values['Charset']:=fbCharset; if fbUseUnicode then conFb.SpecificOptions.Values['UseUnicode']:='True' else …

Devamını Oku »

Delphi cxGridPopupMenu Style problemi ve çözümü

Uygulamamda Güncel delphi sürümleri ile gelen native skinleri kullanmak istedim her şey çok güzeldi taaki cxGridPopupMenu ye ihtiyacım olduğunda bana aşağıdaki gibi bir görüntü vermesi ile hüsran oldu Çözümü https://stackoverflow.com/questions/24596253/delphi-xe6-issue-with-styled-menus-with-invisible-items https://github.com/rruz/vcl-styles-utils indirip zipten çıkardıktan sonra comon klasörünü Tools->Options->Library->Library Path D:\SIZIN_DOSYA_YOLUNUZ\vcl-styles-utils-master\Common ve D:\SIZIN_DOSYA_YOLUNUZ\vcl-styles-utils-master\delphi-detours-library Pathlerini Ekliyoruz. Daha sonra projemize Vcl.Styles.Utils.Menus, Vcl.Styles.Utils.SysControls, Vcl.Styles.Utils.SysStyleHook, …

Devamını Oku »

Object Pascal Ram Kullanımını Öğrenme

function CurrentMemoryUsage: Cardinal; var PMC: PsAPI.TProcessMemoryCounters; // receives info about process memory begin Result := 0; // default result on error or if not supported on OS PMC.cb := SizeOf(PMC); if PsAPI.GetProcessMemoryInfo( Windows.GetCurrentProcess, @PMC, SizeOf(PMC) ) then Result := PMC.WorkingSetSize; end; Gerekli unitler: SysUtils, Windows, PsAPI.

Devamını Oku »

Delphi Mac Adres Öğrenme

Bilgisayarda ilk ethernet bağdaştırıcısının mac adresini döndürür bağdaştırıcı yoksa veya hata durumunda boş dize gönderir unit unit1; interface uses SysUtils, Windows, Nb30; function GetMacAddress: string; implementation function GetMacAddress: string; type // This type is defined in MSDN sample code, but tests have found this is // not needed (on XP …

Devamını Oku »