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. I'm building a front-end gui to a dos console app. And I am utilizing the TIniFile to read/write to a settings.ini file. I need help with ideas of typical methods or algorithms for creating a rolling or recent folder location list, of say, the last 5 folder locations for a 'dos console app' that I call. The location can be the hdd, flash drive, or another laptop/tablet. The folder locations will be obtained through the FileOpenDialog, so flash drives, mem sticks, etc., could change in a given scenario. I currently have a small settings.ini file that holds just a few things at the moment, thus.. [app settings:] app path=H:\D11\VCL\Misc\enc_gui\v01\Win32\Debug\ last video src path:=J:\Tools\portable\ last video dst path:=F:\dst\ But I would like to add a recent list of last folder locations for this ini file for where the 'dos console app' will be pickd and stored so that I can extract that from the ini file and load it into a listbox and have a quick pick-list to choose from when I move from one device or folder location. I sometimes jump from my laptop to my tablet, or throw in a flash/mem drive, and having this quick picklist would work well in my work-flow. TIA.
  2. HI there i just made a try, i started there! To work on the Android platform using compile directives, i needed to make some modifications to the code in several files. Lets focus on 'svn.overbyte.be/svn/icsv9/Source/OverbyteIcsUtils.pas'.The classTIcsIntegerList is essentially a wrapper around the TList class, since this code was designed for use in a Windows platform target, on a different platform, i needed to make some adjustments. type TIcsIntegerList = class(TObject) private FList : TList<Integer>; // Use TList<Integer> instead of TList function GetCount: Integer; function GetFirst: Integer; function GetLast: Integer; function GetItem(Index: Integer): Integer; procedure SetItem(Index: Integer; const Value: Integer); public constructor Create; virtual; destructor Destroy; override; function IndexOf(Item: Integer): Integer; function Add(Item: Integer): Integer; virtual; procedure Assign(Source: TIcsIntegerList); virtual; procedure Clear; virtual; procedure Delete(Index: Integer); virtual; property Count: Integer read GetCount; property First: Integer read GetFirst; property Last : Integer read GetLast; property Items[Index: Integer] : Integer read GetItem write SetItem; default; end; // ... other codes { TIcsIntegerList } function TIcsIntegerList.Add(Item: Integer): Integer; begin Result := FList.Add(Item); // No need to typecast Item to Pointer end; procedure TIcsIntegerList.Clear; begin FList.Clear; end; constructor TIcsIntegerList.Create; begin FList := TList<Integer>.Create; // Use TList<Integer> instead of TList end; procedure TIcsIntegerList.Delete(Index: Integer); begin FList.Delete(Index); end; destructor TIcsIntegerList.Destroy; begin FList.Free; inherited; end; function TIcsIntegerList.GetCount: Integer; begin Result := FList.Count; end; function TIcsIntegerList.GetFirst: Integer; begin Result := FList.First; // No need to typecast FList.First to Integer end; function TIcsIntegerList.GetLast: Integer; begin Result := FList.Last; // No need to typecast FList.Last to Integer end; // ... other codes but i faced a lot of errors when i target android platform and compiled, it gives me errors like: [DCC Error] OverbyteIcsUtils.pas(5931): E2023 Function needs result type [DCC Error] OverbyteIcsUtils.pas(5933): E2003 Undeclared identifier: 'FList' [DCC Error] OverbyteIcsUtils.pas(5933): E2003 Undeclared identifier: 'Item' [DCC Error] OverbyteIcsUtils.pas(5938): E2004 Identifier redeclared: 'TIcsIntegerList' [DCC Error] OverbyteIcsUtils.pas(5940): E2003 Undeclared identifier: 'FList' [DCC Error] OverbyteIcsUtils.pas(5945): E2037 Declaration of 'TIcsIntegerList' differs from previous declaration ...: So how to fix it? Or can anyone point me to the right direction?
  3. robertjohns

    Removing String

    I have a string like This is (string) which need to (remove) How can I delete strings (string) and (remove) so that result should be This is which need to
  4. Hi, i work in IT Support, and i'm trying to configure a delphi-based to run in RemoteApp. I do not have any access to the code, but when this software is open via RemoteApp it has errors in some parts, this is the error: It ONLY creates an error when its ran by RemoteApp, via RDP it works normally. I just want to know if it is something of Windows or inside Delphi, so i can talk to the programmers.
  5. How to delete all the files just in case you need to, for some unknown reason. Manual uninstall of RAD Studio/Delphi/C++Builder 12.0 Athens 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 12 version 23.0 Please follow these instructions to remove any leftover files: 1. If Windows 64-bit, remove the C:\Program Files (x86)\Embarcadero\Studio\23.0 directory (or the custom folder you had used). 2. Remove the C:\Users\Public\Documents\Embarcadero\Studio\23.0 directory 3. Remove the C:\ProgramData\Embarcadero\Studio\23.0 directory. 4. Remove the %APPDATA%\Embarcadero\BDS\23.0 directory. 5. Remove the HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\23.0 registry key 6. If Windows 64-bit, remove the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Embarcadero\BDS\23.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
  6. For some time I was wondering how I could create a nice output from data I have. One day I was looking at some learning video or website--I can't remember. And I saw how some easily create an output that included text and images. If I recall, he used HTML at the time, but I'm not sure since it was a long time ago. Then, today, I was looking at some items in the GetIt portion of the welcome screen. Then, moments later I decided to click on the 'getit package manager' and that's when it hit me, again, the idea of creating a custom output view similar to that. So, I was wondering if I could create something similar in Delphi with the built-in components I already have--be it HTML code (howto) or a combination of components already in Delphi, for VCL and FMX/Mobile. * This D12 getit pkg mgr snippet taking from my tablet and down-resized 1920x1200, 50% * notice the output on the right side pane area, that is the design output I am seeking to create Does anyone have any suggestions on how I can proceed in this endeavor? What are your methods? TIA
  7. Hi, I just realized that I am installing the wrong Delphi version on a new tablet. Embarcadero was quick to supply me a registration bump (from 2 to 3) and I was able to begin the installation of Delphi 12.., or so I thought. However, I grabbed the wrong .iso file folder "RADStudio_11_2_10937a" and began installing it. It should have been the "RADStudio_12_0_4915718.iso" file. Being so used to the Rad Studio 11 logo, I over looked it--twice! I am currently at the "specify location" dialog. Is it too late for me to stop and cancel the install and restart but with the "RADStudio_12_0_4915718.iso" file?
  8. Greetings! The NetHTTPRequest component has two properties. ClientCertificatePassword ClientCertificatePath Does anyone know how to set the "ClientCertificatePath" properly? Currently, I'm populating it with the path to the PFX file that was exported from the certificate store. EXAMPLE: C:\Certificate\nameofcertificate.pfx Likewise, I'm providing the password for the certificate in the "ClientCertificatePassword" property. The documentation on these properties is lacking not only online, but RAD Studio's local help files. I'm currently using RAD Studio 11.3 Enterprise with all the updates.
  9. Toast Notification Manager | WinForms Controls | DevExpress Documentation I need that component in Delphi. Is their any component like that i can buy for Delphi 10.2? Money does not matter right now. I need the functionality like it is in the DevExpress-Component. Thanks in Advance!
  10. Using a string grid, (but I may also use a dbgrid later) how do I get the *column* number when I right-click on a column ? I've searched around but could not find the answers. Below, shows column 2 was right-click-selected. The purpose of this is to allow me to right-click on a column and a pop-up menu with options for (copy_column, create_table) will show. 1. I want to copy the text of the column to the clipboard. 2. or, create a table out of the selected column's text. (I know how to do these parts.) TIA
  11. PawelPepe

    How to free TListView Objects (String)

    Hi, I got a problem with TListView and Data. It seems that I got memory leaks, because Data pointers are not released (if I understand it well). Let me show you what I do: Here is a simple TListView (LV_Data). I add few items to the list (Report Style) into 3 Columns. var i : Integer; ListItem : TListItem; PObject : PChar; for i := 0 to 3 do begin // Caption ListItem := AList.Items.Add; ListItem.Caption := 'My Caption' + '_' + Inttostr(i+1); // Language Name ListItem.SubItems.Add('Language' + '_' + Inttostr(i+1)); // User Name ListItem.SubItems.Add('User Name' + '_' + Inttostr(i+1)); // User Data Path PObject := StrAlloc(250); StrPCopy(PObject, 'PATH_TO_USER_DIRECTORY' + '_' + Inttostr(i+1)); ListItem.Data := PObject; end; As you can see, I also add "hidden" data (in this example a path to directory, as string). I can use it in program, without displaying it to user in listview. I can read it in simple way (for examle, in ListView OnClick event:) var sPath : string; if (LV_Data.Items.Count > 0) AND (LV_Data.ItemIndex <> -1) then begin sPath := StrPas(PChar(LV_Data.Items[LV_Data.ItemIndex].Data)); end; Everything works very nice... but, when I close program, I see there are some memory leaks. --------------------------- Unexpected Memory Leak --------------------------- An unexpected memory leak has occurred. The unexpected small block leaks are: 473 - 520 bytes: Unknown x 3 --------------------------- OK --------------------------- As far as I know, I have to free those List View Data bymyself. How to do this? procedure TMainFrm.LV_DataDeletion(Sender: TObject; Item: TListItem); begin if Item.Data <> nil then begin FreeMem(Item.Data); Item.Data := nil; end; end; Above code not working (why!?), got Invalid Pointer Operation. Could you please tell me how to free this data to avoid memory leak? Thank you in advance, -Pawel
  12. Specs: Win7, Delphi 11.2, VCL I wrote some functions to convert string to byte and byte to string. These functions work. For testing, I added several tbuttons and a memo on the form and began testing my ideas shown below. function str2byte(str: string): TBytes; begin setlength(str,length(str)); result := TEncoding.utf8.getbytes(str); end; function byte2str(byt: TBytes): string; begin result := TEncoding.ascii.getstring(byt); end; usage: procedure TForm1.Button1Click(Sender: TObject); var strs: string; bytes: TBytes; begin bytes := str2byte('ABC'); // string strs := byte2str(bytes); // bytes memo1.Lines.Add(byte2str(bytes)); // show it strs := byte2str([68,69,70]); // bytes bytes := str2byte(strs); // string memo1.Lines.Add(byte2str(bytes)); // show it end; Now, I'd like to extend that to include an additional parameter to the encoding format (ansi, ascii, utf-16-big-endian unicode, utf-16 unicode, utf-7 and utf-8) as found here: https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.SysUtils.TEncoding (And then later, possibly extend upon it by building a class component of it (and other library functions/procedures that I build)). The issue I am having now is how to give the parameters their name. I do not know if there are already built-in types for these and don't want to cause issues later on. But so far, I thought about using these: (_ansi, _ascii, _utf7, _utf8, _utf16be and _utf16u). Or, maybe create an enumerated list, i.e., type TMyEncoding = (_ansi, _ascii, _utf7, _utf8, _utf16be, _utf16u); And rewriting the above output snippet: type TMyEncoding = (_ansi, _ascii, _utf7, _utf8, _utf16be, _utf16u); function _byte2str(byt: TBytes; enc: TMyEncoding): string; begin case integer(enc) of 0: result := TEncoding.ascii.getstring(byt); 1: result := TEncoding.ansi.getstring(byt); 2: result := TEncoding.utf7.getstring(byt); 3: result := TEncoding.utf8.getstring(byt); // ... end; end; procedure TForm1.Button4Click(Sender: TObject); var strs: string; bytes: TBytes; begin bytes := str2byte('_ansi'); // string strs := _byte2str(bytes,_ansi); // bytes memo1.Lines.Add(_byte2str(bytes,_ansi)); // show it // strs := byte2str([68,69,70]); // bytes // bytes := str2byte(strs); // string // memo1.Lines.Add(byte2str(bytes)); // show it end; So I am looking for some advice/suggestions on how to implement the names for each of the encodings that will not interfer with Delphi's built-in names. TIA.
  13. 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.
  14. Hi, In this project I must use Delphi XE with dbExpress. I'm connecting against a SQL Server 20xx.... There's a customer requesting a TLS 1.2 only setup. Using sslscan I get this result: SSL/TLS Protocols: SSLv2 disabled SSLv3 disabled TLSv1.0 disabled TLSv1.1 disabled TLSv1.2 enabled TLSv1.3 disabled With this setting I'm unable to connect my sample project ( TSQLConnection only ). When activating the connection an error is raised (attached image) When reactivating the other verions : SSL/TLS Protocols: SSLv2 disabled SSLv3 disabled TLSv1.0 enabled TLSv1.1 enabled TLSv1.2 enabled TLSv1.3 disabled Everything works fine. I'm searching the web, but the only two parameters I found out, are not working with the XE version of dbExpress. I wondering if there's any way to connect to SQL Server via TLS1.2 only setup. (https://stackoverflow.com/questions/65050540/tls-1-2-sql-server-and-delphi-client) Are there any other parameters I can try? Tia, Clément
  15. Dear visitors, We like to inform you that new version of NextSuite6 is released. Click here to read the release news. New changes The update introduces our NextLayout6 component: 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: bms.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.
  16. I have been searching via google but not turned up any answer to this. 1. Say I have multiple files of similar text and I save them. 2. Then, when I load (or open) any of those text files in TMemo, I want to maintain the last screen layout (line) within the dimensions. I am comparing structures of column (hex/ascii) data in these text files and if I am in the middle of the file in the tmemo and I decide to load another file to quickly compare back/forth with, I want the layout the remain the same but not start from the top of the text file. I know I have to save the last topmost line in a variable but I don't know how to go further in this. TIA. Fig A - this is the layout that opens by default for every load. But I want Fib B if I am scrolling down and stop and decide to load another file. Fig B - if I open at the last layout position this is what I want to see.., not Fig A.
  17. Hello everyone, I am a technician in a company who is making business in Healthcare material. A long time ago, an employee programmed softwares for this company with Delphi 2009. Due to bugs we begin to have, I am in charge to upgrade the apps. But my boss doesn't want Delphi but C++. So I would like to know if I can import the source project into RAD Studio and convert it in C++ to upgrade it. I also began a new app in Delphi but my boss really wants C++, he thinks that Delphi is not good (because he has a friend who is programmer and said Delphi sucks ... very open-minded programmer, indeed). So I need your help to convert all stuff I have in Delphi to C++. It's fine if it's not perfect, I know that I will need to adapt many things, I just don't want to begin with a blank project. I wish you an exellent day and I am waiting for your replies !
  18. Rafael Dipold

    Error on read-only transaction

    Hello friends, Would anyone have a tip why the read-only error happens when I run the FireDAC commands in this order, like the MRE below? //READ ONLY TRANSACTION LTransactionRO := TFDTransaction.Create(nil); LQueryRO := TFDQuery.Create(nil); try LTransactionRO.Connection := FDManager.AcquireConnection('MY_DB', ''); LTransactionRO.Options.ReadOnly := True; LQueryRO.Connection := FDManager.AcquireConnection('MY_DB', ''); LQueryRO.Transaction := LTransactionRO; LQueryRO.Open('SELECT * FROM mY_TABLE'); //OK finally LQueryRO.Free; LTransactionRO.Free; end; //READ WRITE TRANSACTION LTransactionRW := TFDTransaction.Create(nil); LQueryRW := TFDQuery.Create(nil); try LTransactionRW.Connection := FDManager.AcquireConnection('MY_DB', ''); LTransactionRW.Options.ReadOnly := False; LQueryRW.Connection := FDManager.AcquireConnection('MY_DB', ''); LQueryRW.Transaction := LTransactionRW; //ERROR: cannot execute UPDATE in a read-only transaction. LQueryRW.ExecSQL('UPDATE MY_TABLE SET COLUM1 = COLUM1 WHERE 1 = 1'); finally LQueryRW.Free; LTransactionRW.Free; end; if I comment the line `//LTransactionRO.Options.ReadOnly := True;`, the SQL UPDATE run without errors. Thanks for any tips!
  19. I usually work in low light and it gets a little difficult sometimes to see certain characters when using the dark theme for the IDE. (Some of the colored fonts like blue/red/green get fuzzy looking under my laptop's 1366x768 screesize) I thought it would be a quick and simple method of Ctrl+Wheel-up/down, but that did not work. Is there a quick shortcut to enlarge/decrease the font at will? TIA.
  20. Is there a way to back up my keychain and certificates and my project on the MacBook ? I am not familiar with a Mac just got one to compile Delphi apps I use git on windows to back up the Delphi project code just asking u guys to see if u have any tips or best practice for backing up the Mac with all the keychain ,certificates,ect Thanks for any suggestions
  21. SPECS: Delphi 11.2, Galaxy S10+ phone (Android 12) (screen size is 6.4 inches) Issue: I want to change the view in the IDE to match my phone but the closest one is the 'Android 5" phone', and when I add componets on the form in that view, after compiling, the controls don't fit the screen and/or are sometimes off the view of the screen. In Delphi XE7, in the View's drop-down list, there is a custom setting option. I think I only used it once for a tablet years ago, but could not figure it all out and gave up. However, in 11.2, there is no listing for custom. So, I was wondering if there are downloadable views, or does the developer has to figure it out manually by eye/try. I've been searching around but cannot find any answers. TIA.
  22. 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 column type - grid column. 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: bms.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.
  23. specs: window 7 64bit, delphi 11.2, phone s10+ with android 12 I've been wanting to ask this question for some time and an opportunity came to me and I'm now asking... I would like to send text from my galaxy s10+ phone to my laptop over wifi, and back, from my laptop to Android over wifi. I want to type some text, a word, or a whole paragraph, and send it. Are there any demos or how-tos for this? I searched my sample folders but did not find anything. Also, I do not want to use a USB cable, nor do I want to join/use any outside services from other sources. I don't want to download any apps, register, and all that. I want this to be strictly private and only from my two devices. TIA
  24. Can I use managed C# DLL in unmanaged Delphi application ? Thanks
  25. Delphi 11.2, Windows 7 Home Prem 64bit To my knowledge, this was the first time this has ever happened to me. When I opened a project from a window's folder by the .dproj file, I received this pop-up message, "Please enter a valid Embarcadero serial number" I tried opening other projects in this same way and received the same message. I normally open projects through Delphi but I was searching my folders for a project and opened it this way. Is this a known bug?
×