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! |
|
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. |
|
Rup Go
Posts: 64
Joined: 2007-03-01
|
|
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 |
|
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(); |
|
Rup Go
Posts: 64
Joined: 2007-03-01
|
|