Jump to content

Turan Can

  • Content Count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About Turan Can

  • Birthday 03/01/1870

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Turan Can

    WinInet API 4095 How can I remove this limit?

    I solved the problem thanks
  2. Hi All, When I want to download a page on the website, it downloads a maximum of 4095 bytes. How can I remove this limit? function TDownloadFile.WebGetData(const UserAgent: string; const Url: string): string; var hInet: HINTERNET; hURL: HINTERNET; Buffer: array [0 .. 10] of AnsiChar; BufferLen: Cardinal; dwTimeOut: DWORD; begin Result := ''; hInet := InternetOpen(PChar(UserAgent), INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0); if hInet = nil then RaiseLastOSError; try // dwTimeOut := 2000; // Timeout in milliseconds // InternetSetOption(hInet, INTERNET_OPTION_CONNECT_TIMEOUT, @dwTimeOut, SizeOf(dwTimeOut)); hURL := InternetOpenUrl(hInet, PChar(Url), nil, 0, INTERNET_FLAG_PRAGMA_NOCACHE or INTERNET_FLAG_NO_CACHE_WRITE or INTERNET_FLAG_RELOAD, 0); if hURL = nil then RaiseLastOSError; try repeat if not InternetReadFile(hURL, @Buffer, SizeOf(Buffer), BufferLen) then RaiseLastOSError; Result := Result + UTF8Decode(Copy(Buffer, 1, BufferLen)) until BufferLen = 0; finally InternetCloseHandle(hURL); end; finally InternetCloseHandle(hInet); end; end;
  3. Hi All, The foreground program works fine. However, when I open another program, it becomes disabled after a short while. What do we need to do to keep the background work going? I tried a thing or two but it didn't work. This feature exists but I couldn't find Delphide ..? "Use <android.permission.FOREGROUND_SERVICE permission: name =" " Uses Permissions - RAD Studio (embarcadero.com)
  4. Turan Can

    full screen view capture

    The problem is solved. I convert from the Java example. Thanks. It only receives the form you send. Please check the picture above.
  5. Turan Can

    Is there codec for FMX, Android Bitmap ?

    Remy, Thanks for the explanatory information.
  6. Turan Can

    Is there codec for FMX, Android Bitmap ?

    Hi All, FMX Project. "TBitmapCodecManager" doesn't support bitmap on Android? These are the only ones that come when I enter this "TBitmapCodecManager.SaveToStream(" method. POSIX jpg, tif, png WINDOWS jpg, tif, png, bmp ... for Descriptor in FBitmapCodecClassDescriptors do if (SameText(Extension, Descriptor.Extension, loUserLocale) or SameText('.' + Extension, Descriptor.Extension, loUserLocale)) and Descriptor.CanSave then -------------------------------------------------------------------- uses FMX.Graphics, FMX.Surfaces; var Stream: TMemoryStream; Surf: TBitmapSurface; begin Stream := TMemoryStream.Create; try Surf := TBitmapSurface.Create; try Surf.Assign(FBmpNew); //TBitmapCodecManager.RegisterBitmapCodecClass('.bmp', 'bmp', True, ......??? TBitmapCodecManager.SaveToStream(Stream, Surf, '.bmp'); finally Surf.Free; end; Stream.Position := 0; Stream.SaveToStream(FStream); finally Stream.Free; end;
  7. Turan Can

    full screen view capture

    Limelect, There is no code language issue for me. I am reviewing what you sent. Thanks a lot for the information. There are several api used in the code you sent, I'll review them.
  8. Turan Can

    full screen view capture

    Hi limelect, As I share in the picture, can it get the top bar and bottom bar showing clock and battery?
  9. Turan Can

    full screen view capture

    In the Java example, it did not capture the entire screen, but took a screenshot of the form it was attached to. so it is no different from the sample code I made. I think I need to take a screenshot with a handle from a plugin or api. but I could not find any examples android. Delphi, Java, C# xamarin I could not find an example of a full screenshot for android in these 3 languages. 1- Java sample 2- java sample
  10. Turan Can

    full screen view capture

    Hello everyone, Full screenshot. How do I capture the entire screen? In this example, I can take a screenshot of the open form. Sample; function MakeScaleScreenshot(Sender: TObject): TBitmap; var fScreenScale: Single; function GetScreenScale: Single; var ScreenService: IFMXScreenService; begin Result := 1; if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenService)) then begin Result := ScreenService.GetScreenScale; end; end; begin fScreenScale := GetScreenScale; Result := TBitmap.Create(Round(TfmText1(Sender).Width * fScreenScale), Round(TfmText1(Sender).Height * fScreenScale)); Result.Clear(0); if Result.Canvas.BeginScene then try TfmText1(Sender).PaintTo(Result.Canvas); // Sender.PaintTo( Result.Canvas); //, RectF(0, 0, Result.Width, Result.Height)); finally Result.Canvas.EndScene; end; end; procedure TfmText1.btnScreenClick(Sender: TObject); var B: TBitmap; begin B := MakeScaleScreenshot(Self); // MakeScreenshot(Image1); Image1.Bitmap.Assign(B); B.DisposeOf; end;
  11. Turan Can

    TrayIcon resfresh method

    Lars, Thanks for information I will investigate a little more. Because I only have problems with renewal refresh explorer icon cache. I hope I will find a method 🙂 https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-settings-app ms-settings:taskbar "explorer shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}" Shell execute list https://winaero.com/blog/clsid-guid-shell-list-windows-10/
  12. Turan Can

    TrayIcon resfresh method

    Hallo David, Ik heb een simpel probleem. This method you sent has worked. https://stackoverflow.com/questions/7877435/set-tray-icon-to-always-show I added the software to the trayicon section without the need for Windows settings. I have to do this for the icon to appear. Turn "Explorer.exe" on / off. Opening and closing the "Explorer.exe" file bothers the user. How can I renew "Explorer.exe" without closing / opening it?
  13. Turan Can

    TrayIcon resfresh method

    Hi All, What to do to reload the tray icon? I haven't tried 3 different methods, is there any different idea? The icon is inactive because my application started late. If I do this, the problem will be fixed. However, this is frustrating at every opening. taskkill /f /im explorer.exe start explorer.exe The methods I tried. ie4uinit.exe -ClearIconCache ie4uinit.exe -show CD /d %userprofile%\AppData\Local DEL IconCache.db /a EXIT https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shchangenotify SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETNONCLIENTMETRICS, 0, SMTO_ABORTIFHUNG, 100000, nil); SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil); https://superuser.com/questions/499078/refresh-icon-cache-without-rebooting https://github.com/crazy-max/IconsRefresh
  14. Make this setting for your previous version project. If this doesn't solve your problem, you should take advantage of "SetProcessDPIAware" api.
  15. Hi, Audio Transfer AEC ECHO cancellation. Vois Peer to peer, I did the sound transfer, but when the sound is turned on both sides, it starts mixing after a certain time. This is because the microphone listens to the sound coming from the speaker. An expert friend who can write paid, clean code is required. The echo is created due to the reflow of the incoming sound during mutual voice communication. To prevent this, I need the AEC eco function. As seen in the pictures below, this is my problem. I need a cleaner like the one below. Delphi Sample: InEchoClean(microphone, speaker, out.... bla bla Auxiliary documents are available in the links below. MSDN: https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/aec-system-filter https://github.com/RuudErmers/DelphiASIOVST-64-bit-Examples-2018/tree/master/DelphiASIOVST-v1.4 http://www.voip-sip-sdk.com/p_373-how-to-implement-voip-acoustic-echo-cancellation-voip.html http://startrinity.com/OpenSource/Aec/AecVadNoiseSuppressionLibrary.aspx https://github.com/xiph/speexdsp/tree/master/libspeexdsp