delphi-7

Persisting more than one object in Delphi 7

This is not a duplicate but a follow-up to "Persistent Objects in Windows XP/Delphi 7." I need to persist more than one object in Delphi 7, and the objects are a class family. RRUZ's answer suggests I inherit from TPersistent and use TJvAppXMLFileStorage, but when I use its WritePersistent method, it overwrite one object with the next o...

Delphi MDI Application Next Window menu item

How would I go about implementing the Ctrl+F6 Next Window action in the Windows menu for an MDI application in Delphi 7? ...

Returning a string from a BPL function

have a function, simplified below, that is exported from a BPL function DoA(amount: currency; var Info: string): Currency; stdcall; begin result := amount * 19; Info:= 'Some Text about the result'; end; its loaded from the main program with LoadPackage, and GetProcAddress which works fine for the other functions. but this one br...

How should I call this native dll function from C#?

Here's the native (Delphi 7) function: function Foo(const PAnsiChar input) : PAnsiChar; stdcall; export; var s : string; begin s := SomeInternalMethod(input); Result := PAnsiChar(s); end; I need to call this from C#, but the name of the dll is not known at compile time - so I must use LoadLibrary to get to it. This is what ...

OnClick event firing speed for components

I was using two TButton components on a form that functioned as Plus and Minus. When clicked they would add or subtract from an integer which would then be displayed on a TLabel. This functioned as desired where the speed at which I would click would fire the OnClick event without fault. I have replaced the buttons with PNGButton comp...

GetStackTrace in Delphi 7?

Using Delphi 7, how can I get a string representing the stack-trace from an Exception? try SomethingDodgy(); except on E:Exception do begin // print stack trace Log.Write(/* ??? */); end; end; I hear there's a GetStackTrace function in the latest delphi, but I can't find anything for delphi 7. No, upgrading is not an opt...

Some components cause block threads

I wrote a Delphi application that have some threads.In one of my forms there is a Shelltreeview component and whenever i click on a node to expand it, it takes some minutes to expansion and during this time all threads are blocked. Anybody have solution for this problem Thanks in advance ...

reinstall package

hi all I have created a new component, inserted into a new package, installed and it worked. (it appeared in the pallette). After a time I wanted to modify that component and accidentally deleted the *.bpl from the Delphi/projects/bpl folder, also Delphi asked me if I want to reload the missing *.bpl ant the next start and said no. Afte...

How can I print SelectedRows in DBGrid using Rave Report ?

To report current record in dataset I have made (one record by page): RvSystem1.SystemPrinter.FirstPage := DataSet.RecNo; RvSystem1.SystemPrinter.LastPage := DataSet.RecNo; So, how we can report only selected records in DataSet when all records appears in the same page. Something like: RvProject1.SelectReport('Report1'); for I := 0 t...

Bypass keyboard,mouse input and let SendInput pass

I'm making user definable key macros to a program. (Those macros are limited to that program.) I'm using TApplicationEvents to record key messages. And then use SendInput to play them back. But I need to disable mouse and keyboard so it wouldn't interrupt playback. I can't use JournalPlaybackProc and JournalRecordProc because they are ...

Delphi, Copy string to Byte array

what i have works, but im looking if there is a faster way to copy a string into a pByteArray from sysutils PByteArray = ^TByteArray; TByteArray = array[0..32767] of Byte; assume a and s are setup correctly a: pByteArray; s: string; is there a fast way to do this, ie something like copy for i := 1 TO Length(s) - 1 do ...

JVCL 2.10 and Delphi 2010

Did you try using JVCL 2.10 with Delphi 2010? I have Delphi 7 project that heavily uses DB components from that library and want to move it to new Delphi. I know that migration from JVCL 2.10 to newest JVCL version will be very problematic, so it would be better if Delphi 2010 worked with 2.10. do you have any experience? ...

Upgrade to Delphi 2010, or stick with Delphi 7 "forever"?

I am an individual user of Delphi, starting back in the early Turbo Pascal days. I have quite a bit of code developed over the years, but I have never sold software commercially or used it for business. Historically, Borland supported the non-professional users with lower cost versions, but Embarcadero does not. As I consider upgrading t...

Delphi 7 macro preprocessor support

Is there a macro preprocessor for Delphi 7? There isn't one built in so maybe there's a possibilty to use a third party or some other languages preprocessor (like c preprocessor). If there's one, how to set it up for Delphi 7? I'm trying to do function inlining (for speed). Macro preprocessor seems to be the only easy option for delph...

Delphi 7 and Vista/Windows 7 common dialogs - events do not work

I'm trying to modify the Delphi 7 Dialogs.pas to access the newer Windows 7 Open/Save dialog boxes (see Creating Windows Vista Ready Applications with Delphi). I can display the dialogs using the suggested modifications; however, events such as OnFolderChange and OnCanClose no longer function. This appears to be related to changing t...

Maximum number of dbprocesses already allocated

I'm running a Delphi application that uses BDE for database connection. Ocassionally (more often than I'd like) this error pops up when opening a query. Googling for this error, most picks refer to MS SQLServer database, and speak about a dbsetmaxprocs function, which I can't seem to find. So the question is: how can I prevent/correct ...

Odd behaviour with components with akRight alignment

In one customer computer (windows vista) almost all forms of my app are oddly unnaligned. Making some investigation I noticed that every component with akRight anchor acts oddly, being positioned way more for the right. Searching in SO I found this issue wich is similar to mine but not exacly the same. Since I cannot reproduce the iss...

Delphi "Internal Error EVA 1528"

Can anyone please help me out in rectifying the error: BORdbg70.exe BORdbg70.dll "Internal Error EVA 1528". What is the cause of this error? how can i slove this problem. See here how the remote debugging session was setup ...

Make Windows Integrated Form Style In Delphi 7

Every Delphi 7 developer knows that if he compile a application on Delphi 7, the style will be as Windows 2000 applications, but there is any method to make this better as the application can have the default theme of the Windows version, as C++ and C# applications? ...

How to resolve Delphi Winsoft Adonis and Borland Data Access components Conflict?

How do i resolve a conflict between Adonis data components and Borland data component. I have one project that uses the internal Delphi TADOQuery component that has a property Database that connects it to a TDatabase component. Then i have another project that uses TADOQuery from Adonis that has Connection property that connects to the ...