Confused the use of Buttons.pas same name but not from VCL

Posted by Sai Win Aung Win on June 17, 20011

Hello all experts
( I am not from English Speaking country, so please forgive my English, and for one month i came to know Delphi 5 )
I came across an existing runnable project, where the Buttons.pas ( which i think is from VCL ) actually existed in the same folder with project file. So when i found the declaration of the TSpeedButton, it shows the Buttons.pas from project folder which i mentioned above ( not from VCL, coz usually, Buttons.pas for TSpeedButton is from VCL). And i found out this Buttons.pas contains more properties and functions than the one in VCL. So when i try to use some same codes from existing project, Delphi gives error to undeclared identifier to the extra properties and functions, so i copied this Buttons.pas to my project folder, automatically this Buttons.pas shows up under USES phrase of project file , but error is Unit ExtDlgs was compiled with different version of Buttons.TSpeedButton. I tried replace this Buttons.pas into the VCL one, but can't compile it with vcl51.dpk( which contains original Buttons.pas). Also in the existing project, this Buttons.pas is not declared under USES phrase, very strange how it is declared and used to run the project. My problem is, 1.I want to use this Buttons.pas in my project but can't solve the conflict for same name Buttons.pas already exist in VCL ? 2.don't know how to make my project file knows it and able to use extra properties and functions of this Button.pas. Please do advice me, i have been stucking with this for almost 2 days. Thank you in advance

Related articles


Follow Ups