Click here to Skip to main content
15,888,062 members
Everything / Programming Languages / Delphi

Delphi

Delphi

Great Reads

by Chad Z. Hower aka Kudzu
Delphi has some big gotchas with interfaces. Learn how to bypass them.
by ADMGNS
An alternative method to Catmull-Rom, Chaikin or Bezier curve smoothing methods
by Issam Ali
How to pass native (Delphi) callback pointer to a .net COM assembly
by Denis Murashov
In the article I describe the possibilities of standard Delphi DFM-serialization mechanism. I start from the basics and then try to cover more complex situations.

Latest Articles

by ADMGNS
A new method for 2D polyline simplification and also smoothing that alternative to Douglas-Peucker and curvature-based simplification algorithms
by ADMGNS
Very simple, noise-based color visual cryptography for images
by Max Kleiner
We use a Command Line Interface with OpenWeatherMap (PyOWM) to make it easier to use the OpenWeatherMap API in Python.
by ADMGNS
An alternative method to Catmull-Rom, Chaikin or Bezier curve smoothing methods

All Articles

Sort by Updated

Delphi 

25 Apr 2010 by #realJSOP
You want to google the word "steganography".
28 Apr 2010 by #realJSOP
This is not a programming question, and is not appropriate for this forum.
6 Oct 2010 by #realJSOP
Did you tgoogle it? Are you talking about disambiguation, or something else?
9 Feb 2011 by #realJSOP
I haven't done pascal since 1990, so consider this to be a WAG...Delphi uses the real type (and variants of it), and .Net has float and double. Since you've already tried double, try using float instead and see if that works.Your problem may also be centered aroundf the string parameter....
27 Dec 2011 by #realJSOP
procedure LoadAnImage()var OleGraphic: TOleGraphic; fs: TFileStream; begin try OleGraphic := TOleGraphic.Create; fs := TFileStream.Create('C:\...\image.gif', fmOpenRead or fmSharedenyNone); OleGraphic.LoadFromStream(fs); ...
26 Dec 2021 by 0x01AA
Try this: var OldRowCount: integer; OldRowCount:= sgdDisplay.RowCount; sgdDisplay.RowCount:= sgdDisplay.FixedRows; sgdDisplay.RowCount:= OldRowCount; I hope it helps.
1 May 2018 by 66669
I am making a user form in Delphi for documents tracking application. I am interested in functionalities input new entry (record) and view list by... (date, name of document, ID,...). My problem is that I don't know how to implement these functionalities for more than one user. Currently, I...
17 May 2015 by A.Ebrahimi
In my project I need to reproduce a property and connection diagram and it is suitable to be something exactly like diagram in MSSQL.I can produce table like object (as in mssql) using panel and grieds dynamically, but main problem for me is how to connect one selected cell to another cell in...
3 Oct 2010 by Abhinav S
Have you checked on the Report manufacturers blog / website?
14 Apr 2013 by Abhinav S
To convert from decimal to hex, simply try string hexValue = value.ToString("X");.
30 Apr 2021 by ADMGNS
An alternative method to Catmull-Rom, Chaikin or Bezier curve smoothing methods
6 Aug 2022 by ADMGNS
A new method for 2D polyline simplification and also smoothing that alternative to Douglas-Peucker and curvature-based simplification algorithms
25 Oct 2021 by ADMGNS
Very simple, noise-based color visual cryptography for images
31 Mar 2019 by Aek-Tiesto
Dear programmers, I was looking in the internet for an idea on how to create a software or even if there is any existing regarding my issue, but it ended up on this forum Asking for it!! hope I'm in the right place. without further ado let get to my request. I am working in a company where...
31 Mar 2019 by Aek-Tiesto
Thank you Gerry for the solution I'll give it a try. But what if I want to search for Bx that correspond to Ax that I type ???
18 Aug 2010 by Aescleal
If it's a traditonal "thick client" connecting to a central database I'd give RealBASIC[^] (or as it's called these days, RealStudio) a look. It can connect over ODBC to databases, is quite a nice OO language under the covers and you can interface it to C if you need something with a bit of...
20 Aug 2010 by Aescleal
I know nothing about Delphi but are you sure it can cope with a reference parameter? None of the other languages I use regularly (Java, Python) can handle C++ references so it might be same for Delphi and that's what's causing the problem.Cheers,Ash
18 Feb 2016 by Albert Holguin
I think it's going to depend on what you want to do with this language and where you're trying to take your career towards. C# and Java are the mainstream GUI languages, C# is actually pretty darn fast, I'd say faster than Java (it's essentially an improved version of Java, it came out...
11 May 2010 by Alex Melnychenko
Google provides its Translation API that looks very promising and useful. So I was very enthusiastic when we decided to use it in our Localizer project.
26 Apr 2013 by Alex_Mntl
I’m trying to connect to the Soap service of SMSGateway.ca to retrieve the list of the last sent messages using Delphi 7 without any success. I’m able to get the WSDL definition from the server using ‘http://www.smsgateway.ca/sendsms.asmx?WSDL’ as an address , but when trying to access the...
3 Oct 2010 by alexandretres
Hi, i have a 9.0 BE Rave Reports installed and i get one access violation message when a try to access Rave Reports help System.How i can fix this?I use Windows Vista, Rave Reports 9.0 BE, CBuilder XE ProfessionalThank'sAlexandre
3 Jun 2011 by Alexey Merson
If you have a SOAP server created with Borland Delphi and a SOAP client created with .NET, then you can't get it working out of the box.
13 May 2018 by Aleykey
I have created two access tables using Adoquery and Datasource to show data on two separate dBgrids. Tables have similar columns and fields. Field names include item name, stock in and stock out. I would like to know the code needed to locate item names from one dbgrid and copies the item name...
25 Feb 2013 by Alvin Ashcraft
Over the last several weeks, I have been building some simple OCR applications in my spare time using a trial version of the FineReader Engine by ABBYY
25 Feb 2010 by amgad48
I want to make a convolution and deconvolution for Gaussian and rectangular functions.
20 May 2011 by Amir Mahfoozi
Improve Delphi's TDBGrid by adding some new features to it
17 Oct 2011 by Amir Mahfoozi
in after insert event : bookmark that place and close and open the datatable.As I remember Refresh doesn't work.
17 Oct 2011 by Amir Mahfoozi
In design time right click on a form and select view code :)you will see properties in a hierarchy styleand right click again and select view form to see the form again
17 Oct 2011 by Amir Mahfoozi
Probably you should accept PChar parameter rather than string parameter to become compatible with .NET.Double is compatible in both sides.
17 Oct 2011 by Amir Mahfoozi
Obviously you compare node.text with your search term exactly.you should do something like this :for cnt := 0 to TreeView1.Items.Count - 1 do if Pos(lowercase(Search.Text), lowercase(TreeView1.Items[cnt].Text))>0 then Node.Selected = true;
8 Dec 2011 by Amir Mahfoozi
Their names are only useful in design time not runtime. When you create controls dynamically you can assign an object to it with a lot of data embedded in it(so obviously a name can be linked to that object). Also it can be reverse I mean that you can store a list of objects that have their...
20 Dec 2011 by Amir Mahfoozi
It's not an easy task to do it completely yourself.You can use office interop services in .NET or OLE objects in Delphi to achieve this.If I were you I opened a word document for them and let them do what ever they want in there...
30 Jan 2013 by Amlanjyoti Saikia
Not that I know of, but there is a workaround for that. Try this.Create your own custom exception-public class DelphiLikeSilentException: Exception{}Throw that exception from your code where you need the delphi like 'Abort' procedureWrite a empty catch block to handle...
14 Apr 2013 by Andreas Gieriet
Use C# BitConverter[^] class.E.g. static void Main(string[] args){ { byte[] b = { 0x00, 0x00, 0x00, 0xE0, 0x97, 0xA5, 0x61, 0x40, }; double d = BitConverter.ToDouble(b, 0); Console.WriteLine("from file: {0,-20} = {1}", d, b.Aggregate("", (s, x) => s += " 0x" +...
28 Feb 2018 by Antonio Petricca
Win32, compiler independent, and extensible passive debugger
11 Dec 2015 by AnvilRanger
You should take a step back and rethink how you have asked for help. I realize you are a new member here so please take this as just helpful advice.1. You should always give a clear definition of the problem you are facing. Include any error message, the values you are reading from any...
27 Mar 2011 by arasharash0121
hii have a selected file in client and want to send it to server(in a local network)what do i do it by indy9regards
26 May 2011 by arasharash0121
hi,excuse me for my English!!i have a crossview in fastreport in my project,my cross's headers are created in runtime by (addvalue) method, i want that after completing headers, my cross is shown in center of page, but i can not do this, please help me.thanks a lot.
6 Jun 2011 by arasharash0121
hi,excuse me for my English!!i have a crossview in fastreport in my project,my cross's headers are created in runtime by (addvalue) method, i want that after completing headers, my cross is shown in center of page, but i can not do this, please help me.thanks a lot.
6 Dec 2011 by arasharash0121
hi,excuse me for my English!!i have a crossview in fastreport in my project,my cross's headers are created in runtime by AddValue method, i want that after completing headers, my cross is shown in center of page, but i can not do this, please help me.thanks a lot.
5 Oct 2011 by ARBebopKid
Use it the same way you'd use it for any application in delphi and not java.
26 Oct 2011 by ariswidiantoro
hello..How do I'm get the status printer from the EPSON STATUS MONITOR 3 ?, I've tried to detect the status direct from the driver, not from windows,but I just get the status from the windows, not from DRIVER, the difference :if from the windows after the printing is executed then the...
25 Sep 2012 by armm1388
HiI have a column of nvarchar or nchar in SQL Server DB which have fields in Persian language.For search , I should use of character "N" before parameter.But I don’t know how do it.The following commands don’t be work properly:ADOQuery.SQL.text :=('SELECT * ');ADOQuery.SQL.add('FROM...
7 Dec 2012 by armm1388
HiI write a database software by Delphi 7. DB is SQL Server and has install on server . User save record to bank. For every record there is an attachment file which must be save in server. File must be save in a folder in server and it’s Address must be save in bank. For save file to folder...
8 Dec 2012 by armm1388
HiI write a database software by Delphi 7. DB is SQL Server and has install on server . User save record to bank. For every record there is an attachment file which must be save in server. File must be save in a folder in server and it’s Address must be save in bank. For save file to folder in...
27 Jan 2013 by armm1388
HiI write a database software by Delphi. DB is SQL Server and has install on server . User save record to bank. For every record there is an attachment file which must be save in server. File must be save in a folder in server and it’s Address must be save in bank. I write 2 below...
27 Jan 2013 by armm1388
HiI write a database software by Delphi. DB is SQL Server and has install on server . User save record to bank. For every record there is an attachment file which must be save in server. File must be save in a folder in server and it’s Address must be save in bank. I write 2 below...
27 May 2013 by armm1388
HiI write a database software by C#. DB is SQL Server and has install on server . User save record to bank. For every record there is an attachment file which must be save in server. File must be save in a folder in server and it’s Address must be save in bank. For save file to folder in...
1 May 2013 by arsene 789
...
16 May 2013 by arsene 789
H,I am trying to display logged in user and the roles which user is involved.function UserName() : String;varUser : Pchar;i:DWORD;begin i:=1024; user:=StrAlloc(Succ(i)); if GetUserName(User, i) then Result := StrPas(user) else Result := 'unknown';end;With...
6 Dec 2011 by Arthesh G
go for java or else c++. java is a robust application and it has well built frameworks
12 Jul 2015 by asemfcis
I am using rad studio xe7 to develop android app and i used TWebBroswer component to view local html file.my question is how can i fire long press event on TWebBroswer to view context menu? like webview in eclipse ide of javaMany thanks
14 Oct 2011 by AspDotNetDev
Use the Google Custom Search API.
10 May 2012 by asschilling
Hello, I wrote a previewhandler for the explorer inside a dll.The prevhost.exe has the same rights as the User. I want to write a temporary file in the temporary directory (or any other directory), but if I called the function CreateFile() or fopen to write or append anything to an...
20 Mar 2013 by asschilling
In the preview-handler - I can only write in a LocalLow-directory likeC:\Users\\AppData\LocalLow\thanks
24 Jun 2018 by avianrand
I've created a pretty simple dll in vb.net. I successfully registered it (as administrator) and can call it from a button in a simple vb.net WinForms app I created. It works. It does what I expect. However, I tried using it in a simple Delphi app I also created and it says it can't find it. ...
16 Jun 2018 by avianrand
Okay, I know this isn't a solution but there's no good place to put this. I don't want to put it in the O.P. as an "improvement" because it might not get noticed. And if I post it as a comment it doesn't let me create code tags. So it's here. Earlier I said I was going to handle this with a...
24 Jun 2018 by avianrand
Never mind on this. I gave up and found an easier more productive way. I'm using AtoZed's CrossTalk to use .net DLL's in Delphi. And I'm using EPPlus in .net to create the Excel files I need. It's all working quite nicely.
18 Dec 2018 by avianrand
I'm on Delphi RAD Studio 10.2 How do you get the information from the settings in Project > Options > Version Info? I'm talking about the KEYS. Things like "LegalCopyright", "FileDescription", and "Comments" from that? These are stored in the dbproj file but I need to know how to get those key...
13 Apr 2022 by avianrand
I've done this many times in vb.net and thought I had it working in Delphi but I'm stuck. I'm using Delphi 10.2. I'm reading a PDF file into a memory stream and then converting it to a byte array so I can store it in an MS SQL file table. I...
13 Apr 2022 by avianrand
Well never mind I guess. On a whim I decided to just use TBytes and the whole solution works now.
11 Sep 2014 by Azad Mohamed
Using TreeNode.MoveTo(...) method sometimes does not work properly and raises an "Access Violation" exception.mosttimes works and some time not.Mosttimes 'Access Violation in module COMCTL32.DLL. Read of address FEEEFEFA' and program crash/freeze.here is my full code i have single...
28 Jun 2017 by barneyman
ADO can talk to SQL too - it's just a change to the connection string SQL Server connection strings - ConnectionStrings.com[^]
1 Sep 2021 by bazzabahuloo
Hi I have an AVPlayer written in Delphi using the FFMPEG libraries. This basically implements a video player as per FFPLAY but under Delphi. I want to add variable speed video playback to this player, which is easy on the video side as you...
2 Sep 2021 by bazzabahuloo
I managed to get this working for me by making a change in the stream reader thread for Audio when video is playing at anything other than normal speed. I am not sure this is the correct place, but it seems to work well at both high and low...
16 Nov 2012 by benaziz zizou
how to run SQL server query using a button click in Delphi?for example:select adressfrom employerwhere nam= name
10 May 2012 by Bernhard Hiller
"append": if a file is already in use, you'll likely get an access denied error (ok, in case of sharing it can work). Hence check that the file you want to write does not yet exist.Are you sure that you write to the correct temporary directory? A user must not write to C:\Windows\Temp... Check...
20 Jan 2013 by Bernhard Hiller
Your window must subscribe to a mouse event, e.g. MouseClick, MouseDown, or MouseMove. The EventArgs of that event will tell you the mouse coordinates - already relative to your window, not to the screen as with the Delphi function. Hence there's no need to substract the position (RendX, RendY)...
18 Feb 2016 by Bessaadnassim
Helloi am using mcHID to interface with USB mouse, i can get Vendor_ID and Product_ID ..etcwhat i can't get is the Notify_read.I can read data only one time when it's plugged.Is there a solution to get mouse position continuously.Thank you.What I have tried:an Interface using...
14 Apr 2013 by binhminhtrencat
Hello every body!I have a hex file save multy objects (call is X).X has fieds:name,month,year and 4 values.when some one write file, you can see image below. X save in total 3 row,+First row save name, month,day,year...+Second row save 4 values (data type is real)+three row is 0.I...
11 Oct 2015 by Bismark Appah
19 Jul 2010 by bluebutterfly
Hello,I have a program in delphi (7 and 2010) with win32 treeview control. How can I add an action to my node?For example:I want to play mp3 file when i select node in my treeview.or like windows explorer, where if click on a file in left pan, it shows action in right pan.Thank you
17 Aug 2010 by bluebutterfly
Hello,I am using Excel sheet in my Delphi application.There is a problem in my Excel sheet with cells having formula. When I read it with Delphi applicatin then my formula disables. How can I enable formula in my Delphi application with Excel?Thanks, ;)
24 Aug 2010 by bluebutterfly
HelloThank you for your answer.Now, I can load and work with Excel formula sheet in Delphi, but there is still another problem. When I run my Delphi application and load my Excel sheet, everything is ok, but when I change the cell value to other number, the formula cell does not...
11 Jan 2011 by bluebutterfly
hello i try to write programm in delphi 2010 that like an dictionary but i have problem in my programm when i type in editbox my typed text search string in treeview nod text and automatically select that or when i type char 'A,a' treeview return node text that start with that char i...
5 Aug 2011 by bluebutterfly
hello i have listbox and richedit control on my form listbox have up 2000 item in list and each item link to RTF file , when i clickone item on listbox richedit view that's RTF file ,but i need some short code or function ... to my program if i use normally richedit.line.loadfromfile...
2 Mar 2014 by brodcasting
how to upload video on youtube in delphi
10 Feb 2011 by bsaurabh
Hi all,I have a Delphi built DLL contaning a function which takes a argument having data type as double. I need to call this function from C# code.Here is the code:-[DllImport("C:\\Smhita20\\Dmp.dll",CallingConvention = CallingConvention.StdCall)] public static extern void...
27 Apr 2011 by bsaurabh
Hi all,I am calling a function in Delphi dll from C#.I am getting an exception saying "System.Runtime.InteropServices.SEHException occurred in transliteration.exe.Additional information:External componenet has thrown an exception".Function signature in dll is like this:FUNCTION...
14 Nov 2011 by bsaurabh
Hi all, I have a Dll written in Delphi having an exported functions as follows Function layoutToUni (IpStr : PChar; OpStr : PWord; LangName : LongInt; AFontType, BFontType : LongInt ) : PChar; I am calling this function from vb.net.I want a compatible data type in vb.net for...
8 Apr 2019 by Bulog
The problem is purely mathematic because they are the dominant combinatorics and probability. It is possible to solve the problem without knowing programming, but it is much easier to solve it by programming. In the following 40 byte group, there are 3 pairs of the same bytes: 248, 195, 38,...
11 Jan 2014 by Captain Price
Well, you have to program directly to the operating system's API. This API is system-specific. On windows it is the Windows API. The Windows API is written in pure C.A "Hello-World" of the Windows API (AKA, Win32 API)://"Hello-World" application#include LRESULT CALLBACK...
12 Jul 2018 by Chad Z. Hower aka Kudzu
There are dozens of more things I'd like to see in Delphi, but here I will cover the ones that are easy to implement, yet provide large gains.
12 Jul 2018 by Chad Z. Hower aka Kudzu
Delphi has some big gotchas with interfaces. Learn how to bypass them.
13 Oct 2022 by Chanice Grant
I want to hide the string grid until called apon by a button. There is a property for StringGrid.Visible but it doesn't do anything What I have tried: procedure TfrmMarvelM.FormCreate(Sender: TObject); // Form create begin ...
30 Aug 2016 by charmyvora
You can just access it.Mention your Unit1(Other form) in Unit2(1st page) in usesIn case you have already added unit2 in unit1 uses, You will have to add unit1 in implementation uses section of unit2. You can then just call the items.Sample(from implementation...
21 Sep 2016 by charmyvora
Use file stream to read your data and then append the data to your rich text boxprocedure TForm1.Button1Click(Sender: TObject);var FileStream: TFileStream; data: TStringList;begin data := TStringList.Create; RichEdit1.Clear; data.LoadFromFile('D:\aa.txt'); ...
30 Dec 2012 by CHill60
The answer was posted here a couple of days ago http://stackoverflow.com/questions/14032860/how-do-i-read-cells-of-another-programs-tstringgrid-control[^]Essentially, if whoever wrote the Delphi program did not provide a means of getting at the data then you're going to have to do some fairly...
1 Dec 2013 by CHill60
Trouble with posting a question like this in Quick answers is that once you have one "answer" then your question drops out of the list and not many people will view it.You might be better off posting it in one of the General Programming forums as it is really about a discussion rather than a...
6 Jan 2014 by CHill60
As the OP's solution will no doubt be deleted shortly I'm posting my comment as a solution - given the thank you I presume it workedQuote:That doesn't look like any Delphi code I've seen - which granted isn't a huge amount. You are assigning 0 to combobox5.itemindex and then adding two...
23 Feb 2014 by CHill60
You need to "hook" (capture) system mouse click events.There is an article here[^] about how to achieve that,and the solution to this post on the Delphi forums[^] also covers it
2 Feb 2019 by CHill60
You are adding extra items instead of passing the stuff as columns. See this example SwissDelphiCenter.ch : ...show Columns in a TListBox using Tabulators of different widths?[^] Once you have set up your tabulators you should be adding your data like this:...
17 Jun 2019 by CHill60
Have a look at the SysInternals suite of tools Sysinternals Suite - Windows Sysinternals | Microsoft Docs[^]. I think the one you want is ProcMon - you will be able to tell what the COM object is trying to access and work out exactly what is missing. Also ensure that you are using the right...
8 Aug 2010 by Christian Graus
What does this have to do with javascript or delphi ? Compile your C++ code, and then read the assembler that is produced. No, we're not going to write it for you, that's an insane amount of work.
1 Jan 2013 by Christian Graus
If you don't know how to write this, you want to find a place like rentacoder where you can find people who you can pay to write it for you. This board is for programmers, not people who want work done for free.
28 Jun 2010 by cojectio
:rolleyes: i want to put a C:\a.bmp to the screen, in that wayproc p(x,y,w,h,t)and use it as moveable window :suss:
25 Feb 2010 by CPallini
Google is your best friend. For instance, you may gather some info at mathworld. :)
21 Apr 2010 by CPallini
Please, post your question at the article's own thread. :)
11 Nov 2010 by CPallini
You probably need a C# wrapper class around Win32 INI file API. Have a look at this CodeProject's article: "An INI file handling class using C#"[^].
26 May 2012 by CPallini
There is the CodeProject's article: Computer Vision Applications with C# - Fuzzy C-means Clustering[^]. It is C# instead of Delphi, but, I suppose, that is a minor problem.