Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

accessing properties through com

Status
Not open for further replies.

sanka69

Programmer
May 15, 2002
6
0
0
GB
Hi all,
I have a third party ActiveX control which as a property ACStyle. I was under the impression that I could refence the properties of ACStyle like this:

: ac is the name given to the control on the form.

var
acColor : TColor;
begin
ACColor := ac.Style.BackColor;
end;

However this causes an access violation. Can someone tell me what I need to do to access this property?

Thanks,
Richard
 
Shortly after posting, I realised that the ac.Style was a pointer, however taking that into account I still get GPFs when trying to read or write back to individual elements of the record.

Can anyone advise me please?

Thank you,
Richard
 
If Style is a pointer, you need to dereference it:
Code:
ACColor := ac.Style^.BackColor;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top