Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/04/23 in all areas

  1. The behavior you describe happens if Form1's window is set as the owner window (in Win32 API terms, not VCL terms) of Form2's window. A window cannot go behind its owner. You can use GetParent() or GetWindow() to determine a window's owner. In the first example, you can freely switch between Form1 and Form2 only if Form1 is not the owner of Form2. SetWindowPos() DOES NOT change window ownership! That can only be done with CreateWindow/Ex() when creating a new window, or with SetParent() or SetWindowLongPtr() on an existing window. How a TForm determines which owner to use when creating its window is a bit complex (there are other conditions that can affect the following, but this is the basics - see the source code for TCustomForrm.CreateParams() if you want to see the full logic) : If a TForm's PopupMode is pmNone (the default), then: if Application.MainFormOnTaskBar is true, the Application.MainForm window will be the owner. unless there is no MainForm, or Application.MainFormOnTaskBar is false, then the Application window will be the owner. If a TForm's PopupMode is pmAuto, then: the currently active TForm window will be the owner, unless there is no active TForm, or its window is currently minimized or hidden, then the Application.MainForm window will be the owner, unless there is no MainForm, or Application.MainFormOnTaskBar is false, then the Application window will be the owner. If a TForm's PopupMode is pmExplicit, then: the PopupParent window will be the owner, unless there is no PopupParent, then the Application.MainForm window will be the owner, unless there is no MainForm, then the Application window will be the owner.
  2. David Heffernan

    Unicode weirdness

    Isn't the real problem that you have interpreted UTF-8 encoded data as though it were ANSI? I mean, it's clearly not ASCII because none of the characters in your code are in the ASCII set. You can actually delete all of these StringReplace calls by simply using the correct encoding for your extracted data.
  3. IIRC, the compiler emits a warning W1010 Method 'Create' hides virtual method of base type 'TComponent' for a construct like this: type TMyCom = class(TComponent) public constructor Create; end; That seems sufficient to fix the bug before the component is even registered in the IDE.
  4. This behavior exists for quite some versions and is usually bound to the Application.MainFormOnTaskbar := True; command in the project file.
  5. rgdawson

    Delphi 11.3 is available now!

    Another thing I noticed was that the Vcl StringGrids were improved to now DPI scale the gridlines thickness, so for example at 200%, your gridlines will be two pixels in width. I happened to have an app with several ownerdraw string grids that do custom stuff with column widths that assumed the gridline width was 1 and all that broke. So that might be something to look out for, cuz it was not obvious to me at first.
  6. Angus Robertson

    How to get CER expiring date?

    SslContext.SslCertX509,ValidNotAfter returns certificate expiry as TDateTime Angus
  7. Der schöne Günther

    NetHTTPClient

    You probably might want to read the "Important note about DLL memory management" you just posted.
  8. CoeurdeLeon

    Anyone know why?

    The position in Frederick, Maryland is about 20 miles from my house. For the last 4 years this company has been advertising remote Delphi Developer positions working for the Legal & General America Headquarters located at 3275 Bennett Creek Ave in Frederick, MD 21704, United States. Many days I would receive 6 calls a day from different headhunters looking to fill this position. Frequently the connection is very bad (voip) and the indian accent is very difficult to understand. I have interviewed with one of the vendors trying to fill the position, Diverse Lynx. Eventually, I cut off all communications with this company because they appeared to be human traffickers and completely untrustworthy. I am a grey beard as was mentioned in one of the earlier posts. I could do the job with very little effort. Something is very fishy about this position in Frederick, MD. They are looking to fill the position for $50/hour. Dick Maley
  9. To tell what is wrong, we need to see your class declaration and implementation - in this case most likely constructor is what matters. Showing TTimer code is not very helpful. So when you ask for help, you should post your code first. However, knowing that your code works when you construct component directly and it does not when you drop it on a form, narrows down potential cause and most likely culprit is that you didn't add override directive to your component constructor. When you call constructor directly specifying its class then your constructor will run and create timer component, but when you drop it on a form original virtual constructor chain from TComponent will run, but it will skip calling your constructor because it is not marked as part of the chain (missing override directive). type TMyComponent = class(... ... public constructor Create(AOwner: TComponent); override; ens; If that is the case, you would also see warning W1010 Method 'Create' hides virtual method of base type... This warning tells you that something is wrong with your declaration and that you most likely forgot to add override directive (there are other scenarios besides this one, but in your case this is the one that matters)
  10. Anders Melander

    Anyone know why?

    Never mind. I see that it's an Indian company...
  11. Anders Melander

    Anyone know why?

    They do seem to be looking for a pretty experienced developer but does that imply grey beard? And how do you conclude that the salary is minimal?
  12. Uwe Raabe

    Offline Help updates available from Embarcadero

    The former one. I was pretty sure I made that public a while ago, so that may indeed fall under the dream thing.
  13. Vincent Parrett

    Anyone know why?

    My experience over the last 20 years is that many new devs just do not want to learn delphi. I lost count of how many times people I was interviewing had either never heard of Delphi, or were surprised to hear it was still arround. People want to learn languages which they see a future in, which are modern and supports modern development targets. These days that is the web or mobile.
  14. Dave Novo

    Anyone know why?

    I agree with Darian. We have hired many good Devs in the past with and without Delphi experience. Of course the good Devs with no Delphi experience are already good Devs by any definition i.e. smart, know OOP well, diligent workers. But lets face it, the RTL/VCL is 10s or maybe 100s of thousands of lines of code. You cannot expect a Delphi noob to not take a while to learn even what classes are available and what the methods are. Never mind all the Delphi-isms how to most effectively use them. Never mind how to work around all the bugs in the IDE and all the tricks of the Delphi debugger. Never mind the subtleties of Delphi reference counting that can be different from other libraries. etc. etc. IME it takes at least a few years before a good developer becomes a true good Delphi Developer.
  15. Shrinavat

    Delphi 11.3 is available now!

    Yes, I also turned off this feature because of the spontaneous jumps of the text. It's very annoying. Is there any RSP about this?
×