Accessing VCL controls from other units

Add-in Express™ Support Service
That's what is more important than anything else

Accessing VCL controls from other units
Accessing VCL controls from other units 
Andrew Lockwood

Posts: 50
Joined: 2014-12-29
As a newbie, I am puzzled as to how I am supposed to reference the VCL controls on a form from another unit.

When I add a new ADX Outlook form to my project, the unit includes the note that The adxOlForm1 variable is intended for the exclusive use by the TadxOlFormsCollectionItem Designer. NEVER use this variable for other purposes.

So how am I supposed to reference the form / controls from, say, the AddInModule? Normally, I would write something like:-

with adxOlForm1 do


but this appears to be the wrong way to do it!
Posted 29 Dec, 2014 11:53:03 Top
Andrei Smolin

Add-in Express team

Posts: 14137
Joined: 2006-05-11
Hello Andrew,

That variable must be used by the designer exclusively. In fact, you don't deal with the form, you deal with instances of the form that the forms manager creates (when required). As to how to access a form instance, please see section Form Region Instancing in the PDF file in the folder {Add-in Express}\Docs on your development PC.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Dec, 2014 04:19:25 Top