Jump to content

Der schöne Günther

Members
  • Content Count

    656
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by Der schöne Günther

  1. Yes, I had seen that, and it looks incredibly capable and powerful. If I had a use case, I would certainly try it out. I was just trying to say that, unless you already had completely platform and UI-independent Pascal code (and a use case for it), I don't really see what you would use it for. A bit like a solution, still looking for a problem.
  2. Der schöne Günther

    Has anyone tried running Delphi on Windows ARM?

    Can you confirm it cannot only build projects but also debug them?
  3. A lot of Delphi code (at least the one I deal with) is often plagued by VCL or Windows platform dependencies. Not going to run in a browser anyway.
  4. Der schöne Günther

    Build managed dll in Delphi

    Why not stick with a native dll and use that from .net? Platform Invoke (P/Invoke) | Microsoft Docs
  5. Der schöne Günther

    Elevation...

    I assume "I get an OS error" means "CreateProcess(..) returns false and GetLastError() will then return ERROR_ELEVATION_REQUIRED". Is that correct? If so, it appears that CreateProcess(..) cannot be used to automatically handle the UAC prompt and everything beyond that for you. Use ShellExecute(..) instead. (Source: Using the ElevateCreateProcess Fix | Microsoft Docs)
  6. Der schöne Günther

    changing inherited control

    I might be missing something, but if you need to do that, why are you omitting the override; behind your declaration?
  7. Der schöne Günther

    Delphi 10.4 : Unlock Windows by call to Windows API

    I believe you will still have to get familiar with Windows Desktops: Desktops - Win32 apps | Microsoft Docs
  8. Der schöne Günther

    Delphi 10.4 : Unlock Windows by call to Windows API

    The login screen is an entirely different "desktop" (not to be confused with "Virtual desktops" which were introduced with Windows 10), much like an elevation prompt ("user account control"). An application that runs without administrative privileges cannot access that "secure desktop" the login screen is running on. You can, for example, also see this with other solutions like TeamViewer or AnyDesk: When they don't have administrative privileges and the user locks his account, they can't do anything.
  9. Der schöne Günther

    Does C++ Builder have code completion?

    It's been a few years since I last did something with C++ Builder. I just freshly installed 10.4. I created a new project from scratch. It compiles on Win32 and Win64, but there is no code completion, [Ctrl]+[Space] does nothing at all. I see that C++Builder and Platforms Support - Embarcadero Blogs - Developer Tools - IDERA Community states Embarcadero strives to provide a "fully functional code completion". Does that mean that there is at least a partly functional code completion? If yes, how can I enable it?
  10. Der schöne Günther

    after updating to windows 20h2 i can't register bcb 6 anymore

    I would honestly consider running 20 year old software in a virtual machine, not a real one.
  11. Der schöne Günther

    Thread Issues: using resume and start

    Just as an information, here is what the documentation says about CreateAnonymousThread(..): That directly contradicts your error message Strange.
  12. Der schöne Günther

    Keyboard shortcut to move current line up or down?

    Alt+Shift+[Up/Down]
  13. Not entirely true. There is a property "SelectedEngine" and "ActiveEngine", but as usual, there is no documentation: SHDocVw.TWebBrowser.SelectedEngine - RAD Studio API Documentation (embarcadero.com) You can, however, read a bit about it here: Using TEdgeBrowser Component and Changes to the TWebBrowser Component - RAD Studio (embarcadero.com) PS: As far as I remember, if you chose to ship your own, fixed runtime, you can also set an environment variable in your process and the Edge runtime will pick it up: Globals | Microsoft Docs
  14. Der schöne Günther

    Delphi 10.4.2 TWebBrowser navigate URL

    The "Navigation to web page was cancelled" indicates that this rendered by Internet Explorer. You either had an internet explorer plug-in for rendering PDFs (like Adobe Reader), or you had your TWebBrowser set to use Edge instead of Internet Explorer. Edge displays PDFs flawlessly with no external dependencies.
  15. Der schöne Günther

    Remote desktop friendly

    The IDE has (or had?) terrible problems with resolution changes, like changing the size of your remote desktop window which also includes connections to Hyper-V VMs. It often got stuck for a minute or completely locked up. It seems they have fixed that with 10.4.2: Delphi 10.4.2: Improvements for Microsoft Remote Desktop sessions – FlixEngineering LLC
  16. Der schöne Günther

    Refactor menu grayed out for Rename...

    Sidenote: I sometimes have this with 10.0 Seattle, so this is not necessarily related to 10.4.2.
  17. Der schöne Günther

    JSON array name.

    An array is just an element, like any other. A Json Object is made up of pairs. Every pair has a name and a value. A value can be an array, text, float, ... Here is an example: program Project1; uses System.SysUtils, System.JSON; const input = '{'+ ' "someNumbers": [1,2,3],'+ ' "justOneNumber": 42,'+ ' "some Texts": ["Hello World", "My body is ready"]'+ '}'; var jsonObject: TJsonObject; pair: TJsonPair; begin jsonObject := TJsonObject.ParseJSONValue(input) as TJsonObject; for pair in jsonObject do if(pair.JsonValue is TJsonArray) then WriteLn('We found an array called "', pair.JsonString.Value(), '"'); ReadLn; end. It will output the following: We found an array called "someNumbers" We found an array called "some Texts"
  18. Der schöne Günther

    Delphi EdgeBrowser Sample Project Fails

    Well, that's a stupid limitation of Embarcaderos example project, but not Edge itself: if not StartsText('http', URL) then URL := 'http://' + URL; RADStudio10.4Demos/MainFormU.pas · Embarcadero/RADStudio10.4Demos (github.com)
  19. Der schöne Günther

    Delphi EdgeBrowser Sample Project Fails

    Did you read this? Using TEdgeBrowser Component and Changes to the TWebBrowser Component - RAD Studio (embarcadero.com) TL;DR: You need to install the WebView2 runtime, or a beta version of Edge, or ship your own files. Also, you must place the "WebView2Loader.dll" in your project directory, as explained in the wiki article above.
  20. Der schöne Günther

    Quickly zero all local variables?

    That may be true in your case, but zeroing a local variable "just in case" for a method that gets called over and over defenitely is a performance hit.
  21. Der schöne Günther

    Undocumented language enhancements

    Not highly scientific, but better than nothing: Delphi Language Reference - RAD Studio (embarcadero.com)
  22. Der schöne Günther

    Is Delphi still taught in schools?

    I remember that in my school time, it was definitely Delphi, but for my brother (a few years later) they had already switched to Java. I think Embarcadero has a education program which basically licenses Enterprise editions, but I am not sure how complicated it is to setup. It's most probably easier for schools (especially smaller ones) to just go with Java or Python. C or C++ is, in my view, definitely a very bad choice for absolute beginners 😱
  23. Der schöne Günther

    Embarcadero Toaster - Notification Window Caption in Win10

    I can reproduce it on Windows Build 19042 as well: Windows Build Windows 10 Name Pass? 19042.804 20H2 ❌ 19041.804 2004 ✅ 18363.657 1909 ✅
  24. I like playing video games, and I like having the lights down low. My favourite game however, has pretty drastic brightness changes, and I can't cope with a bright screen in a dim room. Here is an example: 1 - Exploring a dark dungeon 2 - The interface is always very bright 3 - Regular gameplay is mostly like this My intension is to control the lights in my room, especially around my desk, according to the subjective perceived brightness on screen. I can properly grab screen RGB values from my games, and I can control my lamps. Both of that was rather easy. I am struggling with finding the right approach how to map the screen buffer RGB values to the brightness I should set my lamps to. My personal perception is that the images above are dark (but not very dark) very bright medium to bright There are formulas (like this one) that calculate the perceived reception of a single pixel but I don't think the "average perceived brightness" of the screen is going to help me much here. My feeling is that the bigger an adjacent, bright area is on screen, the brighter it seems to my eyes. To make it even more challenging, I cannot make use of overly performance-hungry solutions like converting every RGB value into the HSL space. However, I think that analyzing every 10th pixel is still reasonable. Any kind of idea is welcome. Thank you for reading.
  25. Good point. But from my experience, I think I won't really have to drive up the environmental light much. A small increase in brightness already makes it much more pleasurable. I really don't plan changing it from something cozy to bright flashing white
×