

PeterBelow
Members-
Content Count
549 -
Joined
-
Last visited
-
Days Won
13
Everything posted by PeterBelow
-
Handle the OnDrawColumnCell event of the grid, in it call DefaultDrawColumnCell if the cell you are asked to draw is not one in the boolean column, draw the icon on the grid canvas if it is in your special column. The OnCellClick event fires on a mouse click on the cell. The attached dataset's current record is already set to the record shown in the row clicked on, so just change the field value if the click lands on your boolean cell.
-
Lazy loading progressbar dialog
PeterBelow replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Relocate the actual work to a secondary thread. At the start of the thread's Execute method use TThread.Queue to pass a method to the main thread that creates the progress dialog. The dialog is not shown immediately, though, it just starts a timer with the delay you want. If the timer fires before the thread has completed its work, show the dialog. The dialog can the either use a timer to check for the thread's progress at intervals to update its display, or the thread can inform the dialog through Synchronized method calls of its progress. When done it can then tell the dialog to close itself, also through a Synchronized method call. -
Download the web installer from https://my.embarcadero.com. It will uninstall your existing 11.1 and then install 11.2, using the existing licence key. Remove GetIt installed IDE add-ins (like Parnassus Bookmarks) before you start the update and reinstall them from GetIt afterwards.
-
This forum has a 3rd-party section that may do: https://en.delphipraxis.net/forum/13-delphi-third-party/
-
You have to change the type both in the form pas and dfm files.
-
users downloads error an existing connection was forcibly closed by the remote host
PeterBelow replied to alogrep's topic in General Help
https://my.embarcadero.com/#downloadsPage works normally for me. (Win10, Firefox as browser). I did not try to download anything, though. -
On normal shutdown running apps get a WM_QUERYENDSESSION message, followed eventually by WM_ENDSESSION. The VCL handles WM_QUERYENDSESSION by firing the main form's OnCloseQuery event but OnClose or OnDestroy may not fire on system shutdown. So OnCloseQuery is the best place for detecting app closing.
-
TGauge is a really ancient sample component (from D1 days I think). Have you looked at TProgressbar as alternative?
-
With the 24 hour clock 00:00 is interpreted as midnight starting the current day and 24:00 as midnight ending the day.
-
That's just like HoursBetween works, the return value is an integer, so the difference is rounded to the next full hour. Use MinutesBetween and divide the result by 60 if you want the difference to be in fractional hours.
-
Change parameters when compiling using dcc32.exe
PeterBelow replied to PenelopeSkye's topic in RTL and Delphi Object Pascal
You need to find the database component used for the connection to the database. It may reside in a data module autocreated at program start, so start by opening the dpr file (project -> view source) and check the first Application.CreateForm statements. Open the datamodules one by one and look for a component with "connection" in its type. For FireDAC that would be a TFDConnection component, which has a LoginPrompt property, which is probably set to true in your case. You can set it to false and specify user and password in the Params property to avoid the dialog. Details depend on the database access framework your app uses. -
Change parameters when compiling using dcc32.exe
PeterBelow replied to PenelopeSkye's topic in RTL and Delphi Object Pascal
This is a Delphi form using TBitBtns, so it has to come from somewhere inside your application. But it may come from some library you use, e.g. a database login build into the data access framework the app uses. -
Can't make a popup form go behind the main form in z-order
PeterBelow replied to DennisTW's topic in VCL
In Delphi the main form (the one created first by an Application.CreateForm statement in the DPR file) is the API owner of all forms created later, so it is lower in the Z-order. It is also the only form having a taskbar button. Lazarus seems to behave like old Delphi versions (before Windows Vista), where the zero-size Application window was the API owner of all forms and owned the taskbar button. This made all forms siblings in the Z order and allowed any form to be covered by the main form. You can get this behaviour back in Delphi by setting Application.MainformOnTaskbar := false; in the DPR file, but that is not recommended since it does not work well with the taskbar in modern Windows versions. If you really need to you can uncouple a form from the main form in Z-order by overriding its CreateParams method. // in form declaration Procedure CreateParams( Var params: TCreateParams ); override; Procedure TFormX.CreateParams( Var params: TCreateParams ); begin inherited CreateParams( params ); params.wndParent := 0; //or Application.Handle // the following gives the form its own taskbar button params.ExStyle := params.ExStyle or WS_EX_APPWINDOW; end; -
Basically legalese I think. They guarantee it will run on the platform mentioned but you can probably run on older platforms, but on your own risk.
-
Weird, I just tried with a simple VCL test project on my system and do not see any fade effect when changing the item index on a combobox having the focus, neither with csDropdown nor with csDropdownlist style. Tried with both D11.1 and 10.4. Win10 basically with default display options, main monitor, scaling 100%.
-
VCL or FMX? Windows 10 or 11? Standard Windows style or some other style?
-
delphi Data Binding retreiving data from list
PeterBelow replied to Marty001's topic in General Help
If you use the LoadMovie function in the code unit generated by the wizard you get an IXMLMovieType interface back. Its Uniqueid property returns an interface of type IXMLUniqueidTypeList, which derives from IXMLNodeCollection, so it represents a list of nodes (represented by IXMLUniqueidType interfaces), accessed via the Items property. The list interface inherits a Count property from IXMLNodeCollection, so you can write a classical for loop to iterate over the Items property to examine each of the UniqueId nodes, to find the one with the Type_ property you are looking for (note the underscore added to the property name by the wizard, to avoid a collision with the reserved word type).- 2 replies
-
- xml
- data binding
-
(and 1 more)
Tagged with:
-
TRichEdit in Delphi 11.1 ("Courier New" font broken with formatting characters))
PeterBelow replied to Denis Dresse's topic in VCL
Have you tried to use the correct UTF16 code points instead, e.g. #$2012 etc.? Check the proper codes to use in the Windows Charmap application.- 17 replies
-
- trichedit
- delphi 11.1
-
(and 1 more)
Tagged with:
-
TRichEdit in Delphi 11.1 ("Courier New" font broken with formatting characters))
PeterBelow replied to Denis Dresse's topic in VCL
https://docwiki.embarcadero.com/Libraries/Alexandria/en/Vcl.ComCtrls.TRichEdit https://docwiki.embarcadero.com/RADStudio/Alexandria/en/What's_New#TRichEdit_Component_updated_to_RichEdit_4.1_.28MSFTEDIT.dll.29 There are new events, e.g. OnLinkClick and extensions to the TTextAttribute type used by SelAttributes.- 17 replies
-
- trichedit
- delphi 11.1
-
(and 1 more)
Tagged with:
-
RAD Studio 10.4 Community Edition - missing Delphi.Personality
PeterBelow replied to TCH's topic in General Help
Oh come on, it's not that bad. There are even instructions on how to manually clean up after an uninstall in several blog posts on the emba site, e. g. https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwi8r9iV0un5AhVC7rsIHTWvAQ0QFnoECAQQAw&url=https%3A%2F%2Fblogs.embarcadero.com%2Fmanual-uninstall-of-rad-studio-delphi-c-builder-10-2%2F&usg=AOvVaw0wqOftotNG03B76ft4LoXa -
How can I move a window to the left edge of a monitor?
PeterBelow replied to dummzeuch's topic in VCL
Couldn't you just set the ScreenSnap property to true to allow the user to snap the form to a screen edge? -
TRichEdit in Delphi 11.1 ("Courier New" font broken with formatting characters))
PeterBelow replied to Denis Dresse's topic in VCL
Are you setting up SelAttributes correctly before assigning text to SelText? D11.1 uses a newer version of the rich edit common control (4.x), which has more capabilities than the old 2.x version used by prior Delphi versions.- 17 replies
-
- trichedit
- delphi 11.1
-
(and 1 more)
Tagged with:
-
Looks like an attempt to hack a program to get around a security feature; you will get no help here for such (likely illegal) activity. It won't work anyway, if you modify a signed executable it will no longer match the signature and the OS will not load it.
-
Well, closing the main form ends up calling Application.Terminate, which results in a WM_QUIT message posted to the message loop. The reaction to that is to set Application.Terminated to true and fall out of the message loop in Application.Run. After that the Application object proceeds to free all forms and datamodules it ownes in the inverse order of creation. Things are unfortunately not always so clear, though. If a modal form is open it uses its own message loop, which also ends and causes ShowModal to return as if the user cancelled the dialog. Code in the calling method will execute after that until the code flow returns to the main message loop. A further complication are unowned forms. They will get destroyed after the owned forms when the main form window handle is destroyed, as far as I remember, by Windows, since the main form is the API-level owner of all secondary forms. Unowned Forms disconnected from the main form by overriding CreateParams will die last (unless explicitely closed in code executed when another form is destroyed), when the process dies. This usually does not give the form any chance to clean up after itself. So, if you need to have all forms die in an orderly manner you are best served by iterating over Screen.Forms and close each form found explicitely, with the main form last.
-
Whether this works or not depends on the source image format. TPngImage does not support direct assignment from a TJpegImage, for example. In such a case you have to go through a TBitmap as intermediate. procedure TForm1.Button1Click(Sender: TObject); var png: TPngImage; bmp: TBitmap; begin image1.Picture.LoadFromFile('C:\Users\Peter_2\Pictures\7.5. Stadtführung.jpg'); bmp:= TBitmap.Create; try bmp.Assign(Image1.Picture.Graphic); png:= TPngImage.Create; try png.Assign(bmp); png.SaveToFile('C:\Users\Peter_2\Pictures\test.png'); bmp.SaveToFile('C:\Users\Peter_2\Pictures\test.bmp'); finally png.Free; end; finally bmp.Free; end; ShowMessage('Done'); end;