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


  • 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


Last Updated

  • Start


Filter by number of...


  • Start




Found 106 results

  1. Piotr0603

    Deployment Android apk

    Hi, I am new in Delphi (10.4 Community Edition) developing on Android devices. I want to add a little text file to my apk on Android device. I do all what is described in https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Deployment_Manager: (Alexandria or 10.4 - the diffirence does not matter I think) 1. choose file in my laptop (Windows 10) - file is shown in Deployment Manager with the same name 2. in column "remote path" write the name of directory on Android device: .\assets\internal\Android\data\com.android.Tuczarnia\files\ (Tuczarnia is the name of apk) 3. build the apk 4. my file can't be found on folder ..internal\Android\data\com.android.Tuczarnia\files\ 5. I noticed that 'Connect" button in Deployment Manager is not active and all files have status "Not Connected", but it seems (after reading help of Deployment Manager) that this works automatically for Android 6. and I noticed, after unzipping the "apk" file, that my file is present in "assets/internal/Android/data/com.android.Tuczarnia/files/" inside that file 7. so it seems to me, that file is lost during the process of installing the apk - WHY? I use and have 1. Windows 10 2. Delphi 10.4 Community Edition 3. phone Xiaomi Redmi 8 with Android 10 Important: my application works fine without adding this file, application has over 10 screens and uses SQLite with no problems. So only one and new problem is adding new file. Thanks in advance to everyone piotr0603
  2. How to set the affinity for TOmniThread/TOmiTaskControl, it is keep on resetting the default affinity value (utilizing all CPU's). I tried setting Environment.Process.Affinity.AsString, but this value also keep on changing to default (255), it is happening when the OmiThread starts, I see it have many properties to set the affinity, but I'm not sure how to set it.
  3. tinyBigGAMES

    GameVision Toolkit

    Ahh, finally at a point where I can start to update my GameVision framework to support modern PCs. This new generation will power upcoming game projects. I created a Facebook group for it, and I plan to post frequently about my progress. If you wish to follow, then you're invited to the cookout. Stop by and hang. Cold beer, burgers on the grill. LOL. https://www.facebook.com/groups/gamevisiontoolkit
  4. I want to write some simple application (the app I've always dreamed of) that will show Football Chamionships (user can enter match results and app will show tables and some statistics). My problem is sorting groups in Chamionships Group Stage (Quatar 2022). As we know, there are 8 groups (A-H) with 4 Teams each. Lets focus on Group A. So, we have 4 teams: A1, A2, A3 and A4. ONLY 2 OF THEM CAN PLAY IN KNOCKOUT STAGE. How to know which one? Anyone of you solved such problem? FIFA says: The ranking of teams in the group stage is determined as follows: 1. Points obtained in all group matches; 2. Goal difference in all group matches; 3. Number of goals scored in all group matches; 4. Points obtained in the matches played between the teams in question; 5. Goal difference in the matches played between the teams in question; 6. Number of goals scored in the matches played between the teams in question; 7. Fair play points in all group matches (only one deduction can be applied to a player in a single match): - Yellow card: −1 point; - Indirect red card (second yellow card): −3 points; - Direct red card: −4 points; - Yellow card and direct red card: −5 points; 8. Drawing of lots. I need to cover 6 points (7 and 8 can be ignored for the moment). There are 6 matches in Group, each Team play with another from group. A1:A2 | A3:A4 A1:A3 | A4:A2 A4:A1 | A2:A3 I have no idea how to sort teams with FIFA guidelines. Have you got any idea? How to cover all conditions in one sort function? Could you maybe write for me some code to show how to do this? Ps: If this is to difficult/complex - how much many would it cost for you to write some simple solution for me? -Pawel
  5. The FireMonkey Low Code App Wizard works fine on Delphi 11 (in RAD Studio 11). The generated project runs without issue. However, after upgrading to 11.1, whenever I run any generated project by the wizard, I got an error, like this: After using the debugger to trace the error source, I found that when the program runs to this line (in the function TScreenOrientationMonitor.GetScreenOrientation in Model.Types.pas) the error will be raised. Since I'm new to this wizard, can anyone please share any clue with me? Thanks a lot.
  6. misc_bb

    PDF Library

    Any recommendations for Delphi library for PDF handling? I'm currently working on merging multiple files into 1 pdf file. Fast-reports said it handle this, any thoughts?
  7. I am emailed html files that link to a Cisco "Secure Email Encryption Service". I can load the downloaded html into a TEdgeBrowser, manually enter the password, click the button, and access the content using document.innerHTML. I need to be able to get the program to fill in the password and click the submit button. Nothing happens when I execute the code I expect to work. I created the following a test form which uses the same input and button: <form action="https://www.google.com" method="post"> Password: <input name="key1" id="passwordInput1" autocomplete="off" type="password"><br> <input type="submit" "id="text_i18n.authframe.safr.button.openonline" value="Open Online" name="openButton"> </form> I set the password using: document.getElementById("passwordInput1").value = 'mypass' I click the button using: document.querySelector("input[type=submit]").click(); Everything works as expected with my test form but I am unable to accomplish this with the "Secure" form. This is likely because the values are embedded in other elements. The structure is very complex and I am leaving out many table rows and other details. I think I have identified the important elements as shown below: <table id="outerTable" <tbody> <tr> <td id="iframelocation"> <iframe id="authFrame" #document >html> <body> <form> <table class="mainWIndow"> <tbody> <tr> <td id="heightControl" <table> <tbody> <tr> <td> <table id=borderTable"> <tbody> <tr> <td id=passwordEntry1"> <p> <input size="20" maxlength="127" name="key1" id="passwordInput1" placeholder="Secure Email Encryption Service Password" title="Enter your password here" autocomplete="off" type="password" style="width: 100%;"> </input> The button is in <td id="openButtonLocation"> in <td id="buttonContainer" eventually going batck to <tr id=buttonRow", etc. and is defined as: <input type="submit" id="text_i18n.authframe.safr.button.openonline" value="Open Online" name="openButton" onclick="openOnline()" class="btn"> The ExecuteScript seems to only execute one line of javascript so I am not sure how to access the field and the button. What do I need to do differently? I would also like to be able to accomplish this using the types (password and submit) instead of the Id once I get this working. Thanks
  8. tinyBigGAMES

    Spark Game Toolkit

    Spark Game Toolkit is a work-in-progress, open-source 2D game development system for Delphi. If you wish to contribute to its development, fantastic. If you are only curious about game libraries and only wish to look around or just use it, cool too. It's early in development and will be updated frequently. PRs are welcome. Be sure to join our discord server, follow us on twitter, connect with us over at our website or just spread the word. Any help appreciated. Continue to check the GitHub repo, more information will be provided as the project takes shape. https://github.com/tinyBigGAMES/Spark
  9. Albion

    Calculation problem

    Good afternoon, I encountered such a problem, when executing a python script, the calculations are not written to the output fields, and therefore cannot go further, since they take values from them. Can anyone tell me what I did wrong?
  10. Hi all, I'm looking to distribute my android app on play store using Delphi 10.3. I know I should upgrade to Delphi 11, but trying to compile the app in the new version I'm stuck in a number of memory or compilation issues. When on Delphi 10.3 I try to start the project deployment I always get the same error "[PAClient Error] Error: E0002 Missing profile name; use paclient -? For Help". I tried to use various versions of the SDK: I tried 26, 28, 29 and even 30 but nothing. When I compile it in development mode both in debug and in release I can load it on my smartphone with Android 10, while compiling it in Release and Application Store mode I get the error mentioned. Some idea? Thanks in advance
  11. Dear visitors,  We are offering excellent opportunity to get 35% off on our Next Suite Delphi (VCL) Components. Just use EASTER coupon code on the checkout page to get 35% off. 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. new 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  Best regards  Boki (BergSoft) boki@bergsoft.net | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: bms.bergsoft.net Articles and Tutorials: developer.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.
  12. Albion

    Testing with python

    Good day everyone! I have a question. Perhaps someone has already experienced this. I have a ready-made program on Delphi. And I need to initialize and execute all the functions of this program using a Python script. Is it possible to accomplish this task only with the help of TPytnon components? Without adding memos and other things as shown in the demo programs. Just run the script and get the result. Maybe someone can help with this question. I would be very grateful for any help. Thanks for attention.
  13. Using Livebindings to link a TDataset to a TListview on the same TForm is fine. But I'm still struggling to find a way to connect a TDataset on a TDataModule and a TListView on a TForm using Livebindings. It seems that both the LiveBindings Wizard and the LiveBindings Designer can only work on a datamodule or a form at a time. Is there a standard way to do that, or it's just not possible? Thanks.
  14. I'm using the "SSH_Pascal" library and creating an SSH connection via delphi. After a lot of effort I discovered that it is necessary to have your RSA key and your host in this file called "known_hosts" in windows it is usually at: %USERPROFILE% + .ssh\known_hosts To create an RSA key using openSSH via CMD is simple, see the command: ssh-keyscan -t rsa your host There, your RSA key is created. The only difficulty I'm having is getting this RSA via cmd and adding it to the file. the simplest way through cmd would be: ssh-keyscan -t rsa your host > %USERPROFILE% + .ssh\known_hosts To insert the value into the file. But using by delphi is not working. I tried using a function(GIst.Github) to get the DOS output, without success. When it enters This step of the Function WasOK := ReadFile(StdOutPipeRead, Buffer, 255, BytesRead, nil); it hangs It just hangs. I've tried to increase the buffer size but without success, does anyone have any ideas?
  15. tinyBigGAMES

    SFML for Pascal

    SFML Simple Fast Multimedia Layer Bindings that allow you to use SFML and other useful C libraries with Pascal. Included CSFML (https://github.com/SFML/CSFML) pl_mpeg (https://github.com/phoboslab/pl_mpeg) Nuklear (https://github.com/Immediate-Mode-UI/Nuklear) physfs (https://github.com/icculus/physfs) minizip (https://github.com/madler/zlib) SDL (https://github.com/libsdl-org/SDL) Minimum Requirements Windows 10+ (64 bits) Delphi Community Edition (Win64 target only) FreePascal 3.2.2 (Win64 target only) Usage Add SFML to your uses section to access all the aforementioned libraries. You link to SFML dynamically by default and will look for the SFML DLL in your application path. You can also call InitSFML, before any other routine, with a the path to the DLL location. Define SFML_STATIC in SFML.pas to statically link to SFML and the DLL will not have to be included in your application distro. InitSFML will have no effect and you can leave it in your sources so that you can switch between static and dynamic linking during development. uses SysUtils, SFML; var Mode: sfVideoMode; Window: PsfRenderWindow; Event: sfEvent; Music: PsfMusic; begin Mode.Width := 800; Mode.Height := 600; Mode.BitsPerPixel := 32; Window := sfRenderWindow_create(Mode, 'Hello SFML', sfResize or sfClose, nil); Music := sfMusic_createFromFile('arc/audio/music/song01.ogg'); sfMusic_play(Music); while sfRenderWindow_isOpen(Window) = sfTrue do begin while sfRenderWindow_pollEvent(Window, @Event) = sfTrue do begin if Event.kind = sfEvtClosed then sfRenderWindow_close(Window); end; sfRenderWindow_clear(Window, DARKSLATEBROWN); sfRenderWindow_display(Window); end; sfMusic_stop(Music); sfMusic_destroy(Music); sfRenderWindow_destroy(Window); end. Support Issues Discussions SFML website SFML on YouTube
  16. 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
  17. I have to combine these two codes, the first is for sending messages and the second for sending files: procedure TForm1.serverExecute(AThread: TIdContext); var clients:tlist; i:integer; messaggioprelevato:string; begin messaggioprelevato:=AThread.Connection.IOHandler.ReadLn; showmessage (messaggioprelevato); clients := Server.Contexts.LockList;; try for i:=0 to connessi-1 do try TIdContext(clients.Items[i]).Connection.IOHandler.WriteLn(messaggioprelevato); except end; finally end; Server.Contexts.UnlockList; end; procedure TForm1.ServerExecute(AContext: TIdContext); var FileName: string; TFSFileIn: TFileStream; begin TThread.Synchronize(nil, procedure begin Zilename := 'C:'; end); TFSFileIn := TFileStream.Create(FileName, fmCreate); try AContext.Connection.IOHandler.ReadStream(TFSFileIn); finally TFSFileIn.Free; end; end;
  18. Greetings Dear Delphians, Say we have 20 Forms in an App. We use these 6 lines to create 20 Forms at different places. Form1 := TForm1.Create; try Form1.ShowModal; finally Form1.Free; end; When refactoring we can see this is a lot of code duplication and we should encapsulate form creation in a procedure like this. procedure ShowForm ( ThisForm: TCustomForm ) ; begin ThisForm := TCustomForm(ThisFormClass.Create);//?? How to Get Form Class try ThisForm.ShowModal; finally ThisForm.Free; end; end; I only have problem in first line. how to get ThisForm parent class to call it. Is it even possible? If yes then how? What about FMX? Any help or pointer is appreciated. Thanks and stay blessed
  19. We are hiring remote Delphi developers, Join our team. Details: https://www.mekashron.com/blog/en/post/delphi-developer-from-home
  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 11.0 Alexandria Launch the License Manager from the bin folder (by default “C:\Program Files (x86)\Embarcadero\Studio\22.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 11 version 22.0 Please follow these instructions to remove any leftover files: 1. If Windows 64-bit, remove the C:\Program Files (x86)\Embarcadero\Studio\22.0 directory (or the custom folder you had used). 2. Remove the C:\Users\Public\Documents\Embarcadero\Studio\22.0 directory 3. Remove the C:\ProgramData\Embarcadero\Studio\22.0 directory. 4. Remove the %APPDATA%\Embarcadero\BDS\22.0 directory. 5. Remove the HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\22.0 registry key 6. If Windows 64-bit, remove the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Embarcadero\BDS\22.0 7. If Windows 64-bit, remove the following files from C:\Windows\SysWOW64: BDEAdmin.* CC32*.DLL Midas.* Xerces*.DLL If you had problems in the second step (uninstalling from Windows Control Panel), try this Microsoft tool to solve un-installation problems: https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d
  21. In my Delphi application I select a portion of a wave form for music in a Windows .wav file. I would like to then analyze that selection to produce a frequency spectrum like that in the image below. My objective is to identify the predominant musical pitches in the selection. How can I obtain the amplitude vs. frequency data points for plotting?
  22. Hello, Is there on easy way to install Quickreport 10.3 RIO in Delphi 10.4? Thanks Hans
  23. Hi, Using the VirtualTreeView, an error is raised but why ?. I have recreated a minimal sample to reproduce it. Either my coding does an error (more likely), either the component do it. The problem comes when a node is deleted (only when the deleted node has one sibbling with subnodes) from the OnGetImageIndex event. The event is called with an index greater than avalaible nodes. If someone has an idea ? Delphi 11 + VirtualTree for VCL 2021.09. Thanks a lot, Eddy TestVclVT.zip
  24. Devart rolled out the new Delphi Data Access Components for just released RAD Studio 11 Alexandria with support for Firebird 4 and Apple M1 processors. Devart, a recognized vendor of world-class data connectivity solutions for various data connection technologies and frameworks, presented new versions of Delphi Data Access Components to keep assisting software engineers in developing fast native applications. The key feature of the recently updated products is support for the newly released RAD Studio 11 Alexandria. The release also includes such important enhancements: All Devart Delphi Data Access Components now support Apple M1 processors. Devart became the first vendor of Delphi components with Firebird 4 support. UniDAC now includes new data providers for HubSpot and BigQuery that allow users to connect to these data sources from Delphi or C ++ Builder applications. UniDAC supports the latest version of NexusDB 4.50.27. LiteDAC and UniDAC support a new option - IntegerAsLargeInt, which maps SQLite INTEGER columns to fields of type ftLargeInt. In addition, a new demo project for FastReport FMX is available in all DAC products. To learn more about the recent release, visit: https://blog.devart.com/delphi-data-access-components-for-rad-studio-alexandria.html Delphi Data Access Components are the libraries of components for Delphi developers that provide direct access to multiple databases, and allow developing multi-platform applications in Embarcadero RAD Studio, Delphi, C++Builder, Lazarus, and Free Pascal on Windows, Linux, macOS, iOS, and Android, for both 32-bit and 64-bit platforms. About Devart Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration, and backup solutions. The company also implements Web and Mobile development projects. For additional information about Devart, visit https://www.devart.com/.
  25. Bob Baudewyns

    How to design QR Scan focus screen with FMX

    Hi, I'm developing an application that needs to scan QR Code. For the GUI design, I'd like to provide the usual scan focus screen with a transparent square inside a rectangle (the screen) like the attached mock-up. I already tried different approaches but not very successful. Any idea how could I design this with FMX ? Thanks