delphi-2010

Why do I get access violations when a control's class name is very, very long?

混江龙づ霸主 提交于 2019-12-03 14:52:56
问题 I subclassed a control in order so I can add a few fields that I need, but now when I create it at runtime I get an Access Violation . Unfortunately this Access Violation doesn't happen at the place where I'm creating the control, and even those I'm building with all debug options enabled (including "Build with debug DCU's") the stack trace doesn't help me at all! In my attempt to reproduce the error I tried creating a console application, but apparently this error only shows up in a Forms

Delphi dbgrid continuous scrolling

风格不统一 提交于 2019-12-03 14:41:05
I'm making an application that holds orders and prints invoices. I have some labels, tedits, tmemos, buttons, a datasource, an adotable, a popupmenu, and a dbgrid on my form. When I build the program and scroll down the dbgrid scrollbar, it scrolls after I release mouse button. But i want continuous scrolling. Greetings Sertac Akyuz That's called thumb tracking. Derive a new class to override scrolling behavior. Example of using an interposer class: type TDBGrid = class(DBGrids.TDBGrid) private procedure WmVScroll(var Message: TWMVScroll); message WM_VSCROLL; end; TForm1 = class(TForm) DBGrid1

No breakpoints when Remote debugging with Delphi 2010 - so stuck on Delphi 7

喜你入骨 提交于 2019-12-03 14:26:46
I've come back to looking at remote debugging with Delphi 2010 after my initial investigation last August. I've made sure that D2010 has updates 4&5 and that the remote debugger is the latest from the Embarcadero wesite. Following the very useful instructions here I can load the remote process and run it fine, but I cant use breakpoints. The RSM and EXE files are together in the remote directory. Is there anything I should check? Can I load the symbol table manually? There seem to be no debugger settings required, but could I force something to force D2010 to load my symbol table? This is the

Delphi 2010 remote debugging - unable to get breakpoints working

故事扮演 提交于 2019-12-03 12:05:08
I recently posted this question about my inability to get Delphi 2010 working with remote debugging. I have not had any success and decided to post up a simple step-by-step test technique that might highlight what I'm doing wrong. THIS IS REALLY IMPORTANT to me - I've used Delphi since V1.0 and earn my living from it. Being stuck like this is a pain and its keeping me on Delphi 7. Anyway, here goes. Ensure that Delphi 2010 has updates 4&5. Fire up Delphi 2010, then File | New | VCL Forms App. Put a button on the form, put 'ShowMessage( 'hello' ) in the button OnClick event. Save the project

Client-Server application writing in delphi

巧了我就是萌 提交于 2019-12-03 09:49:44
What is the best way to write a client-server application under delphi? I know there's a DataSnap technology, but it's not in Professional version. Do You have any experience that You can share? This is fairly wide open question, as it can depend on your database decision. DataSnap really allows for N-Tier solutions, if your looking for Client Server you have most everything you need in the professional version depending on the Database Choice. For Client Server: Client Server Architecture is when the Client communicates directly with the server. There are several frameworks available they all

Converting a stand-alone Delphi-made .tlb file to .ridl

耗尽温柔 提交于 2019-12-03 09:45:26
问题 How does one convert a stand-alone .tlb file created in a pre-2009 version of Delphi to a .ridl file using Delphi 2010? .tlb files that are part of projects get automatically converted, but this particular file is not part of any project. 回答1: try using the tlibimp.exe utility located in C:\Program Files\Embarcadero\RAD Studio\7.0\bin tlibimp –I thetlbfile.tlb 来源: https://stackoverflow.com/questions/2323729/converting-a-stand-alone-delphi-made-tlb-file-to-ridl

How can a 32-bit program read the “real” 64-bit version of the registry?

余生长醉 提交于 2019-12-03 08:56:53
问题 I'm trying to read HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run with OpenKeyReadOnly , and GetValueNames , but it's returning values from HKLM\SOFTWARE\ Wow6432Node \Microsoft\Windows\CurrentVersion\Run instead. How can I read the 64-bit values instead of from a redirect to the 32-bit key? The program was run as an administrative account. I also tried RegOpenKeyEx and RegEnumValue . I'm using Delphi 2010. 回答1: you must use the KEY_WOW64_64KEY value when open the Registry with the

Unused interface reference is not destroyed

拟墨画扇 提交于 2019-12-03 07:17:06
i had another bug in my app caused by careless usage of Delphi interfaces. When i pass an interface to a procedure which ignores that argument, the instance is never freed. See the following simple example: ITest = interface procedure Test; end; Tester = class(TInterfacedObject, ITest) public procedure Test; end; Base = class public procedure UseTestOrNot(test : ITest); virtual; abstract; end; A = class(Base) public procedure UseTestOrNot(test : ITest); override; end; B = class(Base) public procedure UseTestOrNot(test : ITest); override; end; { A } procedure A.UseTestOrNot(test: ITest); begin

Building Multi threaded TCP/IP Server

Deadly 提交于 2019-12-03 06:15:14
I wanna build a TCP/IP server that will be used by up to 100 concurrent clients, but still not sure how to get started. at least I need the server to this: Listening to client, and store all them on array or list. for each client, it need to receive and send data based on it's client status. The server should update the clients list when someone connect or disconnect. Prefer to work as service with GUI to manage it. Could anyone help how to get start with that,I looked at indy sample but they didn't help, also looked for most components but still searching. You need to use the TidTCPServer

case insensitive Pos

醉酒当歌 提交于 2019-12-03 06:08:03
问题 Is there any comparable function like Pos that is not case-sensitive in D2010 (unicode)? I know I can use Pos(AnsiUpperCase(FindString), AnsiUpperCase(SourceString)) but that adds a lot of processing time by converting the strings to uppercase every time the function is called. For example, on a 1000000 loop, Pos takes 78ms while converting to uppercase takes 764ms. str1 := 'dfkfkL%&/s"#<.676505'; for i := 0 to 1000000 do PosEx('#<.', str1, 1); // Takes 78ms for i := 0 to 1000000 do PosEx