delphi-7

Delphi 7 on Windows 8

限于喜欢 提交于 2019-12-19 11:18:51
问题 I have installed Windows 8 on my laptop, and trying to get Delphi 7 to run. I get the AV error: Access Violation at address 40005A06 in MOdule 'rtl70.bpl' Read of address C08B0033 I have tried everything I can think of, even reinstalled windows 8 instead of 8.1, but the problem persists. I have replaced the rtl70.bpl files in the SYSWOW64 and System32 files. It has worked in the past on Win 8.1, but not this time around? Any help would be greatly appreciated, I can think of nothing else to

ShellExecuteEx and Coinitialize in VCL thread

左心房为你撑大大i 提交于 2019-12-19 08:12:32
问题 Do I need to call Coinitialize in the main/VCL thread in Delphi before using ShellExecuteEx? For a thread, yes but for the VCL thread ? 回答1: No need to call CoInitialize for Windows Forms Applications. This is done for you in the main thread. More specific TApplication.Create in Forms.Pas : ... if not IsLibrary then FNeedToUninitialize := Succeeded(OleInitialize(nil)); ... 回答2: If in doubt, do it. In either case, CoInitialize() will return a hr : HRESULT which you should check, because you

making a wizard interface in delphi 7

妖精的绣舞 提交于 2019-12-19 05:47:30
问题 I'm using delphi 7 and I'm trying to make a wizard interface. I don't know if there is an easier way to make a wizard, so I was thinking of making separate forms for each step of the wizard, and when the user clicks "Next" the active form closes and the next one opens. Here's a screen-shot of two successive forms: I've made a procedure that take 2 forms as parameters: the form that will be closed and the next form of the wizard class Procedure Tspad.nextForm(showForm, closeForm: TForm); begin

Delphi: Canceling a TDataSet.Post in an OnBeforePost Event

拈花ヽ惹草 提交于 2019-12-19 05:10:28
问题 On our main data entry screen, we have an OK/Cancel dialog in the OnBeforePost event. OK lets things take their course Cancel right now does a Dataset.Cancel; Which does what it's meant to, roll back any changes and puts the dataset into browse mode. This is fine for most of the clients, but we have been asked if it can be changed to Cancel , Abort the Post and stay in edit mode with the current changes kept. If they want to cancel, they can use the cancel button. Looking at the source for

How to retrieve data from database and display in Ttreeview in delphi

不想你离开。 提交于 2019-12-18 18:31:13
问题 Please help me to populate a tree view from SQL database dynamically. I am very new to delphi and step by step processes are welcome. I have two table formats given in the picture below and i want to fill the tree view from database accordingly. I searched on other resource sites also but didn't find the solution what i am looking for. I am stuck. Please help me guys.... Many many thanks in advance. procedure TForm1.Button1Click(Sender: TObject); var // node : TTreeList; i: Integer;

How to retrieve data from database and display in Ttreeview in delphi

两盒软妹~` 提交于 2019-12-18 18:31:13
问题 Please help me to populate a tree view from SQL database dynamically. I am very new to delphi and step by step processes are welcome. I have two table formats given in the picture below and i want to fill the tree view from database accordingly. I searched on other resource sites also but didn't find the solution what i am looking for. I am stuck. Please help me guys.... Many many thanks in advance. procedure TForm1.Button1Click(Sender: TObject); var // node : TTreeList; i: Integer;

Can Delphi tell me the name of the routine that threw an exception?

こ雲淡風輕ζ 提交于 2019-12-18 18:28:17
问题 I know how to catch exceptions in delphi (try..except/finally and e.message) but I want to know if there exists an exception handling mechanism which can raise the exception and also the name of the routine which raised it. by example procedure/function bla();//this can be in a unit/class begin code.... an error is raised here -> inside or not of an try-except/finally block end; and I'll receive an message/object/anything that indicates me that error 'x' was raised in 'bla'. I know about

Fastest way to calculate colors for a gradient?

ぃ、小莉子 提交于 2019-12-18 15:49:43
问题 I'm making a small collection of types/functions related to gradients for future use. I would like to make sure there's at least two procedures: ColorBetween and ColorsBetween. I may want to just get an array of TColor between any 2 colors (ColorsBetween), and I may also just need to know one color value at a percentage between two colors (ColorBetween). I already have it mostly done below. Except, I have two core questions: How do I calculate the in-between color of each RGB channel by a

Threaded Delphi ADO Query

烈酒焚心 提交于 2019-12-18 12:45:33
问题 I have a query code that I can call every time I need to fetch data from the database, and I want it to be threaded. Not sure how to implement this in a thread so I can reuse this code, basically, I want this code inside a thread. I know how to create a simple database query inside thread but want something that I can reuse. Can anyone point me to where I can find examples for this or be kind enough to provide an example? Here is my sample database query: function TDBConnection.SQLOpen(const

How can i read details of file?

若如初见. 提交于 2019-12-18 11:38:03
问题 How can i read details of an exe file like File Version, Product Version and anything else stored in Details tab in Properties window of that file? Thanks. 回答1: This has been described at About: https://web.archive.org/web/20050919084715/http://delphi.about.com/cs/adptips2001/a/bltip0701_4.htm Basically, you just use the GetFileVersionInfo function to obtain the data and then VerQueryValue function to read it. Because these API functions are a bit 'hard' to use, I have written a simple