delphi-2010

Call Object Method using ASM

谁都会走 提交于 2019-12-07 13:18:51
问题 To better explain what I'm trying to accomplish, I'm going to start with something that works. Say we have a procedure that can call another procedure and pass a string parameter to it: procedure CallSaySomething(AProc: Pointer; const AValue: string); var LAddr: Integer; begin LAddr := Integer(PChar(AValue)); asm MOV EAX, LAddr CALL AProc; end; end; This is the procedure that we will call: procedure SaySomething(const AValue: string); begin ShowMessage( AValue ); end; Now I can call

How to change the font size of the editor tabs in Delphi 2010 IDE?

跟風遠走 提交于 2019-12-07 13:00:55
问题 Does anybody knows a way to change the font size of the editor tabs in Delphi 2010 IDE? With my 1080p 22' monitor the font is too small to read and it causes pain in the eyes. Some notes It doesn't respect the system's DPI settings so changing that system setting doesn't help, moreover, I'm using 140% DPI already now, and it's Win7. I couldn't find any existing 3rd party tools to tweak that. I'll be willing to write an IDE expert to fix that problem if I know how to do it... 回答1: There is not

TListView Column Sort (Sort by first two columns)

假装没事ソ 提交于 2019-12-07 11:19:19
问题 I am using Delphi 2010 and TListView to list Names and other data. The first two columns is the Last Name & First Name Caption = Last Name SubItems[0] = First Name How do I sort the ListView by these two columns? These will only be the columns the Listview will be sorted by and I would like to always keep the sort as such (when adding, editing, deleting items) How can I accomplish this? 回答1: Set SortType to 'stBoth', and implement an OnCompare event handler. Example: procedure TForm1

Suggestions on writing a TCP IP messaging system (Client/Server) using Delphi 2010

天涯浪子 提交于 2019-12-07 09:42:43
问题 I would like to write a messaging system using TCP IP in Delphi 2010. I would like to hear what my best options are for using the standard delphi 2010 components/indy components for doing this. I would like to write a server which does the listening and forwarding of messages to all machines on the network running a client. 1.) a.) clients can send a message to server to be forwarded to all other clients b.) clients listen for messages from other senders (via server) and displays messages. 2.

Find all Class Helpers in Delphi at runtime using RTTI?

五迷三道 提交于 2019-12-07 05:42:18
问题 Does the extended RTTI in Delphi 2010 offer a way to list defined Class and Record Helpers at run time? As far as I know Delphi does not show a hint or warning when more than one class helper is defined for a class, class helper detection might be a helpful routine in 'quality assurance'. p.s. of course I know I should never ever use third party components or libraries without source code, which would make it easy to grep class helpers. 回答1: Since class helpers only apply to a class based on

Is Delphi Prism a new version of Delphi .net?

老子叫甜甜 提交于 2019-12-07 04:44:11
问题 First of all (before this question get down voted): I am a developer developing 99,99% of my programs using Delphi targeting Win32 (developing in Delphi 7 still, very slowly migrating to Delphi 2010). When Delphi 2006 or 2007 (can't remember which version at the moment) came out I bought the RAD Studio edition to be able to start developing .net applications using Delphi.net and VCL.net. I played around with it for some short time, but in the end, due to work load just kept using Delphi 7 as

Auto sizing column in TVirtualStringTree

时间秒杀一切 提交于 2019-12-07 03:14:46
问题 Climbing the learning mountain of TVirtualTreeView, I'm attempting to create a custom descendant that ensures that, when the control is resized, the width of the last column exactly fills control's width without requiring a horizontal scroll bar. I see a number of items (a method and a number of events) pertaining to "AutoFitColumns", but not documentation covering this feature. Can I use AutoFitColumns to automatically resize my last column and if so, how. 回答1: With your virtualtreeview, and

TIdHTTPServer file upload

允我心安 提交于 2019-12-07 03:13:01
问题 I'm trying to upload files to a Indy(ver. 10.5.5) TIdHTTPServer. I've been searching for solutions but no luck thus far, what I've found was for older versions of Indy which were not compatible with the version shipped with Delphi 2010. What I'm hoping is to achieve simply upload a file using "multipart/form-data" to the server and decode it, simple as that, any help is appreciated. 回答1: I started xxm as a way to build websites with Delphi, and have scripts with both HTML and Pascal code re

Conflict between Delphi and SQL server

只愿长相守 提交于 2019-12-07 03:01:27
I have a Query that works in SQL Server as well but when i save it in ado query in delphi it doesn't work and stops with this error : Incorrect syntax near 'GO' But the below code is correct and has not any error . i was tested it in sql server . The below code is not Regular because i copy and past it from delphi . My Query : create function GetTedad(@pfcode INT, @pdcode INT) returns int as begin declare @Tedad int; select @Tedad= sum(t2.tedade_avalie) from Tbl_avalie_salon t2 where t2.FCode = @pfcode and t2.DCode = @pdcode return (@Tedad); end; GO create function getSumBSen2(@pfcode INT,

ADODataset: how to load XML (saved beforehand in DB in ADO schema) data without temporary files?

こ雲淡風輕ζ 提交于 2019-12-07 02:59:26
Warning: total rewrite. Scenario: I loaded some data from database on a TCustomADODataset descendant. After that, I saved this data on XML temp file (using TCustomADODataset.SaveToFile) to allow getting the XML data as a string and store it on a database table as text blob - it's an exports table. Another program (different from the one that stored the XML) will take that data, show the elements inside, and allow an user to select which element to import to the main database schema. Problem: The problem with the approach above is the need of temporary files to allow TCustomADODataset use the