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 226 results

  1. Hey, i updated RAD Studio to version 12 last week. Now i wanted to update my app to work with the new android play store requirements. While testing my features i found out, that my app keeps on hanging on a black screen when i try to import a text file with a file explorer. When i manually close the app, and choose a text file and open it with my app it is working fine, but when i open the app, and then go back to my file explorer select the text file to open it again it hangs in a black screen. I tried it also with a completely new project and had the same result. I am using a Pixel 8 with Android 14. I added this intent filter to my AndroidManifest.template.xml in the activity section: <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity" android:exported="true" android:label="%activityLabel%" android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|uiMode" android:launchMode="singleTask"> ... <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:mimeType="text/plain" /> </intent-filter> </activity> And handle it like that: var currentIntent := MainActivity.getIntent(); HandleIntentAction(currentIntent); The handling works like a charm. When starting the app in debugging nothing happens, also logcat is showing noting in regards of my app. I also added some ShowMessages to the FormCreate functions, but also nothing. I added two logcat logs as an attachment to this post. In my opinion there is nothing wrong in the not working log. In addition to the hanging, is there a possibility to open a view directly with an intent because when i try to do a form.show it wont show up, but i haven't followed up on this issue because i wanted to resolve the black screen first. Thank you in advance! Kind regards, Dominik not_working.log working.log
  2. Hey Y'All, Official launch of the 1 Billion Row Challenge Happy coding and don't forget to have fun!! Cheers, Gus
  3. I have this routine that lists all running processes in a listbox under Windows 7. However, it is not a complete list as I thought, because when I load up the Task Manager, it has more entries (when I select '[y] show processes from all users'). Here is a complete project listing showing two working methods to obtain the running processes into a listbox. The only limitations with these are that they show less entries than what the Task Manager shows. Question: How do I obtain that same listing in delphi that the Task Manager shows? TIA. unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.ComCtrls; type TForm1 = class(TForm) Panel1: TPanel; PageControl1: TPageControl; TabSheet1: TTabSheet; TabSheet2: TTabSheet; m1: TMemo; lb1: TListBox; btnGetProcesses1: TButton; Splitter1: TSplitter; btnPause: TButton; st1: TStaticText; btnGetProcesses2: TButton; procedure btnPauseClick(Sender: TObject); procedure btnGetProcesses2Click(Sender: TObject); procedure btnGetProcesses1Click(Sender: TObject); private { Private declarations } public { Public declarations } procedure GetProcesses_1; procedure GetProcesses_2; end; var Form1: TForm1; ts: tstrings; n: integer=0; // out counter for the listbox of items. implementation {$R *.dfm} uses tlHelp32; procedure tform1.GetProcesses_1; // #1 var handler: THandle; data: TProcessEntry32; PID: cardinal; function GetName: string; var i:byte; begin Result := ''; i := 0; while data.szExeFile[i] <> '' do begin Result := Result + data.szExeFile[i]; //PID := data.th32ProcessID; Inc(i); end; end; begin n:=0; ts:=tstringlist.Create; Data.dwSize := SizeOf(Data); form1.DoubleBuffered:=true; lb1.DoubleBuffered := true; lb1.Items.BeginUpdate; lb1.Items.Clear; lb1.Sorted:=true; handler := CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0); if Process32First(handler, data) then begin ts.Add(GetName()); //lb1.Items.Add({inttostr(data.th32ProcessID) + ': '+}GetName()); while Process32Next(handler, data) do begin ts.Add(GetName()); inc(n); //lb1.Items.Add({inttostr(data.th32ProcessID) + ': '+}GetName()); end; end else ShowMessage('Error'); lb1.Items.EndUpdate; lb1.Items.Assign(ts); st1.Caption := inttostr(n); ts.Free; end; procedure TForm1.btnGetProcesses1Click(Sender: TObject); begin GetProcesses_1; end; procedure tform1.getprocesses_2; // method #2, from https://www.vbforums.com/showthread.php?350779-Delphi-Getting-Running-processes-into-a-List-Box-and-Kill-Selected var MyHandle: THandle; Struct: TProcessEntry32; begin n:=0; try MyHandle:=CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0); Struct.dwSize:=Sizeof(TProcessEntry32); if Process32First(MyHandle, Struct) then form1.lb1.Items.Add(Struct.szExeFile); while Process32Next(MyHandle, Struct) do begin form1.lb1.Items.Add(Struct.szExeFile); inc(n); end; except on exception do ShowMessage('Error showing process list'); end end; procedure TForm1.btnGetProcesses2Click(Sender: TObject); // method #2 begin n:=0; getprocesses_2; st1.Caption := inttostr(n); end; end.
  4. Hello everyone, I'm seeking insights on database development practices in Delphi with Firebird. I have two specific questions: When it comes to database development in Delphi, what is the recommended approach: utilizing data-aware components like drag-and-drop fields and linking with TFDQuery for CRUD operations, or segregating CRUD operations into separate units for forms? I'm particularly interested in understanding the balance between ease of use, efficiency and code usability. Any insights or examples you can provide would be greatly appreciated. Often, we encounter situations where we need to fix a bug or implement changes in just one form out of many (over 100 forms) within our system. Currently, we update the complete executable, which includes all VCL forms in one project. What would be the best approach to handle such incremental updates efficiently without impacting all clients? I'm eager to learn about effective strategies in this scenario. Thank you for your valuable input. Warm regards, Noor
  5. Dear visitors, We like to inform you that new version of NextSuite6 is released. Click here to read the release news. This update introduces a new grid view: StacksGridView, where columns from a each row are stacked into groups:  Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code.   and many more.  Few screenshots:      Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip Boki (BergSoft) boki@bergsoft.net | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: users.bergsoft.net Articles and Tutorials: help.bergsoft.net (Developers Network) -- BergSoft Facebook page -- Send us applications made with our components and we will submit them in news article. Link to this page will be also set on home page too.
  6. tinyBigGAMES

    CPas - C for Delphi

    Overview What if you were able to load and use C99 sources directly from Delphi? There is a vast quantity of C libraries out there and being able to take advantage of them, without being a pain would be nice. You could even compile a bunch of sources and save them as a library file, then load them back in from disk, a resource or even from a stream. You can get the symbols, map to a C routine, and execute from the Delphi side all from a simple API. Downloads Releases - These are the official release versions. Features Free for commercial use. Allow C integration with Delphi at run-time. Support Windows 64-bit platform. Support for C99. Fast run-time compilation. Can run C sources directly or compile to (.LIB, .EXE, .DLL). Library files can be loaded and used at run-time from a file, a resource or stream. Import symbols directly from a dynamic linked library (.DLL) or module-definition (.DEF) file. You can reference the symbols from Delphi and directly access their value (mapping to a routine and data). Your application can dynamically or statically link to CPas. Direct access to the vast quantity of C99 libraries inside Delphi. Minimum System Requirements Delphi 10 (Win64 target only) FreePascal 3.3.3 (Win64 target only) Microsoft Windows 10, 64-bits 20MB of free hard drive space How to use in Delphi Unzip the archive to a desired location. Add installdir\sources, folder to Delphi's library path so the CPas source files can be found for any project or for a specific project add to its search path. Add installdir\bin, folder to Windows path so that CPas.dll file can be found for any project or place beside project executable. See examples in installdir\examples for more information about usage. You must include CPas.dll in your project distribution when dynamically linked to CPas. See CPAS_STATIC define in the CPas unit file. See installdir\docs for documentation. A Tour of CPas CPas API You access the easy to use API in Delphi from the CPas unit. {.$DEFINE CPAS_STATIC} //<-- define for static distribution type { TCPas } TCPas = type Pointer; { TCPasOutput } TCPasOutput = (cpMemory, cpLib); { TCPasExe } TCPasExe = (cpConsole, cpGUI); { TCPasErrorMessageEvent } TCPasErrorEvent = procedure(aSender: Pointer; const aMsg: WideString); { Misc } function cpVersion: WideString; { State management } function cpNew: TCPas; procedure cpFree(var aCPas: TCPas); procedure cpReset(aCPas: TCPas); { Error handling } procedure cpSetErrorHandler(aCPas: TCPas; aSender: Pointer; aHandler: TCPasErrorEvent); procedure cpGetErrorHandler(aCPas: TCPas; var aSender: Pointer; var aHandler: TCPasErrorEvent); { Preprocessing } procedure cpDefineSymbol(aCPas: TCPas; const aName: WideString; const aValue: WideString); procedure cpUndefineSymbol(aCPas: TCPas; const aName: WideString); function cpAddIncludePath(aCPas: TCPas; const aPath: WideString): Boolean; function cpAddLibraryPath(aCPas: TCPas; const aPath: WideString): Boolean; { Compiling } procedure cpSetOuput(aCPas: TCPas; aOutput: TCPasOutput); function cpGetOutput(aCPas: TCPas): TCPasOutput; procedure cpSetExe(aCPas: TCPas; aExe: TCPasExe); function cpGetExe(aCPas: TCPas): TCPasExe; function cpAddLibrary(aCPas: TCPas; const aName: WideString): Boolean; function cpAddFile(aCPas: TCPas; const aFilename: WideString): Boolean; function cpCompileString(aCPas: TCPas; const aBuffer: string): Boolean; procedure cpAddSymbol(aCPas: TCPas; const aName: WideString; aValue: Pointer); function cpLoadLibFromFile(aCPas: TCPas; const aFilename: WideString): Boolean; function cpLoadLibFromResource(aCPas: TCPas; const aResName: WideString): Boolean; function cpLoadLibFromStream(aCPas: TCPas; aStream: TStream): Boolean; function cpSaveOutputFile(aCPas: TCPas; const aFilename: WideString): Boolean; function cpRelocate(aCPas: TCPas): Boolean; function cpRun(aCPas: TCPas): Boolean; function cpGetSymbol(aCPas: TCPas; const aName: WideString): Pointer; { Stats } procedure cpStartStats(aCPas: TCPas); function cpEndStats(aCPas: TCPas; aShow: Boolean): WideString; If you want CPas to be statically bound to your application, enable the {$CPAS_STATIC} define in the CPas unit. How to use A minimal implementation example: uses System.SysUtils, CPas; var c: TCPas; // CPas error handler procedure ErrorHandler(aSender: Pointer; const aMsg: WideString); begin WriteLn(aMsg); end; begin // create a CPas instance c := cpNew; try // setup the error handler cpSetErrorHandler(c, nil, ErrorHandler); // add source file cpAddFile(cp, 'test1.c'); // link and call main cpRun(cp); finally // destroy CPas instance cpFree(c); end; end. Compatibility These are some libraries that I've tested. If you have tried more, let me know and I can add them to the list. miniaudio (https://github.com/mackron/miniaudio) raylib (https://github.com/raysan5/raylib) sfml (https://github.com/SFML/CSFML) stb_image (https://github.com/nothings/stb) stb_image_write (https://github.com/nothings/stb) stb_truetype (https://github.com/nothings/stb) stb_vorbis (https://github.com/nothings/stb) Media ❤ Made in Delphi
  7. Ali Dehban

    ChatGPT plug-in for RAD Studio.

    Hello, everybuddy. Recently I made a plug-in for Delphi to use ChatGPT inside the IDE. The main service is ChatGPT but it's actually multi-AI support, you can get responses from three different sources, compare and decide. I hope this can be helpful and accelerate your work. Repository: https://github.com/AliDehbansiahkarbon/ChatGPTWizard Key features: - Free text question form. - Dockable question form. - Inline questions(in the editor). - Context menu options to help you to find bugs, write tests, optimize code, add comments, etc... - Class view. - Predefined Questions for class view. - History to save your tokens on OpenAI ! - Fuzzy string match searches in the history. - Animated letters(Like the website). - Proxy server options. - Supports Writesonic AI (https://writesonic.com) - Support YouChat (https://you.com) Short Video 1: Short Video 2 - Inline Questions: Full Video (ver. 2.0):
  8. Mandy.Rowlinson

    Delphi Certified Developer Exam

    Hi, Anyone went through the Delphi Certified Developer Exam recently ? What sort of questions you got asked ? Any tips to pass the exam ? Thank you.
  9. I have a pascal project and looking for a static scanning tool for security code review for the Pascal programming language. All the tools out there that i found so far were only for performance code review and not for security. Anyone knows a tools that can do the job? Some scanning tool and I expect it to help me find security flaws in my project, but couldn't find a good security tool.
  10. We have an application built in Delphi XE6. We are using the component named 'TppReport' from the report builder to generate the reports. Currently, we are facing an issue while exporting the report. The application can generate and export the report in the respective format for the first time. However, when we try to export it for the second consecutive time, the file is not generated. If we restart the application then the report is generated and exported only for the first time instance. When we tried to debug this behavior we came to know that we were getting an access violation error in the RequestPage procedure inside that generate method of ppEngine.pas file. This error comes up when we execute the line CustomReport.PrintReport. This happens when we have bands in the report. Below are more details - Delphi Version - XE6 Version 20.0.16277 Report Builder Version - 20.04 Build 302 Any help would be appreciated.
  11. I have installed PowerPDF in Delphi 12 via GitHub. The master package in Git seems to be made ready for Delphi12 (there is an 11AndAbove subdir). In previous Delphi versions I used to install PowerPDF via GetIt, but the package still is not available. After about 3 months I can no longer wait. Anyway, it looks like the installation was a success: all controls are in place, and I can drop a TPrReport component on a form. However, the next step, i.e. to drop a TPrPage, fails, showing the "Class Arial not found" message. Since a TPrPage is the container for all other PowerPDF controls, the package is unusable. I have no idea how to get it to work. Do you? I very much appreciate your help or hints.
  12. Hi in delphi 12 show this error [DCC Error] E2597 ld: file not found: /usr/lib/swift/libswiftUIKit.dylib Which framework do I need to add? Delphi 12 , XCODE 13.4 Thanks
  13. I got stuck with a massive source base in Delphi 2007. I upgraded to Delphi 2010 but the prospect of upgrading my whole software base and the 3rd party stuff through unicode was too much so it dropped thought. When Embarcadero did a trade show in my area, I was intrigued by the idea of developing web apps and I bought XE3. But I wasn't impressed and it didn't seem to be able to create web apps anyway. I experimented a bit but after a week, uninstalled Delphi XE3. Now, I see in my Delphi Account at Embarcadero thet there is a XE5 ISO. Does that mean I get a free upgrade to XE5? I emailed but never got an answer! I'm just wondering if it is worth a try. I would like to hear what anyone else has to say...
  14. I was searching around bestbuy for a streaming device that I could hook up my phone to the device and connect it to my laptop. And after searching around I saw that there are other ways to stream using OBS software on the laptop and installing an app on the phone via an ipp address. Is there a way to do this with Delphi so I don't have to worry about installing someone's app and being on *their* server? I would rather do it the Delphi way if possible, TIA.
  15. robertjohns

    ListView

    Any way to add an option of Opendialog filename path selection in each listview subitem Item similar to below Image
  16. I am just starting to use the TValueListEditor and found out that there is no wordwrap feature. I have text that are longer than I can see and there is no scroll feature. Actually, there is, but it does not do what I expect it to do as a scroll (left/right), but even so, it would be too cumbersome to utilize. I would much prefer to have the text wordwrapped. Is there a way I can easily add a custom wordwrap to it?
  17. Since years, our Open Source mORMot framework offers several ways to work with any kind of runtime arrays/objects documents defined, e.g. via JSON, with a lot of features, and very high performance. Our TDocVariant custom variant type is a powerful way of working with such schema-less data, but it was found confusing by some users. So we developed a new set of interface definitions around it, to ease its usage, without sacrificing its power. We modelized them around Python Lists and Dictionaries, which is proven ground - with some extensions of course. Two one-liners may show how our mORMot library is quite unique in the forest/jungle of JSON libraries for Delphi (and FPC): +] assert(DocList('[{ab:1,cd:{ef:"two"}}]')[0].cd.ef = 'two'); assert(DocList('[{ab:1,cd:{ef:"two"}}]').First('ab<>0').cd.ef = 'two'); Yes, this code compiles and run on Delphi - even the antique Delphi 7. 😆 If you compare e.g. to how the standard JSON library works in the RTL, with all its per-node classes, you may find quite a difference! And there is no secret in regard to performance, that our JSON processing is fast. More info: https://blog.synopse.info/?post/2024/02/01/Easy-JSON-with-Delphi-and-FPC
  18. robertjohns

    Filtering ListBox Items

    Is there any way to Filter TMS HTMListBox Items like TMS AdvListBox
  19. I have used Delphi 12 for developing Android application and I'm trying to Service which needs to runs in the background to receive the frequent messages from Server using TCP sockets to displays the notifications. But, the service is deactivated / closed after the main process application is closed. Below, the code is mentioned the code to start the service : procedure TForm1.ButtonServiceStartClick(Sender: TObject); var ServiceIntent: JIntent; begin ServiceIntent := TJIntent.Create; ServiceIntent.setClassName(TAndroidHelper.Context, StringToJString('com.embarcadero.services.MyService')); TAndroidHelper.Context.startService(ServiceIntent); end; and also, I have added the following service information in AndroidManifest.template.xml : <service android:enabled="true" android:exported="false" android:label="MyService" android:process=":remote" android:name="com.embarcadero.services.MyService"> </service> Code in Service: function TDM.AndroidServiceStartCommand(const Sender: TObject; const Intent: JIntent; Flags, StartId: Integer): Integer; begin Result := TJService.JavaClass.START_STICKY; end; I have tried to use this Solution, but not able to compile. And tried to implement the Sleep in Android Start command / run the thread, still the android service is getting closed. Do, I need to mentioned the different flag for starting the service or do I need to add additional code to run the service all the time or can we restart the service once it's destroyed and how to handle the code in Destroy event?
  20. I use ms powerpoint to hold and store all my screenshots of various things throughout the day using my main laptop. I especially do this for items I purchase on Amazon and Ebay. However, on my tablet I cannot do this since I don't have MS Office on it. So now, I would like to create a rolling image bar that holds/shows all my screenshots made on the tablet and then save them all in one file, like a project. I want to do something very similar to what powerpoint does, but nothing fancy. Just a vertical toolbar that holds/shows all images I made. Is there a component that can help me halfway through this project idea, or can I build something close to what I want to do with the tools/components already built into D11/D12 ? In my vision of such a tool, I have the following: 1. a panel/toolbar 2. an timage 3. button to capture the screenshot(s) 4. add/create a new timage in the toolbar every time I take a screenshot (get from cliboard, etc) 5. scroll up/down inside the toolbar of images that I took thus far 6. a main timage that shows the screenshot I take 7. and if I click on any of the images in the toolbar, that image will show on the main timage 8. save and load buttons All this in the above steps are basically what I do in ms powerpoint.
  21. In my Delphi application (Embarcadero RAD Studio 10.0 Seattle), I am trying to convert an rvf file to HTML using TJvRichEdit and TJvRichEditToHtml components. The issue I am facing is that the HTML file appears in ANSI encoding format. I need to get it in UTF-8 format to display the proper content in html file. I have tried the following ways to achieve the same: Tried to use the available properties of TJvRichEdit for converting ANSI to UTF-8. Tried to add the rtf file to TStrings and then used UTF8Encode to convert it. Tried to add data into TMemoryStream and then tried adding it to TJvRichEdit. Used TStreamReader to get the encoding format of the source file and then used TStreamWriter to convert it into UTF-8 encoding. All the above ways convert the encoding format but the content remains in ANSI format. I have also tried using TRichEdit, TcxRichEdit and TdxRichEditControl to find out if we can load data into html file. But the data gets loaded in ANSI encoding format itself. Any help would be appreciated.
  22. Arnaud Bouchez

    ANN: mORMot 2.2 stable release

    With this new year, it was time to make a mORMot 2 release. We went a bit behind the SQlite3 engine, and we added some nice features. 😎 Main added features: - OpenSSL 3.0/3.1 direct support in addition to 1.1 (with auto-switch at runtime) - Native X.509, RSA and HSM support - mget utility (wget + peer cache) Main changes: - Upgraded SQLite3 to 3.44.2 - Lots of bug fixes and enhancements (especially about cryptography and networking) - A lot of optimizations, so that we eventually reached in top 12 ranking of all frameworks tested by TFB https://github.com/synopse/mORMot2/releases/tag/2.2.stable 🙂
  23. I am wanting to execute a CLI command to convert all FLAC files to MP3, after looking on google and the usual places I have come up with procedure TForm1.act_MUSIC_CONVERSION_FLACStoMP3Execute(Sender: TObject); begin ShellExecute(0, nil, 'cmd.exe',PWideCHar( 'find '+PwideChar(form1.FileListBox1.Directory)+'. -name "*.flac" -exec ffmpeg -i {} -ab 320k -map_metadata 0 -id3v2_version 3 {}.mp3 \;'), nil, SW_HIDE); end; however the command window opens but nothing is executed :(
  24. Hi, I take many photos with my Android phone. And now I need a way to Add some search text to the image so that I can find the photos. With a custom image viewer app I will create in conjunction with the metadata reader/writer, my search method would be to open the phone's Gallary (I don't know how to do this yet) and then enter a search word and only photos that match will show, like the way they do when you are in the Gallary app. I searched around and see references for ccr-exif but it is for Delphi VCL, not FMX/Android. Is there a Delphi unit that provides this or someplace where I can download a working project to accomplish this ? TIA.
×