Jump to content

Lajos Juhász

Members
  • Content Count

    828
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by Lajos Juhász


  1. I can confirm using both OnClick and OnChange events that I can receive:

    45113
    -700000
    45113
    -700000
    45113
    -700000
    45113
    -700000
    45113
    -700000
    45113
    -700000
    45113
    -700000
    45113
    -700000
    45113
    -700000
    45113
    -700000
    45113
    -700000
     


  2. 28 minutes ago, bravesofts said:

    last question:

    is it impossible to create threads in mobile devices while avoiding the main app thread from going to the next line of code until tasks complete ?

     

    No. The reason to create a thread is to move to the next line without waiting for a block of code (inside the thread) to complete.  That's the purpose for threads in every platform.

     

    • Like 1

  3. 4 minutes ago, bravesofts said:

    Is there a safe solution to block the main thread smoothly without freezing the app while waiting our task to complete "using the right task way above.. " Especially in mobile devices

    On mobile devices you should never block the main thread (or risk that the OS will terminate your program).

     

    Without more details we cannot help you. Most probably you want to disable the UI elements that are not allowed while your background thread is executing. 

    • Like 1

  4. you can ask AI to write this code. An anser from Bing

     

    function IsSundayBetween(StartDate, EndDate: TDateTime): Boolean;
    var
      Day: TDateTime;
    begin
      Result := False; // assume there is no Sunday between the dates
      Day := StartDate; // start from the start date
      while Day <= EndDate do // loop until the end date
      begin
        if DayOfWeek(Day) = 1 then // check if the day is Sunday
        begin
          Result := True; // set the result to true
          Break; // exit the loop
        end;
        Day := Day + 1; // increment the day by one
      end;
    end;

     


  5. 13 hours ago, James Steel said:

    Thanks for the additional suggestions. It is very strange that no changes had been made when the stock overflow errors started. Some file may have become corrupted. It would be great if there were a better way to debug the problem rather than starting over and re-installing all the third-party components.

    There is one acient technique: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Testing_Installed_Components


  6. If you enable Runtime Themes you delegate the drawing for some components to Windows and the colors from the Active Windows Theme is used. In ancient versions of Delphi this was done through XPManifest.

     

    You can use VCL Styles to customize the drawing.


  7. 10 minutes ago, Fr0sT.Brutal said:

    Why not just do FindFirst(root+pattern) where pattern could be either mask or exact name?

    One possible reasould could be that FindFirst would not return subfolders that doesn't match the pattern.

     

    If agree there are bugs for example (SR.Attr and faDirectory) = SR.Attr should be (SR.Attr and faDirectory) = faDirectory


  8. Your code is working for me.  A note that you're leaking memory findfirst will allocate some memory and that must be released with FindClose(SR). Also you should never write Form1.Listbox1.

×