Jump to content

PeterBelow

Members
  • Content Count

    517
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by PeterBelow

  1. PeterBelow

    Make Bold DBRrid Row Color

    Look at this help entry for an overview of how to modify the way a TDBGrid is drawn. In your case set the DefaultDrawing property of the grid to false and attach a handler to the OnDrawColumnCell event. The handler can check the attached dataset's current row to see what row it has to draw. If it is the first just call the grid's DefaultDrawColumnCell method directly. If it is the second row change the grid.canvas.font to bold first and then call DefaultDrawColumnCell. That should do what you want.
  2. PeterBelow

    Should I just dive in to GUI programs?

    GUIs are just the majority of the applications build with Delphi. But you can easily build console programs with it, too. The File -> New dialog also offers a template for that.
  3. PeterBelow

    Component property disappears from DFM

    In this case just override the Loaded method of the frame and link the event handler in code there, after calling the inherited method first. That will fix the issue even if you cannot figure out why it happens in the first place. Not really satisfactory, of course, but the only reason I can think of would be if somebody cleared the Name property of the dataset in question or moved the handler method from published to public scope by accident.
  4. The IDE configuration is stored in the registry and the HKEY_CURRENT_USER hive is of course specific for the user account the IDE is running under. Compare the content of the HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\23.0\Editor\Options\Known Editor Enhancements and HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\23.0\Experts keys under the two accounts (adjust the 23.0 if you use a different Delphi version than 12.2).
  5. If you run into this problem and then call up the Tools -> Options dialog, what does it show as active key mapping on the Editor -> Key mapping page?
  6. PeterBelow

    GetDeviceCaps freezes everything

    If you put a breakpoint on the first GetDeviceCaps line, do you reach it when running under the debugger? If so, does Printer.Handle have a reasonable value? Are you dealing with a network printer here that may be offline? So many questions, so little data...
  7. But you can state it explicitely, just use an appropriate type cast, e.q. Smallint(1) instead of just 1.
  8. PeterBelow

    Enum modules return ONLY the application, no other packages

    Have you enabled "Build with run-time packages" in the project options? If not all code from the units in question will be compiled into a monolithic exe and there will be no other modules other than DLLs used from the OS or statically linked by units used in the application.
  9. PeterBelow

    FindFirst : with network files it fails

    You need file system level authentification to access files on the LAN via file system API functions, see WNetAddConnection3 if this is for Windows. For web folders you have to use something like ftp if the server supports it.
  10. PeterBelow

    Wrap texts in DBGrid

    TDBGrid does not support that. If you have fields with long text a grid is not the best way to show it, better use a TDBMemo in addition to the grid and tie it to the field in question. It will them show the field content of the record active in the grid as the user scrolls through the records.
  11. Look at the System.Hash unit, this kind of problem is usually the domain of hashing.
  12. PeterBelow

    Delphi 12CE and SQLite

    Yes, apart from the licence restriction re yearly revenue.
  13. PeterBelow

    Can I make the form larger in the IDE?

    Take a look at TVirtualImagelist and TVirtualimageCollection, these allow you to supply different versions (sizes) of bitmaps optimized for the DPI settings your app may encounter in the wild. This tends to look better than getting the images scaled at runtime from a single sized version.
  14. PeterBelow

    Delphi 12CE and SQLite

    You do not have the source (pas) for the unit and you should never set up a project to have the source files for Delphi RTL etc. units on its search path. You should have the precompiled FireDAC.Phys.SQLiteWrapper.dcu, though, and the path to its folder should be on the IDE library path for the target platform in question.
  15. PeterBelow

    eztwain.obj для 64 bit

    You need a 64-bit obj file for that. Is this for a C++-Builder or a Delphi project?
  16. PeterBelow

    Can I make the form larger in the IDE?

    I you are running the IDE on a monitor with scaling set to anything other than 100% it matters if you have enabled high DPI support for the form designer or not (the latter is equivalent to launching the IDE via the Delphi (DPI unware) shortcut the installer provides in the start menu group. You can find the relevant setting in the Tools -> Options dialog:
  17. PeterBelow

    Problem with EmbeddedWB in Delphi 12

    Can you not just ditch it and use TEdgeBrowser supplied with Delphi instead?
  18. PeterBelow

    C variable from delphi

    The Delphi program folder contains a console program named tdump.exe (and tdump64.exe for 64 bit executables) that you can use to examine the segments of the C DLL. Look for the exports table and check whether there is an entry for this params variable. If there is you can load the DLL from Delphi (LoadLibrary) and retrieve the address of this export via GetProcAddress, like for an exported function. Store the returned address into a variable of a suitably defined pointer type and you can access the value of the variable.
  19. PeterBelow

    Get notified when a form is created/shown?

    Perhaps you can use the Screen.OnActiveFormChange event for this. But keep in mind that it is not only called when a new form is shown but also when focus changes between forms. It may also happen too late for your purpose.
  20. PeterBelow

    tag as String

    Good to know one can learn something new even at my age :)...
  21. PeterBelow

    tag as String

    If you want to be able to edit this new property in the IDE Object Inspector I don't see a way to do this since it would require not only a change of the source code of the TComponent class but also a rebuild of all design and run-time packages that use TComponent, and you do not have the source code for all of them, as far as I know. If using this property in code would be enough there may be a way to fake it using a class helper for TComponent that uses the existing Tag property to store an index of the actual string held in some global container, like a TStringlist.
  22. PeterBelow

    String memory usage

    Depends on how you store the loaded names. If these are records from a database, for instance, and you access them via a query or table component each result row will have its own memory, regardless of what it contains. With a query you have the option of removing duplicates in the SQL statement used, but only if the row does not have any other columns with non-duplicate content. If you load the names into a TStringlist you can set the list's Duplicates property to dupIgnore, it will then discard values already in the list when you try to add them.
  23. PeterBelow

    Strange effect in TRichEdit: CTRL+I outputs TAB

    You have to use OnKeyPress and check for Ctrl down there. The behaviour you see is perfectly OK, by the way. Ctrl-<letter> combos have created control characters since the ancient days of DOS, and ^I (#9) is the TAB character...
  24. PeterBelow

    ​LOST DEBUGGER ON EDIT ERROR timeout trigger.

    The debugger will show exceptions before they are trapped in try except blocks in the code. The dialog you got allows you to tell it to not show this particular exception type in the future. To re-enable it you have to go into the IDE options dialog (Tools -> Options). Under the "Debugger" node you find (under "Embarcadero Debuggers") two lists with the exception classes to ignore. Just uncheck the one you blocked. Note that the dialog may look a little different if you use a Delphi version older than 12.
  25. PeterBelow

    problem with ComboBox

    No, since it is not a user-triggered change from the combobox's view.
×