PeterBelow
Members-
Content Count
508 -
Joined
-
Last visited
-
Days Won
13
Everything posted by PeterBelow
-
I would rewrite this code using the routines from System.IOUtils. Use TDirectory.GetFiles to get a list of files in a directory you can then walk over. TPath.GetTempPath gets you the user's temp folder, TFile.Delete deletes a file. Use a try except block around this statement to catch a failure to delete a file.
-
Scan you PC for malware, looks like something installed context menu extensions for Windows explorer...
-
Deselect seFont in the StyleElements property.
-
Mh, never had a problem with those, but my projects are small to medium since i'm retired and use no 3rd party controls.
-
Are you working on a 32 or 64 bit target?
-
With your steps you are not creating a new project group, you just rename the project. If you saved the project group before closing the IDE (the IDE should prompt you to do this) the group should contain the renamed project the next time you open it. To have more than one version in the same project group you have to explicitely add the old version to the group.
-
in Tbasicdm.DatamoduleCreate, is there really an underscore in the line after begin? That would be the source of the first error. The second may be a false positive, error insight is easily confused by conditional compilation...
-
Set the form's ActiveControl property to some other control that can take the focus, e.g. a button.
-
The installer will probably only be updated when (if) a 11.3 release comes out. Just run the installer and then check the IDE about dialog. Mine shows build 28.0.46481.1287 after the patch was installed.
-
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?