![]() |
|
Masaüstü - Baskı Önizleme +- Delphi Can (https://www.delphican.com) +-- Forum: Delphi (https://www.delphican.com/forumdisplay.php?fid=3) +--- Forum: Mobil Platform - FireMonkey (FMX) (https://www.delphican.com/forumdisplay.php?fid=7) +--- Konu Başlığı: Masaüstü (/showthread.php?tid=1880) |
Masaüstü - serhat - 25-01-2018 Merhaba; firemonkey tarafında "MAX_PATH" nette bu konuyla ilgili bir şey bulamadım, firemonkey masaüstünü nasıl bulabilirim? function GetSystemPath(Folder: Integer): string; // Masa Üstü Yolu var PIDL: PItemIDList; // uses ShlObj, ActiveX Path: PChar; AMalloc: IMalloc; begin Path := StrAlloc(MAX_PATH); SHGetSpecialFolderLocation(Application.Handle, Folder, PIDL); if SHGetPathFromIDList(PIDL, Path) then Result := Path; SHGetMalloc(AMalloc); AMalloc.Free(PIDL); StrDispose(Path); end; Masaüstü - SimaWB - 26-01-2018 Sorun sadece MAX_PATH ise onun yerine 260 yazıp devam edebilirsiniz. Ama kullandığınız komutlar Windows'a özel gözüküyor. Buna dikkat edin. Masaüstü - klavye - 26-01-2018 Asagidaki link belki isini gorur. http://www.malcolmgroves.com/blog/?p=865 Cvp: Masaüstü - savasabd - 26-01-2018 Yanlış anlamadıysam masaüstünün path bilgisini soruyorsunuz. Firemonkey'de Windows'un masaüstünün path bilgisini aşağıdaki şekilde alabilirsiniz.
System.SysUtils.GetEnvironmentVariable('USERPROFILE')+PathDelim+'Desktop';
Şu linkte bu fonksiyonla hangi bilgileri alacağınız mevcut.
Masaüstü - SimaWB - 26-01-2018 HomePath için daha da iyisi TPath.GetHomePath kullanılabilir Cvp: Masaüstü - savasabd - 26-01-2018 (26-01-2018, Saat: 11:49)SimaWB Adlı Kullanıcıdan Alıntı: HomePath için daha da iyisi TPath.GetHomePath kullanılabilir Hocam windows'ta tam olarak homepath'i getirmiyor bu fonksiyon,getdirdiği path bilgisi şu:C:\Users\<username>\AppData\Roaming. Şu linkten bakılabilir. Masaüstü - SimaWB - 26-01-2018 Evet, ben de o linki paylaşmıştım zaten ![]() Platform'a göre hangi değerleri döndüğü buradaki tablodan çok kolay anlaşılıyor. Desktop'a bir şekilde kolayca ulaşılabilir: http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Standard_RTL_Path_Functions_across_the_Supported_Target_Platforms Masaüstü - savasabd - 26-01-2018 Evet bu konuda hemfikirim, ama daha iyisi olduğu konusunda ihtilaftayız .Aslında ben de yorumu güncelledim,en kısa yol System.SysUtils.GetEnvironmentVariable('USERPROFILE')+PathDelim+'Desktop'; bu gibi görünüyor.
Cvp: Masaüstü - brs - 26-01-2018 Bunlarda benden olsun;
Memo1.Lines.Add('System.IOUtils.TPath.GetLibraryPath='+System.IOUtils.TPath.GetLibraryPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetDocumentsPath='+System.IOUtils.TPath.GetDocumentsPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetHomePath='+System.IOUtils.TPath.GetHomePath);
Memo1.Lines.Add('System.IOUtils.TPath.GetSharedAlarmsPath='+System.IOUtils.TPath.GetSharedAlarmsPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetPublicPath='+System.IOUtils.TPath.GetPublicPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetSharedDocumentsPath='+System.IOUtils.TPath.GetSharedDocumentsPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetDownloadsPath='+System.IOUtils.TPath.GetDownloadsPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetMoviesPath='+System.IOUtils.TPath.GetMoviesPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetMusicPath='+System.IOUtils.TPath.GetMusicPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetPicturesPath='+System.IOUtils.TPath.GetPicturesPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetRingtonesPath='+System.IOUtils.TPath.GetRingtonesPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetSharedDownloadsPath='+System.IOUtils.TPath.GetSharedDownloadsPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetSharedMoviesPath='+System.IOUtils.TPath.GetSharedMoviesPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetSharedMusicPath='+System.IOUtils.TPath.GetSharedMusicPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetSharedCameraPath='+System.IOUtils.TPath.GetSharedCameraPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetSharedPicturesPath='+System.IOUtils.TPath.GetSharedPicturesPath);
Memo1.Lines.Add('System.IOUtils.TPath.GetSharedRingtonesPath='+System.IOUtils.TPath.GetSharedRingtonesPath);
|