Jump to content

aehimself

Members
  • Content Count

    1030
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by aehimself

  1. aehimself

    PPPoW simply for Delphi XE Starter

    I'm not entirely sure if that is the case but what I understood you want to write your own program to communicate with (and maybe to control) said thremostat. To do that you'll either have to have the full protocol description used (which the manufacturer can provide) OR you have to reverse-engineer it by yourself. Be warned though - reverse-engineering even a part of a propriatery solution might be completely forbidden by the EULA and / or your regional law so make sure you are permitted to do so. If you can and would like to proceeed you don't need any Delphi application for that; just install Wireshark and connect with your PC program. That will give you enough hints to start.
  2. aehimself

    Thread Destroy with no corresponding Thread Create?

    If you have FreeOnTerminate := True and you call .Free, you can have 2 destructors but one will raise an AV as you are .Free.ing the StringStream instead of FreeAndNil.
  3. Hello, I have an application which utilizes DimPanels. A couple of days ago I was notified that there are some buttons barely visible; however they are supposed to be on a solid background. The issue is, something is being drawn different when the application is executed in an RDP window. Locally I receive a solid form while through RDP everything is transparent, revealing the component underneath: Attached is the minimum test case... it simply creates a DimPanel on the form and embeds an empty frame into it. The solution is rather easy: enable ParentBackground in the DimPanel or disable ParentBackground on the frame. My question is; does anyone know why drawing differs? DimPanelTest.7z
  4. aehimself

    Delphi 12 VCL painting differs through RDP

    Talking about the small program I attached; it is not present in the code or in the DFM - you are right about that. That means it is using the default, which is False for DoubleBuffering. At least this is how I believe it should work.
  5. aehimself

    Delphi 12 VCL painting differs through RDP

    Aaaaand jackpot! Adding Application.SingleBufferingInRemoteSessions := False solves the issue for good, no more dimmed memo is visible through RDP! The only question which I have remaining - if DoubleBuffered is false everywhere in the test application, how come enforcing single buffering makes a difference? Shouldn't that be the default, if .DoubleBuffered is false on the form and on the frame?
  6. aehimself

    Delphi 12 VCL painting differs through RDP

    Even if DoubleBuffered is on for the frame and the form, and Application.SingleBufferingInRemoteSessions is true, I still see the memo in the test application if I execute it in an RDP window. No, double buffering seems to have no effect on this particular issue.
  7. aehimself

    Delphi 12 VCL painting differs through RDP

    Interesting read! Do I understand it correctly that if you do NOT override anything, themed and un-themed controls do not use double buffering (even if set in object inspector) if a remote session is detected? If yes, it means we can completely exclude double buffering as a potentional suspect for this particular issue. But, it actually reminded me to also note: the issue only appears on the system (Windows) style. If any custom style is selected, the frame (panel?) will become solid again.
  8. aehimself

    Delphi 12 VCL painting differs through RDP

    Double buffering is a valid point as it's turned on in my main application. It is however is off in the test program, and unfortunately enabling it (and changing DoubleBufferedMode) doesn't change the behaviour.
  9. aehimself

    Delphi 12 VCL painting differs through RDP

    Logging on to the same machine with the console session does not reproduce the issue. Also, I doubt RDP is at fault, as it only affects Delphi 12 binaries.
  10. aehimself

    Delphi 12 VCL painting differs through RDP

    Confirmed. When building the same project with Delphi 11.2 the panel shows up solid, so this seems to be a Delphi 12 "issue". ...but why only through RDP? Edit: updated topic title
  11. aehimself

    Delphi 12 VCL painting differs through RDP

    Well that’s something I didn’t think of as a possible root cause, that’s why I did not mention that I am using D12 to compile. I tried on remote Windows 10 and Server 2019, both behaved the same way. I’ll check with some earlier Delphi versions.
  12. aehimself

    Delphi 12 VCL painting differs through RDP

    Settings are the highest possible as I was testing it on a local VM where connection speed isn't an issue. While the idea is good, disabling bitmap caching did not solve the issue. What I am really interested of is that in DimPanel I am not calling inherited in the overridden Paint method. How come ParentBackground has any actual effect...? Probably some weird window message to set the color, I don't know...
  13. aehimself

    Typo in TWMDPI record in Delphi 10 Seattle ?

    It seems the typo was not very long lived. Delphi 10 Seattle Delphi 10.1 Berlin Update 2
  14. aehimself

    pdf417

    The Wikipedia page @Lajos Juhász linked clearly explains you cannot use anything else other that a..z and A..Z: As for UTF8 that is used in PDF documents, which is not the same as the barcode format.
  15. aehimself

    Free profiler?

    That's a good thing!
  16. aehimself

    GetWindowHandle + Ctrl V

    The component itself already heavily relies on generics and other quality-of-life improvements later versions brought so as it is no, it won't compile. However, the base principle is SendInput and an array of TInput records which should be present / can easily be imported in D7. Since it does nothing else but translating your string into TInputs and call the WinApi method, with a little bit of work invested (which I was too lazy to do so) yes, it should work just fine.
  17. aehimself

    GetWindowHandle + Ctrl V

    In the past I had an application which imitated keypresses to type text to any field in any application using SendInput. Later the typing logic has been extracted and is now accessible as TAEVirtualKeyboard for generic unicode or TAEVirtualEnUsKeyboard for forced EN-US keyboard layouts. The backdraw is, for this to work the window and the input field has to have focus. It might be a good starting point still, though.
  18. aehimself

    Gitlab-ci & MSBUILD & Library path

    As an alternate, the path where this file is attempted to be loaed from can be changed in Program Files\Embarcadero\Studio\xx\bin\Codegear.Common.Targets inside the PropertyGroup tag. This is what we ended up using on Azure DevOps at work: Be careful, though. Changing these to a static path will result all users on the same machine to use the very same environment.proj and/or envoptions.proj. This might be, or might not be wanted.
  19. Importing an other 3rd party library seems to be a huge overkill just to use a simple mutex. I have the following code in my .dpr file before any form creations: handle := CreateMutex(nil, True, 'MyAppName'); Try If (handle = 0) Or (GetLastError = ERROR_ALREADY_EXISTS) Then Begin // TMessageDialog.ShowDialog('Only one instance can be running at a time!', dtError); handle := FindWindow('TMyApplicationMainForm', nil); If IsWindow(handle) Then Begin ShowWindow(handle, SW_RESTORE And SW_SHOW); SetForegroundWindow(handle); SetFocus(handle); End; Exit; End; // Form creations, initialization, run here originally from .dpr Finally CloseHandle(handle); End; Works like a charm, and you only need WinApi.Windows.
  20. aehimself

    New User / New UI Tutorial

    What about dimming out your UI and showing the wizard in the middle, in front of the dimmed UI? A while ago I managed to create a panel which does just that, feel free to check it out. How to "dim" a TabSheet? - VCL - Delphi-PRAXiS [en] (delphipraxis.net)
  21. aehimself

    Bringing the IDE automatically to the foreground?

    This bothered me for ages and never could figure out when it opens in the background and when it opens "correctly". What is even more strange I forgot about this behavior when I wrote my BDSLauncher... anyway, now it will attempt to bring the selected instance to the foreground after the file has been opened. Thank you for reminding!
  22. aehimself

    Any delphi components for VNC or RemoteDesktop?

    It indeed exists, and works as advertised. I grabbed installation instructions from somewhere a long time ago: - Component -> Import Component -> Import ActiveX Control -> Select Terminal Services (mstscax.dll) - Palette page: MsTSC, unit dir name: Delphi Lib folder, Search path: empty. Check Generate component wrappers - Install to New package - Enter the same name (MsTSCLib_TLB.dproj) under Delphi Lib folder - Try to build package just to fail - Change Property type of ConnectWithEndpoint to "OleVariant", build package again - Right-click on MsTSCLib_TLB.bpl in Project manager and select "Install" After this different versions of the control will appear on the palette and everything can be set (RD gateway, compression, audio redirection, key capture, etc.) via properties what mstsc.exe allows. Kinda handy stuff.
  23. aehimself

    StringGrid: how to get the column number via right-click

    I'm using the following code in my custom DBGrid-descendant to have a separate popup menu for the content and the header, which works well. I suppose with little to no modification it can be applied to a TStringGrid too: Procedure TDBGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Var gc: TGridCoord; Begin If Button = mbRight Then Begin gc := Self.MouseCoord(X, Y); If gc.Y > 0 Then _gridpopup.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y) Else If gc.Y = 0 Then Begin _colindex := gc.X; If dgIndicator In Self.Options Then Dec(_colindex); _headerpopup.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y); End; End Else inherited; End; _gridpopup is the content popup menu, _headerpopup is the popup menu for the header, _colindex is an integer which can be used later on to determine which column the popup menu was popped up from.
  24. aehimself

    Delphi 11.3 : FORSAKEN

    The VS2022 you mean which ate up all 16 gigs of memory just when loading the project on all of the developer PCs, finally crashing the OS itself? Not sure if it got fixed since then, but the same project works just fine in 2019; this is why we are not switching. And btw, VS2019 still receives patches. We are all biased, we all have a preference towards one IDE or an other. The important thing is to stay objective even when we get frustrated.
  25. aehimself

    Delphi 11.3 : FORSAKEN

    Even at work, where we have DevExpress and a number of other, chunky components installed the IDE loads our big legacy project up in less than 20 seconds. Add 10-15 more seconds of compiling and I am in debugging. Compare that with VS2019, which needs ~1min until IntelliSense kicks in, 1,5 min of compiling, 10 seconds of after-compilation-thinking and finally the project launches. I'm sure there are faster IDEs out there, but Delphi really isn't that bad from startup perspective.
×