Jump to content

PeterBelow

Members
  • Content Count

    555
  • Joined

  • Last visited

  • Days Won

    13

PeterBelow last won the day on April 30 2024

PeterBelow had the most liked content!

Community Reputation

255 Excellent

1 Follower

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. PeterBelow

    C++ Builder MastApp

    Oh, I forgot: we have C++Builder section in this forum, perhaps someone there has the old demos available.
  2. PeterBelow

    C++ Builder MastApp

    For RADStudio versions before 10 the demos were part of the installation package, if memory serves, If you have not done so and are desparate enough 8-) look what is available for you on my.embarcadero.com, download older ISOs and check their content for the demos.
  3. PeterBelow

    C++ Builder MastApp

    Check the Emba Github repository.
  4. PeterBelow

    Custom component catching the pain process when theme enabled

    Try to add a class constructor and destructor to your custom control, like class constructor TMyTabControl.Create; begin TCustomStyleEngine.RegisterStyleHook(TMyTabControl, TTabControlStyleHook); end; class destructor TMyTabControl.Destroy; begin TCustomStyleEngine.UnRegisterStyleHook(TMyTabControl, TTabControlStyleHook); end; Of course you need to use your component class name instead of TMyTabControl.
  5. It has worked this way for many Windows versions: if the control with focus is not editable a shortcut will be triggered if the matching character key is pressed even if Alt is not held down. The VCL just adheres to that Microsoft UI design choice. You can add a handler for the parent form's OnShortcut event (or override the virtual IsShortcut method) to change the default behaviour. If you want to learn more about key handling in a VCL app here is a link to an old article of mine on the subject (Delphi 7 vintage).
  6. The error message indicates that the compiler is not evaluating the right-hand side expression as you expect. Instead of converting V to a string and concatenating the result to the string literal it is trying to convert the literal to a variant containing a TBcd, adding the two numbers, and then convert the result to a string. If you have a masochistic streak put a breakpoint on the statement, run to it, call up the disassembly view and F7 through the generated code (debug dcus need to be enabled). I would not call that a bug, just unexpected behaviour. But as you know, in programming the compiler is always right... 🙂
  7. OK, I would not do it this way, but your problem is probably a missing FormType node in the DPROJ file. Look for nodes "DCCReference Include" and see how a "uninherited" datamodule is defined there. Compare with one of your derived datamodules.
  8. To make the inheritance work for designer classes like a data module your TBaseDataModule has to have a DFM-file, even if it is practically empty, but it must contain a valid Name property. The simplest way to get one is to create a new data module in the IDE and change its Name property to BaseDataModule, then save the unit under the name you want. You can now change the inheritance of your TMainDataModule in the editor, but you also have to switch the designer for that module to the dfm view and there change the first "object" keyword to "inherited". And make sure your TBaseDatamodule is not in the list of autocreated items! You can delete the BaseDataModule variable the IDE created for you, it is not needed.
  9. PeterBelow

    Richedit

    Microsoft has released several versions of the richedit control over the decades, TRichedit in the current Delphi version (since 11.0 if memory serves) is based on version 4 (the latest and most feature-rich). The Jedi version may be based on an older version. The divers versions are implemented in separate DLLs with different names and use different window class names, so they can coexist on a given Windows system. Different versions may explain the behaviour you see.
  10. PeterBelow

    How to sign .msix packages

    Won't the MS Store sign the package for you when you upload it? I dimly remember some mention about this (also for Google and Apple app stores) in a webinar i watched recently.
  11. PeterBelow

    Richedit

    Is the BiDiMode property set to true on all controls in question? Also look at the methods in the see also section at the bottom of the page linked to for BiDiMode, may be important if you test on a non-hebrew locale.
  12. PeterBelow

    About the compiler (not) finding the DFM files

    I just add the "library" foms to the project that needs them, this way the required path is in the dpr file uses clause. Btw.: I think this DCC_RessourcePath is for the resource compiler and you can set it under that node in the Options dialog. Never needed that myself, though.
  13. PeterBelow

    tray notification dll delphi11.3/Delphi 2010

    Then why don't you delegate the hint showing to a task running in a secondary thread? The task can wait for a short interval and if it is cancelled before that interval has elepsed the hint will not be shown at all...
  14. The answer is no since the update would have to be triggered somewhere from inside the work code. But you can create and show a window from a secondary thread, it is just a bit cumbersome to do since the visual part of the VCL is not thread-safe. The secondary thread needs a message loop that will process all messages for the window, including timers and paint messages. The simplest way to get that loop is to show the window modally. And the safest way to do such stuff is to not use a Delphi form but do it all the API way (hence the cumbersome part above 8-)). If you want to use a Delphi form the important points to mind are: Do not autocreate the form! Create the form inside the Execute method of the secondary thread, using Nil as owner. Use a try finally block to make sure the form is destroyed. Use a field of the thread class to store the form reference. ShowModal the form. Add a public method to the thread class the main thread can call to get the form to close once the work is done. The method should set the form's ModalResult to mrCancel to allow the modal loop to exit normally.
  15. PeterBelow

    TDBLookupComboBox without the field: DataSource

    Try to set the KeyValue property to the ID you want to look up.
×
OSZAR »