ADXFormManager - FormClassName

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

ADXFormManager - FormClassName
calling a method of the specified FormClassName in AddinModule.cs 
Rup Go




Posts: 64
Joined: 2007-03-01
Hi

im a newbie here,

i think this will be an easy question, how can i get the form specified in the FormClassName property of ADXFormCollection.

example i have a class BLACKBOARD.cs (namespace My.Interface) that extends : AddinExpress.OL.ADXOlForm. So i put in FormClassName = My.Interface.BLACKBOARD

now i see my form in outlook, so how can i call a method "UPDATE or REFRESH or say any public method that is found in my blackboard class" to update my blackboard.

thanks a lot!
Posted 29 Mar, 2007 22:11:54 Top
Fedor Shihantsov


Guest


Hi Rup,

Use the ADXOlFormsCollectionItem.FormInstances method and the FormInstanceCount property.


    public class AddinModule : AddinExpress.MSO.ADXAddinModule
    {
    ... 
        private void CallADXOlFormPublicMethod()
        {
            for (int i = 0; i < adxOlFormsManager1.Items[0].FormInstanceCount; i++)
            {
                if (adxOlFormsManager1.Items[0].FormInstances(i).Visible)
                {
                    (adxOlFormsManager1.Items[0].FormInstances(i) as ADXOlForm1).AnyPublicMethod();
                }
            }
        }
    ...
    }


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 30 Mar, 2007 06:50:28 Top
Rup Go




Posts: 64
Joined: 2007-03-01
Thanks Fedor, it works!
Posted 01 Apr, 2007 22:33:53 Top
Rup Go




Posts: 64
Joined: 2007-03-01
Hi Fedor,

1 more question, how can i invoke an instance of the form whenever Outlook is launched? cause my problem now is when user didn't click the folder where the form is attach, calling the CallADXOlFormPublicMethod() would not take effect. Base on my observation, the 1st time user clicked the folder that will show the form, it just then invoke a new instance of the object.

thanks
Rup
Posted 01 Apr, 2007 22:58:19 Top
Fedor Shihantsov


Guest


Hi Rup,

You can call the ADXOlForm.CallADXOlFormPublicMethod() only after creating (displaying) the form. Note, ADXOlFormsManager creates ADXOlForms itself. You can not create a form ahead of time. So, you can move the CallADXOlFormPublicMethod() to AddinModuleand and
call this method from ADXOlForm by the following way:

(this.AddinModule as [Namespace].AddinModule).CallADXOlFormPublicMethod();
Posted 02 Apr, 2007 05:14:40 Top
Rup Go




Posts: 64
Joined: 2007-03-01
Alright, thanks Fedor!
Posted 02 Apr, 2007 21:53:15 Top