Jump to content

Brian Evans

Members
  • Content Count

    412
  • Joined

  • Last visited

  • Days Won

    5

Brian Evans last won the day on April 29

Brian Evans had the most liked content!

Community Reputation

122 Excellent

Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

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

  1. Brian Evans

    Debugger keeps the execution line centered

    Some random questions: 1. Do you have multiple screens with one using a different DPI setting? 2, Anything non-default DPI wise? launch settings, overrides etc Thoughts: could be a bad calculation of if the line to be highlighted is visible and scrolling the editor when it doesn't need to.
  2. My understanding is for expressions with variants non-variants are converted to a variant and operations like + follow Windows OLE (varAdd) in how they are combined. Neither cares about the order of variants/types just about combinations. string + variant with BCD value becomes variant with string value + variant with BCD value. For adding variants string+number or number+string both add numbers. Ref: https://docwiki.embarcadero.com/RADStudio/Athens/en/Variant_Types_(Delphi)#Variants_in_Expressions Ref: https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-varadd#remarks
  3. Brian Evans

    Help with JWToken

    The integer part is seconds since the Unix Epoch so is a Unix timestamp. Some sources add fractional seconds so they can contain timestamps with more accuracy.
  4. Brian Evans

    Slow performance. HELP!

    Storage IO suddenly being slower will cause similar symptoms. All writes and any reads that need to get data from the disk instead of the cache bottleneck. Things that used to not interfere with each other now do. Years ago a battery on a RAID card in a SQL Server cluster failed making write performance 5% of normal. All sorts of odd issues until the anemic disk performance was noticed and bunch of disk heavy tasks were temporarily disabled to allow the main work to still get done.
  5. Brian Evans

    KSVC 8.0

    Removed 7 and installed 8 here. No 64-bit design time packages so not yet available in the 64-bit Initial Release of the Delphi 12 IDE. Looking at the contents of C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\KonopkaControls-290-8.0_For12.3\Bin\Win64 there does seem to be 64-bit design time packages but they were not installed? Manually copied the two design time BPLs to C:\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl\Win64, did Component -> Install Packages, Add, selected them both and installed them. Some basic tests and they seem to work.
  6. Brian Evans

    Delphi 12.3 Patch and McAfee

    Most Antivirus software also have a way to submit false positives for further analysis. If they agree they white list the file names and hashes that otherwise trigger their heuristics based scanning engine. Helps others and you don't have to maintain commercial applications in your own whitelist long term.
  7. Brian Evans

    identify whether a TMenuItem is a top-level menu bar item

    Still - where and why? - in a lot of cases you can already know when your code is called. For example OnDrawItem is set per item so you can just assign one procedure for main menu items and another for the rest.
  8. Brian Evans

    identify whether a TMenuItem is a top-level menu bar item

    One approach: The Items property has a find() method that searches for a match of a caption passed in. It ignores & to make matching easier. So if you have a reference to the main menu you can do mainmenuref.items.find() passing in the caption of the menu item you wish to test. function isMenuMenuItem(MainMenu : TMainMenu; MenuItem : TMenuItem) : boolean; begin If MainMenu.Items.Find(MenuItem.Caption) <> nil then result := true else result := false; end;
  9. Brian Evans

    identify whether a TMenuItem is a top-level menu bar item

    Note that is the wrong inner loop statement. It needs to go a level deeper. FixItem (aMenu.Items[I].items[k]);
  10. Brian Evans

    identify whether a TMenuItem is a top-level menu bar item

    Use two loops to start with so you iterate into sub menu items before calling FixItem(). Then FixItem() only gets submenu items and can be simplified. for I := 0 to aMenu.Items.Count - 1 do for k := 0 to aMenu.items[i].Count -1 do FixItem (aMenu.Items[I].items[k]);
  11. Brian Evans

    12.3 and certaing PNGs: error rendering them

    Well that is a new hell: the forum screws with the image. Also can't seem to delete the image I attached which ended up showing the same issue - size and bit depth messed with by the forum. Looks like it is display issue - click the image to bring up large view, click the large view to bring up a fuller view - now that shows the original uploaded image which you can right click and save image as .. to get the proper bit depth and resolution that was uploaded. If I load the image in your first post which is a 23kb 500x500x32 PNG into a TImage using the IDE it looks normal. Note the image itself does have gray pixels around the edges and borders of the squares - it is not black and white. The 2kb 912x912x1 PNG in the DFM does display oddly both on the form and in the IDE image property editor. In Windows explorer and other image editors I tried it looks normal. It has only black and white pixels. So the IDE does seem to have an issue with the 1 bit per pixel PNG. Can work around it by using a higher bit depth it seems but Delphi should really be fixed as the IDE exhibits the same issue. Attached is the 912x912x1 image re saved using MS Paint as a 9kb 912x912x32 PNG which works fine as well.
  12. Brian Evans

    12.3 and certaing PNGs: error rendering them

    A image showing what "rendered incorrectly" looks like would make it a lot easier to confirm reproduction.
  13. Brian Evans

    Exception not caught

    The debugger catches them before they are handled in the application/project not after. When shown by the debugger there is a checkbox to ignore that class of exception going forward.
  14. Brian Evans

    D12.3 IDE starts extremely slow

    In Windows Defender you can exclude by process in addition to by file/folder/file type. Process: Adding an exclusion for a process means that any file opened by that process will be excluded from real-time scanning. These files will still be scanned by any on-demand or scheduled scans, unless a file or folder exclusion has also been created that exempts them Tip: It's recommended that you use the full path and file name to exclude a specific process. This makes it less likely that malware could use the same filename as a trusted and excluded process and evade detection. Ref: Virus and Threat Protection in the Windows Security App - Microsoft Support Final note about testing IDE start speed: Windows Defender does cache real-time scanning results so IDE launches after the first will be faster even with no exclusions.
  15. There are network profiles in Windows which can be Private, Public or Domain. Normally your home network would be Private and anytime you go elsewhere it would be Public (discovery disabled) or Domain. You could check what the active connection is. Or just key off the active profile name for what network settings your application should use. Snippet below for PowerShell. Get-WmiObject MSFT_NetConnectionProfile -Namespace root/StandardCimv2 | select Name,@{n='ActiveNetworkProfile';e={ switch ($_.NetworkCategory){ 0 {'Public'} 1 {'Private'} 2 {'Domain'} Default {$_.NetworkCategory} } } }
×