Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Remy Lebeau

    THintWindow; exposing the WMLButtonDown event

    The correct link is https://docwiki.embarcadero.com/Libraries/en/Vcl.Forms.HintWindowClass Also, you don't need to assign the HintWindowClass before Application.Run() is called (though you certainly can). Just be sure to assign it before any hints are displayed at runtime. For instance, in the MainForm's OnCreate event would suffice. Also, if you don't want to override the hint behavior globally, you can customize the hint on a per-invocation basis by using the TApplication[Events].OnShowHint event. It gives you access to a THintInfo describing the hint that is about to be displayed, which has a HintWindowClass field (amongst many others).
  3. Pat Foley

    Share a data between two units in dynamic loaded BPL.

    Would not using global variables for any forms and using unique name for forms to use make it a better idea. To reduce complexity a TreeView is loaded in mainform with nodes referencing the forms being created. The Treeview can then be parented to the Active form to let the user navigate the app readily. A DM can help surfacing the data through the UI.
  4. PeterBelow

    Share a data between two units in dynamic loaded BPL.

    One thing too keep in mind is the fact that form variables created by the IDE do not get assigned any form reference if the unit is part of a package and the form is also not autocreated. If you create the form in code it is your responsibility to assign the created form reference to the variable if you intend to use it (which is a bad idea in the first place IMO).
  5. Olli73

    Creating a simple image app for Android

    You should not use Delphi XE7 for Android 12. XE7 supports Android <= 4.4. https://docwiki.embarcadero.com/PlatformStatus/en/Main_Page
  6. Looking at the string contents should give a pointer as to where they come from. For example, the one you showed is a 5-character-long string "COSSM"
  7. dummzeuch

    Embarcadero Support Request

    I hereby apologize to Embarcadero. They replied on the same day to our general purchasing account (which was correct because that is the email address used to register the licenses). Somehow I must have missed that reply several times when I looked there. And I managed to fix the problem too, even though I am still not sure what I did wrong the first time. And thanks to Devid Espenschied for clearing that up.
  8. This is one those that really bite. I don't have a concrete answer but lets handle this step by step, The stack trace (calls) is short, so i would suggest to increase it, there is 20 calls and it is not enough to go back, only the last 5 belong to your application, even the last two belong to FastMM5, and the named and relevant 3 are in the RTL not even your code, these 3 say very little as they are just converting or extracting string, they are doing the allocating, before that there is 15 calls Of these 15 call we see that the calls with addresses start with 77 and 74 are definitely comes form OS dlls, but these recorded two are a concern to me 750A9F4B [Unknown function at ] 750A9F4B [Unknown function at ] this looks like recursive ! also the whole LdrLoadAlternateResourceModuleEx calling the above then leading to another loop just the same then landing at Delphi string handling code is strange the least. Suggestions; 1) Increase the default stack call entries in FastMM5 ffrom 20 to may be 64 see, if that help in showing more information, we need source of this recursive calls, i don't use FastMM5 but looking at the repository the adjustment should be here https://github.com/pleriche/FastMM5/blob/master/FastMM5.pas#L1166-L1168 2) The whole thing is loading resources, namely form already loaded module (binary file being EXE or DLL..), so it is highly possible the problem sits in wrong handling WideString, WideString is not Delphi string it is different beast from UnicodeString, RTL should handling this behind the scene unless you are invoking something in wrong way or forcing resource loading by directly calling some API with wrong declaration between WideString and string. 3) the Enigma for me is this address "750A9F4B" , use what ever you can within the debugger, alas Delphi debugger is half useless and short in many places like this exact case, it might skip these OS calls in its stack trace window, rendering the use of break points and step into in the CPU window harder than usual, anyway try to find out who own that address, from what i see most likely it is a BPL and you are using it, also it doesn't have debug info, so you must pinpoint it. step 3 is crucial to understand how this happen and what went wrong, this is the one that tried to load/extract some null-terminated string from resource within a module then recursively called for the conversion into Delphi string. And good luck !
  9. Lars Fosdal

    THintWindow; exposing the WMLButtonDown event

    Did you override the HintWindowClass before Application.Run is executed? https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.Controls.THintWindowClass
  10. Short answer: Yes Long answer: Yes, but don't! It would put your SQL database at risk. Instead, build a proper REST API as - it hides the underlying database - it allows you to change the underlying database operations without changing the client A REST API done right is far more secure and robust.
  11. Lars Fosdal

    Is it possible to implement floating/fully custom Dropdown Menus?

    TMS has a new customizable context menu which is cross platform. https://www.tmssoftware.com/site/blog.asp?post=2364
  12. Hi...😎 how about: TMS XData: Accessing any database with SQL queries via the TMS XData REST server https://www.youtube.com/watch?v=2SCvzw0L27o&ab_channel=tmssoftwareTV
  13. Hi I got this neat piece of code froma OpenAI GPT searc type TMyHintWindow = class(THintWindow) protected procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; end; procedure TMyHintWindow.WMLButtonDown(var Message: TWMLButtonDown); begin // Close the hint window when clicked ReleaseHandle; end; I put the first part in the interface section, the second in the implementation. But the the WMLButtonDown (clic left button, right?) never gets triggered. What is missing to make it work? Also, in case I make it work, I lso have set the timerr to hide it after 2 seconds. In the timere I use wh (The TMyHintWindow control) if wh <> Nil then begin wh.releasehandle. wh.free; wh:=Nil; end. How can I make the same inside the WMLButtonDown event? Thanks very much. wh
  14. SPECS: Windows 7, Delphi XE7, FMX, Galaxy S10+ phone, Android version 12 I want to create an Android app that will accept a clipboard image via menu-select of "copy to clipboard" so that I can paste it into my custom-made app that I want to accept and display in a window on an Android phone. I'd like the image to be "pinched" enabled in order to inlarge the size of the image as well. This is the situation: For instance, when I am Google searching on the phone, there are times when, if I hold down the pen (or my finger) on a certain spot on the phone, a short popup menu will display and offer me to copy-image-to-clipboard. Other times, I may screen-grab as an image to the clipboard via (Power-button+Vol-Down buttons). I want my app to grab what is in the clipboard and paste it into my app so that I can see it, and maybe crop some of it if necessary, then put it back into the clipboard so that I can paste it into a Message for texting back to the recipient. In my app, I mainly want to be able to see the image and be able to enlarge it if necessary, though cropping it would be a bonus. Is this possible and how would I go about it?
  15. Yesterday
  16. I am using Delphi 10.2 with FastMM5 I am getting lots of memory leaks reported with no reference to an actual line of code. I have put an example below, Where should I look to removed these leakkages? Kind Regards, Robert. --------------------------------2025-07-03 13:59:58-------------------------------- A memory block has been leaked. The size is: 24 This block was allocated by thread 0x6F18, and the stack trace (return addresses) at the time was: 004239D2 [FastMM5.pas][FastMM5][FastMM_DebugGetMem$qqri][7651] 004074CA [System.pas][System][@GetMem$qqri][4749] 0040C257 [System.pas][System][@NewUnicodeString$qqri][24629] 0040C488 [System.pas][System][@UStrFromPWCharLen$qqrr20System.UnicodeStringpbi][25307] 0040C55F [System.pas][System][InternalUStrFromPCharLen$qqrr20System.UnicodeStringpcii][25484] 750A9F4B [Unknown function at ] 771AA57D [Unknown function at LdrLoadAlternateResourceModuleEx] 771C1C11 [RtlLoadString] 771A672F [LdrpResGetMappingSize] 771E9558 [Unknown function at RtlRcuSynchronize] 771AAA68 [Unknown function at RtlPcToFileHeader] 771A672F [LdrpResGetMappingSize] 771E9558 [Unknown function at RtlRcuSynchronize] 771AAA68 [Unknown function at RtlPcToFileHeader] 750A9F4B [Unknown function at ] 771AA57D [Unknown function at LdrLoadAlternateResourceModuleEx] 771AEDC7 [Unknown function at RtlReleaseSRWLockShared] 771AF1F8 [Unknown function at RtlReleaseSRWLockShared] 74EC2F2E [GetUserOverrideWord] 74EC7494 [GetLocaleInfoHelper] The block is currently used for an object of class: UnicodeString The allocation number is: 576361 Current memory dump of 32 bytes starting at pointer address 13FE1540: B0 04 02 00 01 00 00 00 05 00 00 00 43 00 4F 00 53 00 53 00 4D 00 00 00 F3 2A A1 88 D2 39 42 00 . . . . . . . . . . . . C . O . S . S . M . . . . * . . . 9 B .
  17. Can I passing an SQL (select Statement )into a REST Request to a Rest Server , and receive a result in a JSON Dataset? Can I pass an INSERT/UPDATE/DELETE Statement into a Rest Request?
  18. aehimself

    Stringgrid cell value changed arbitrarely

    Try to get rid of the "with dm2 do begin". It might not cause the issue but makes codereading and debugging significantly more difficult (debugger evaluator usually goes nuts). I had strange text in DBGrids some time ago, it was caused by memory corruption in the DB access component. Based on what you posted, there's no mentions of the stringgrid so I tend to think your issue might be caused by something like this too.
  19. alogrep

    Stringgrid cell value changed arbitrarely

    OK maybe it wasn't clear. The grid is not shown in the code because is unrelated to that peace of code; A more completa chunk of code: procedure printorder(grid: Tstringgrid); begin linesdone:=''; // SO FAR IT IS OK, STILL '0' prnums:=Tstringlist.create; with dm2 do begin stationprinters.indexname:='number'; stationprinters.setrange([_mycompname,1],[_mycompname,123]) ; stationprinters.first; while not stationprinters.eof do begin prnums.add(stationprinters.fieldbyname('printernumber').asstring); stationprinters.next; end; stationprinters.cancelrange; end; chekqtys; // this is a procedure; ..... .... compactgrid() And inside checkqtys() I manipulate the grid. I do not know why but the problem seems to have disappeared. Just as I do not know why it appeared. Maybe b/c deep inside checkqtys() I had a line where I set the cells[13,row to '1'. (but on certain conditions) But why WAY BEFORE it reached that point the value of the grid was changed?
  20. OpenSSL has issued new releases of all the currently supported versions, 3.5.1, 3.4.2, 3.3.4, 3.2.5 and 3.0.17. OpenSSL 3.5.1 fixes a low risk CVE-2025-4575 relating to use of a command in the openssl.exe application to use trusted certificates. All releases include periodic miscellaneous minor bug fixes. Windows binaries are available in SVN and the overnight zip file and separately from https://wiki.overbyte.eu/wiki/index.php/ICS_Download or https://www.magsys.co.uk/delphi/magics.asp In addition to the three DLL files, the zips include compiled RES resource files that contain the same DLLs, text files and version information, see the RC file. The RES file may be linked into application EXE files and code then used to extract the DLLs from the resource to a temporary directory to avoid distributing them separately. ICS V9.1 and later optionally support loading the resource files. These OpenSSL versions are included with ICS V9.5 beta available from SVN and the overnight zip. ICS V9.5 beta now defaults to using OpenSSL 3.5.1, provided the new OverbyteIcsDefs.inc files is installed, or you undefine OpenSSL_35 and suppress an earlier version. The SSL/TLS Certificate Authority Root Stores bundles have also been updated with new roots, more information at https://wiki.overbyte.eu/wiki/index.php/FAQ_SSL/TLS_Certificate_Authority_Root_Stores and downloads at: https://www.magsys.co.uk/download/software/ca-root-bundles.zip and are already included with ICS V9.5 beta. Separately, https://www.yunqa.de/ has released 3.0.17, 3.3.4 and 3.4.2 as commercial DCUs allowing applications to be used with OpenSSL without needing separate DLLs. Angus
  21. Die Holländer

    Stringgrid cell value changed arbitrarely

    Very difficult to understand your question.. You talk about a stringgrid but in the code you posted the grid isn't mentioned. You talk about a value? What value? All the valueS (more values) in the rows of the grid?
  22. HI. I have lost 21 hours on this,. I have a stringrid that I need to make a function work correcly. I store a value of Zero in all cells[13,row]. I pass the grid to another function, and right at the beginning of this function misteriousely that value is changed to '1'; This is the code begin linesdone:=''; // SO FAR IT IS OK, STILL '0' prnums:=Tstringlist.create; with dm2 do begin stationprinters.indexname:='number'; stationprinters.setrange([_mycompname,1],[_mycompname,123]) ; stationprinters.first; while not stationprinters.eof do begin prnums.add(stationprinters.fieldbyname('printernumber').asstring); stationprinters.next; end; stationprinters.cancelrange; end; chekqtys; // AS SOON S IT GETS HERE THE VALUE IS '1'; The even strangerthis is that if I comment out the prnums.add(stationprinters.fieldbyname('printernumber').asstring); the value stays to '0'. But then I cannot use the rest of the function, b/c I need the count and the printerindex that need to be used. The stationprinters table has no relation to the stringgrid whatsoever. Anybody has any hint,clue,suggestion,guessing or anything that can help me avoid going crazy?
  23. From my experience, DevExpress requires an all or nothing approach. If you use their controls exclusively (or build something on top of them), I'm pretty confident you could achieve what you want, as their skins are very customisable. And usage just got a lot less complicated with the recently added global application settings.
  24. Last week
  25. Attila Kovacs

    Is it possible to implement floating/fully custom Dropdown Menus?

    if you are already using StyleControls look for the TscStyledForm component and "dropdownforms" demo and set your form shape with "SetWindowRgn"
  26. pyscripter

    Turbopower Visual Planit??

    For the record, TurboPower was a good company, but their components were commercial. They were open-sourced their products when the company shut-down their component business. However, they are products of the previous century and they show it. And incidentally, TurboPower was owned by a gambling business (a Casino or something).
  27. Anders Melander

    Is it possible to implement floating/fully custom Dropdown Menus?

    It took me a good while to spot the difference between the two screenshots but I get your meaning. AFAIK it's possible to control DevExpress' skinning of standard VCL controls to some degree. See TdxSkinController.OnSkinControl The dependencies though 😕
  28. pyscripter

    Is it possible to implement floating/fully custom Dropdown Menus?

    Following on @Anders Melander suggestion you can find here a free implementation of his idea. The library also supports controls on menus and toolbars, is Vcl styles compatible and High-DPI aware. See some of the images here.
  1. Load more activity
×