Jump to content

Search the Community

Showing results for tags 'delphi'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 227 results

  1. Good night, I tried some ways here, but I was not successful, I am working in remote access, and I wanted that while I work on my client's machine, a form appears with loading and tals and for me it is transparent to be able to make the settings . Could someone give me a light on the part of appearing for him, and not for me? I am grateful.
  2. Hello Winapi lovers, I would like to have all notify icons (system tray?) in a seperate window. (everthing between taskbar entries and time display) Is that possible at all? Reason: I would run that program to have a OnTop window open that does not close on its own and inform me what icons are avail (usb device, network symbol, programms with their bubble[number], and such....) By default I do minimize TaskBar and having such would make my workflow alot easier! For now I even dont have a starting point. Searching Msdn did not result me any positive clue. I would also accept any pre-made application that do such to not reinvent wheels. Thank you for reading!
  3. Good day, I would like to have ability in my project to show certificate details of signed executables. (From other executables) Is that possible with Delphi? Would love to get hints 'how-to'! //edit For now I have ability to get raw data thats appended to executables (overlay data) by simply check PE header for filesize and compare with real physical filesize.
  4. bazzer747

    DecodeDate Issue

    Hi, I have a project where I need to get the value of a year in a field so I use DecodeDate( dtDate, Year, Month, Day); where dtDate is a TDateTime variable, Year, Month, Day are Word variables. When I run the code I get an error - 'Constant or type identifier expected'. I've downloaded the example Embarcadero have for using DecodeDate: procedure TfAccounts.Button1Click(Sender: TObject); var Present: TDateTime; Year, Month, Day: Word; begin Present:= Now; System.SysUtils.DecodeDate(Present, Year, Month, Day); Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month ' + IntToStr(Month) + ' of Year ' + IntToStr(Year); end; .. and get this same error. The 'Word' is red-underlines as the error. I have System.SysUtils in the Uses clause: uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, ... etc I have used this same code in a different project and it works with no error. I can't think of why it isn't working in this particular project. Unless some other unit in the Uses clause is causing a problem, although SysUtils comes almost first. Any thoughts would be welcomed.
  5. Hi, friends Im with a little problem. Im trying to create a delphi Dll with a form in RAD Studio, but i don't know how to make it load with DllMain. I want to inject this Dll in a third-party process at runtime after. I created the Dll project with the form without problems, but i can't find nothing good related to "how to load it with DllMain", or at least the tutorials/things i found doesn't helped me (or i'm just dumb ). Can someone help me? Give me some hint or a site/video where i can learn it? Thanks for your time guys! =)
  6. We have open sourced our Deployment Manager to simplify deployment of a large number of files or folders to iOS or Android. https://blog.grijjy.com/2021/02/07/deployman/
  7. Hi, I'm experimenting some interface design and came up with the following: I would like to query a BaseClass instance if it supports a given interface, without freeing the class! As the example below, my great grand child class can support an interface, but I don't want to include the class definition ( great grand child class ) in the Base class.. So, by defining interfaces, I can write exactly what I want: TMyFrame = Class( TBaseFrame, {SupportedInterfaces}) In the code below procedure TForm22.Button1Click(Sender: TObject); begin if Supports( fBaseFrameClass, ISupportTask ) then (fBaseFrame as ISupportTask).CheckTask; end; No matter what overload Support method I call, fBaseFrame is freed once the method exits. Is there a way to know if my class instance supports an interface and call the corresponding method without messing ref counting and free the class instance prematurely? unit frm.main; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type ISupportTask = Interface ['{3F785F20-7C44-4163-B55C-5EA267C7204E}'] function CheckTask : Boolean; end; ISupportList = Interface ['{9B7D95E1-DA96-475A-9A1C-910CAF99E5F5}'] function ListCount : Integer; End; ISupportItem = Interface ['{ACADFA2F-3500-4ACB-8049-F49FAC38EFB2}'] function SaveItem : Boolean; End; TBaseFrame = Class( TInterfacedObject ) protected fDummy : Boolean; End; TBaseFrameClass = Class of TBaseFrame; TMyFrame = Class( TBaseFrame, ISupportTask, ISupportList, ISupportItem ) public function CheckTask : Boolean; function ListCount : Integer; function SaveItem : Boolean; destructor Destroy; override; End; TForm22 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private { Private declarations } fBaseFrameClass : TBaseFrameClass; fBaseFrame : TBaseFrame; public { Public declarations } end; var Form22: TForm22; implementation {$R *.dfm} procedure TForm22.Button1Click(Sender: TObject); begin if Supports( fBaseFrameClass, ISupportTask ) then (fBaseFrame as ISupportTask).CheckTask; end; { TMyFrame } function TMyFrame.CheckTask: Boolean; begin Result := True; end; destructor TMyFrame.Destroy; begin fDummy := True; inherited; end; function TMyFrame.ListCount: Integer; begin Result := 42; end; function TMyFrame.SaveItem: Boolean; begin Result := False; end; procedure TForm22.FormCreate(Sender: TObject); begin fBaseFrameClass := TMyFrame; fBaseFrame := fBaseFrameClass.Create; end; procedure TForm22.FormDestroy(Sender: TObject); begin fBaseFrame.Free; end; end.
  8. shineworld

    AnsiPos and AnsiString

    Hi all. I'm getting crazy with old software (Delphi 2006) port to Sydney about AnsiPos of an AnsiString: function TTCPBin01.GetTargetAnswer: AnsiString; begin Result := FTargetAnswer; end; .. .. if AnsiPos('?y', GetTargetAnswer) <> 0 then begin FErrorCode := sigc_None; FErrorMessage := SignalMessage(FErrorCode); Result := qmct_Prog; end GetTargetAnswer return an AnsiString. Also using AnsiPos to check for a substring in the resulting string the compiler notice me: [dcc32 Warning] osTCPBin01.pas(224): W1057 Implicit string cast from 'AnsiString' to 'string'. Placing the mouse cursor on AnsiPos the HINT some time notice me: function (const SubStr: string; const S: string): Integer; Other times notice me: function (const SubStr: AnsiString; const S: AnsiString): Integer; In either case however the compiler notice Implicit cast... Have you any suggestion about? Best regards Silverio Diquigiovanni
  9. Some one is asking for my themes, so I thought its better to create a new post to benefit any one who like them, I called them "Nature" themes, one Nature original theme and one Nature Warm theme, you may use Delphi IDE theme editor (https://github.com/RRUZ/delphi-ide-theme-editor) to apply them: Please click Like if you enjoy it. Nature warm (based on my Nature original theme): File: c0d3r-YW-Nature-warm.theme.xml
  10. PrimeMinister

    Problem with clearing ADO Tables

    Hey guys, so I'm having a problem with my ADO Tables. I have a button in my program that is meant to clear all tables in the database related to the program when clicked but whenever I click it, it gives errors. (no matter how many times I change my code) Could it be a problem with my Data Module or what? (I'm not sure cause my button which saves stuff to the database, works perfectly without a hitch) How could I alleviate this? Code of my data module: const scConnectionString = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%pathtomdb%Racers.mdb;Mode=ReadWrite;Persist Security Info=False;'; var dmRacers: TdmRacers; implementation {%CLASSGROUP 'Vcl.Controls.TControl'} {$R *.dfm} procedure TdmRacers.DataModuleCreate(Sender: TObject); var path:string; begin path:=ExtractFilePath(ParamStr(0)); conToDB.ConnectionString := StringReplace(scConnectionString, '%pathtomdb%', path, []); conToDB.Connected:=True; tbl1660.Active := True; tblXKarts.Active := True; tblTwoPointOne.Active := True; tblMidB.Active := True; tblMidA.Active := True; tblLateModel.Active := True; tblSprints.Active := True; tblV8.Active := True; tblHeavyMetals.Active := True; tblHotrods.Active := True; tblPinkrods.Active := True; tblStockrods.Active := True; tblMinis.Active := True; tblDevelopment.Active := True; end; Code from the form: public { Public declarations } MyCmd:TADOCommand; procedure EmptyTable(tbl:TADOTable;tablename:string); procedure ResetActiveProp(tbl:TADOTable); end; var frmEntry: TfrmEntry; implementation {$R *.dfm} procedure TfrmEntry.ResetActiveProp(tbl: TADOTable); begin tbl.Active := True; end; procedure TfrmEntry.EmptyTable(tbl: TADOTable; tablename: string); var MyCmd: TADOCommand; begin tbl.Active := true; MyCmd.CommandText := 'Delete * from '+tablename; MyCmd.Execute; tbl.Active := false; end; procedure TfrmEntry.bmbClearClick(Sender: TObject); var i:integer; begin cbxGridSelect.ItemIndex:=-1; cbxGridSelect.Text:='Select a class'; edtRacerName.Clear; edtCarNumber.Clear; edtLicenseNum.Clear; i:=MessageDlg('Dialog cleared',mtInformation,[mbOK],0); end; procedure TfrmEntry.bmbClearDBClick(Sender: TObject); var i:integer; begin i:=MessageDlg('Are you sure you want to clear the Racers database? (all current data in the database will be lost.)',mtWarning,[mbOK,mbCancel],0); if i = mrOk then begin //clears entire database with dmRacers do begin EmptyTable(tbl1660,'tbl1660'); EmptyTable(tblXKarts,'tblXKarts'); EmptyTable(tblTwoPointOne,'tblTwoPointOnes'); EmptyTable(tblMidB,'tblMidB'); EmptyTable(tblMidA,'tblMidA'); EmptyTable(tblLateModel,'tblLateModels'); EmptyTable(tblSprints,'tblSprints'); EmptyTable(tblV8,'tblV8'); EmptyTable(tblHeavyMetals,'tblHeavyMetals'); EmptyTable(tblHotrods,'tblHotrods'); EmptyTable(tblPinkrods,'tblPinkrods'); EmptyTable(tblStockrods,'tblStockrods'); EmptyTable(tblMinis,'tblMinis'); EmptyTable(tblDevelopment,'tblDevelopment'); i:=MessageDlg('Database successfully cleared',mtInformation,[mbOk],0); //resets active property of tables ResetActiveProp(tbl1660); ResetActiveProp(tblXKarts); ResetActiveProp(tblTwoPointOne); ResetActiveProp(tblMidB); ResetActiveProp(tblMidA); ResetActiveProp(tblLateModel); ResetActiveProp(tblSprints); ResetActiveProp(tblV8); ResetActiveProp(tblHeavyMetals); ResetActiveProp(tblHotrods); ResetActiveProp(tblPinkrods); ResetActiveProp(tblStockrods); ResetActiveProp(tblMinis); ResetActiveProp(tblDevelopment); end; end else begin i:=MessageDlg('Clear aborted',mtInformation,[mbOk],0); end; end; Example of errors: Thanks in advance for the help! Kind Regards PrimeMinister
  11. DieselDave

    Compiler Error E2217

    Is anyone having problems with Delphi 10.3.3 - getting compiler error messages E2217 : Published field not class or interface type. It occurs against the first (and every subsequent field) in the first class definition in a unit ? This has compiled ok before but now it is driving me mad - any Suggestion as to what is wrong would be welcomed. Dave M
  12. Hello, I get a problem with running RestDebugger on my Windows 10 after it was updated. I get such error: and its stops (not working) It's weird and its on all version I have on my installed from Delphi XE8 to 10.4 . I also download free RestDebugger (tool from embarcadero web page and I get error too but it's bit different) Windows 10 Pro version: 20H2 compilation: 19042.746 Can someone confirm or know solution ? best regards Moskw@
  13. Get the most out of your GPU by writing custom shaders for FireMonkey! https://blog.grijjy.com/2021/01/14/shader-programming/
  14. Hello people, my name is Edisson Savio and I am interested in implementing DLL libraries in my code. I work with simulation of numerical methods applied to reentry physical problems. I have implemented my actual code in PASCAL language using Class variables as start point. I have sucess in such implementation. Now, I am interested in using DLL libraries and after a research in this topic, my unique idea was based on the work of Marco Cantù in "Bible Delphi 3" and I have implemented in such way. I have created the base unit and the implementation unity, as well as the DLL routine. When I put this one to run, my code doesn´t execute the first implementated routine. I would like to know if there is someone who can help me in this task? I wait for your help, best regards, Edisson Sávio.
  15. Meu nome é Edisson Sávio e eu estou implementando um código em PASCAL pelo Delphi 10.4 da Embarcadero. O meu código é para simulação de problemas físicos de reentrada. Já implementei o código usando o PASCAL avançado do Delphi, estou agora querendo implementar ele usando a ideia de bibliotecas DLL do delphi. Eu li na Bíblia Delphi 3 sua sugestão para implementar DLL's com a criação de duas unities: a unit base e a de implementação mais o código da DLL para chamar as rotinas da implementação. Eu tentei rodar um caso básico e deu erro de "Acess Violation". Eu gostaria de saber se você pode dar dicas de onde eu encontraria este tipo de erro? O problema não me parece ser memória pois eu já testei aumenta-la. Eu fico aguardando seu retorno, obrigado, Edisson Sávio.
  16. Hi all, I'm trying to de-couple the actions lists, with related actions, from a specific form to a data module. These actions will be used so also in other views without duplicate them in every form. The things work BUT they are not cyclic updated. The OnActionUpdate is called only when I click on the assigned graphic button (for example), but I would like that ActionXXX.Enabled si cyclically called as when they are in a form. Some ideas? Best Regards Silverio
  17. Hello, We are looking for a Delphi Object Pascal Developer. Our system is entirely based on it, and some updates are needed. We are located in Morocco but remote work is an option. (Long term project). Please respond if interested.
  18. shineworld

    FormDestory call order

    Hi all, I'm moving a big project, about 1.500.000 code lines from Delphi 2006 to Syndey, but I'm in trouble with how Syndey destroys objects in program termination. Sample: A very Dummy application with 1 form without any other code than a comment in TForm3.FormDestory to place a breakpoint: unit Unit3; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs; type TForm3 = class(TForm) procedure FormDestroy(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form3: TForm3; implementation {$R *.dfm} procedure TForm3.FormDestroy(Sender: TObject); begin // < placed breakpoint here!!! // end; end. A very simple project with a string assignment to catch the main flow (in S := ''; ) after Application Run: program Project2; uses Vcl.Forms, Unit3 in 'Unit3.pas' {Form3}; {$R *.res} var S: string; begin S := 'asdfasdf'; Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm3, Form3); Application.Run; S := ''; ; << placed break point here end. In BDS 2006 if I run this code and exit program first break at Form3.FormDestroy, then breaks in main at S := ''. RIGHT ! In Sydney first, break in the main at S := '', then goes to Form3.FormDestry. What has changed so much the Delphi behavior? if I add a Form3.DoubleClick event with Application.Terminate I got also an environment error: [50164E97]{rtl270.bpl } System.Classes.TList.Get (Line 4972, "System.Classes.pas" + 2) + $A [50EBFC4B]{vcl270.bpl } Vcl.AppEvnts.TMultiCaster.GetAppEvents (Line 657, "Vcl.AppEvnts.pas" + 1) + $B [50EBF60E]{vcl270.bpl } Vcl.AppEvnts.TMultiCaster.DoActivate (Line 425, "Vcl.AppEvnts.pas" + 5) + $9 [50E5A73F]{vcl270.bpl } Vcl.Forms.TApplication.WndProc (Line 10617, "Vcl.Forms.pas" + 126) + $C [50181450]{rtl270.bpl } System.Classes.StdWndProc (Line 18021, "System.Classes.pas" + 😎 + $0 [50E5B23F]{vcl270.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 11028, "Vcl.Forms.pas" + 23) + $1 [50E5B282]{vcl270.bpl } Vcl.Forms.TApplication.HandleMessage (Line 11058, "Vcl.Forms.pas" + 1) + $4 [50E5B5B5]{vcl270.bpl } Vcl.Forms.TApplication.Run (Line 11196, "Vcl.Forms.pas" + 26) + $3 [0051E178]{bds.exe } bds.bds (Line 222, "" + 13) + $2 😞 test.7z
  19. JDS2018

    Year Countsdown

    Hi Can Someone help me on below i need to make app count down for 1 Year Let Say if i set Date for 2021 Dec 31 need to see to the Set Date How Many Year , months , Days , Hours , Mints, Seconds Left
  20. How to delete all the files just in case you need to for some unknown reason. Manual uninstall of RAD Studio/Delphi/C++Builder 10.4 Sydney Launch the License Manager from the bin folder (by default “C:\Program Files (x86)\Embarcadero\Studio\21.0\bin\LicenseManager.exe”) and delete any trial or beta (Test Field) license that you can find. Check it under “License Details” in the center column. Under your Control Panel’s Program and Features Add/Remove Program uninstall the following entries: RAD Studio 10.4 version 21.0 Please follow these instructions to remove any leftover files: If Windows 32-bit, remove the C:\Program Files\Embarcadero\Studio\21.0 directory (or the custom folder you had used). If Windows 64-bit, remove the C:\Program Files (x86)\Embarcadero\Studio\21.0 directory (or the custom folder you had used). Remove the C:\Users\Public\Documents\Embarcadero\Studio\21.0 directory Remove the C:\ProgramData\Embarcadero\Studio\21.0 directory. Remove the %APPDATA%\Embarcadero\BDS\21.0 directory. Remove the HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\21.0 registry key If Windows 32-bit, remove the HKEY_LOCAL_MACHINE\SOFTWARE\Embarcadero\BDS\21.0 registry key If Windows 64-bit, remove the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Embarcadero\BDS\21.0 If Windows 32-bit, remove the following files from C:\Windows\System32\: BDEAdmin.* CC32*.DLL Midas.* Xerces*.DLL If Windows 64-bit, remove the following files from C:\Windows\SysWOW64\: BDEAdmin.* CC32*.DLL Midas.* Xerces*.DLL Field testers should also do the following (and others may want to as well): Delete the Godzilla license from License manager before uninstalling it or during the installation of RAD Studio 10.4 If you had problems in the second step (uninstalling from Windows Control Panel), try this Microsoft tool to solve uninstallation problems: http://go.microsoft.com/?linkid=9779673
  21. The IDE compiles my project, then I try to run the project.exe from the IDE and I got the following messages: But if run the compiled project.exe without the IDE in the explorer, it works What could be the problem in the IDE? I already reinstalled Delphi, but still not working. I checked the files in my directory and they are there, also checked the environment variables but everything seems fine
  22. After searching the internet a lot i've decided to create a new unit to be able to assign multiple afterscroll or afteropen events to one component ... very simple in runtime. Informations on https://www.delphipraxis.net/143341-event-multicast-problem-howto-sender-methodname.html helped me to create a basic unit. Pls check it at https://github.com/MicrotronX/Multicast-Events I know, there must be something better out there ... but for me this works very good ... PS: I cannot guarantee that the source code is free of bugs! Example-Usage in a tDataset descant: unit myMulticastEventDatasetUnit; interface uses System.Classes, Data.DB, mxEventsUnit; type tmyMulticastEventDataset=class(tDataset) private function fmxevents_get:tmxevents; public fmxEvents:TmxEvents; constructor Create(AOwner:TComponent); override; destructor Destroy; override; published property mxEvents:TmxEvents read fmxevents_get; end; implementation constructor tmyMulticastEventDataset.Create(AOwner: TComponent); begin inherited; fmxEvents:=nil; end; destructor tmyMulticastEventDataset.Destroy; begin if assigned(fmxEvents) then fmxEvents.free; fmxEvents:=nil; inherited; end; function tmyMulticastEventDataset.fmxevents_get: tmxevents; begin // we Create the tmxEvents only if there is a need if not assigned(fmxevents) then begin fmxEvents:=tmxEvents.create(self); end; result:=fmxevents; end; end. If someone knows a way to inject this into tDataset itself, you're free to change the code! Declarations for Examples: myDS:tmyMulticastEventDataset; procedure FirstAfterScrollEvent(vDataset:tDataset); procedure SecondAfterScrollEvent(vDataset:tDataset); Example-Usage for registering a AfterScroll Event: myDS.mxEvents.Event('AfterScroll').AddDatasetNotifyEvent('uniquenameforevent1', FirstAfterScrollEvent) ; myDS.mxEvents.Event('AfterScroll').AddDatasetNotifyEvent('uniquenameforevent2', SecondAfterScrollEvent) ; Example-usage for disabling a already registered AfterScroll Event: myMCDS1.mxEvents.Event('AfterScroll').Disable('uniquenameforevent1') ; myMCDS1.mxEvents.Event('AfterScroll').Disable('uniquenameforevent2') ;
  23. Hi all, I just wanted to let you know my (long-awaited) FMX book is now available (actually it is rolling out on Packt and Amazon so availability may be different across different countries). If you like to read some details you can read my latest blog post: https://blog.andreamagni.eu/2020/10/book-delphi-gui-programming-with-firemonkey-now-available/ I really hope the book will be useful to spread Delphi and FMX as development platform. Thanks for the attention, Andrea
  24. Alexandre Pires

    How to read a table every x time.

    Hi Guys, I need my Android background service to read a table from my database every 30 seconds. What would be the best way to do this? I am currently using an infinite loop in a thread and sleep, but I believe it is not the best approach. @Dave Nottage Is there any kastri component that helps to do this? I am using Delphi 10.3 Thanks for some help Alexandre
  25. is it possible to tweek the GExpert tool to search in the background for all function/procedure references and paint the result count on the source editor window like the attached picture? the Grep search feature now works great and it already has the functionality to jump to other files. so my proposition is to make the Grep search for all functions/procedure references that are found on the project path and lib path and the standard paths. then paint the count like visual studio is doing. and when the user clicks on the count the grep window is shown, and in future iteration it can be enhanced to show the implementation where the reference directly. This is just an idea that I had after spending an hour to locate all the references of a function in a large project.
×