Modal form is not properly working on inspector

Status
Not open for further replies.
Hi all,




I have created an outlook addin and added toolbar on an inspector open event in inspector.


When user click on a button on toolbar, new modal form gets opened on top of inspector .


If user clicks on send button of inspector and closes the model form then send email event of inspector gets fired.


How can I make it completely model , inspectors event should not execute if user has clicked on button while model window was opened?




Regards,


Nitin
 
K

Ken Slovak - [MVP - Outlook]

What version of Outlook, what language and development platform are you

using?

How are you opening the form?

If a form is opened modally the Inspector should not be responsive until the

form is dismissed if you are doing things correctly.

"nitwalke@gmail.com" <nitwalkegmail.com.49esxo@invalid> wrote in message

news:nitwalkegmail.com.49esxo@invalid...

> Hi all,

> I have created an outlook addin and added toolbar on an inspector open
> event in inspector.
> When user click on a button on toolbar, new modal form gets opened on
> top of inspector .
> If user clicks on send button of inspector and closes the model form
> then send email event of inspector gets fired.
> How can I make it completely model , inspectors event should not
> execute if user has clicked on button while model window was opened?

> Regards,
> Nitin

> > nitwalke@gmail.com
> >
 
It works for outlook2007.It also works for outlook2003 when mail format is 'Microsoft Office Word 2003 to Rich Text email Messages' but when we use mail format as 'Microsoft Office Word 2003 and edit e-mail messages.' it doesn't work.




I have developed addin in C#.


form is opened using form.showDialog() method.This method made inspector as modal.




What version of Outlook, what language and development platform are you


using?




How are you opening the form?




If a form is opened modally the Inspector should not be responsive until the


form is dismissed if you are doing things correctly.




--


















"nitwalke@gmail.com" <nitwalkegmail.com.49esxo@invalid> wrote in message


news:nitwalkegmail.com.49esxo@invalid...

>

> Hi all,

>

> I have created an outlook addin and added toolbar on an inspector open

> event in inspector.

> When user click on a button on toolbar, new modal form gets opened on

> top of inspector .

> If user clicks on send button of inspector and closes the model form

> then send email event of inspector gets fired.

> How can I make it completely model , inspectors event should not

> execute if user has clicked on button while model window was opened?

>

> Regards,

> Nitin

>

>

> --

> nitwalke@gmail.com

>

>
 
D

Dmitry Streblechenko

See my reply to your question on the Redemption mailing list

(http://tech.groups.yahoo.com/group/Outlook-Redemption/)

Dmitry Streblechenko (MVP)

-

"nitwalke@gmail.com" <nitwalkegmail.com.49esxo@invalid> wrote in message

news:nitwalkegmail.com.49esxo@invalid...

> Hi all,

> I have created an outlook addin and added toolbar on an inspector open
> event in inspector.
> When user click on a button on toolbar, new modal form gets opened on
> top of inspector .
> If user clicks on send button of inspector and closes the model form
> then send email event of inspector gets fired.
> How can I make it completely model , inspectors event should not
> execute if user has clicked on button while model window was opened?

> Regards,
> Nitin

> > nitwalke@gmail.com
> >
 
K

Ken Slovak - [MVP - Outlook]

What do you mean by "This method made inspector as modal." ?

You aren't displaying the Inspector using Display() with the modal argument

are you?

You might need to get the window handle of the Inspector and supply an

IOLKWindow class object that returns that handle and supply that as the

owner of the modal form. I've often had to do that, especially with WordMail

Inspectors.

"nitwalke@gmail.com" <nitwalkegmail.com.49gnu0@invalid> wrote in message

news:nitwalkegmail.com.49gnu0@invalid...

> It works for outlook2007.It also works for outlook2003 when mail format
> is 'Microsoft Office Word 2003 to Rich Text email Messages' but when we
> use mail format as 'Microsoft Office Word 2003 and edit e-mail
> messages.' it doesn't work.

> I have developed addin in C#.
> form is opened using form.showDialog() method.This method made
> inspector as modal.
 
Please see following link to get answer




http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/10cb8068-55ad-41b0-99b9-778c02dfad14






What do you mean by "This method made inspector as modal." ?




You aren't displaying the Inspector using Display() with the modal argument


are you?




You might need to get the window handle of the Inspector and supply an


IOLKWindow class object that returns that handle and supply that as the


owner of the modal form. I've often had to do that, especially with WordMail


Inspectors.




--


















"nitwalke@gmail.com" <nitwalkegmail.com.49gnu0@invalid> wrote in message


news:nitwalkegmail.com.49gnu0@invalid...

>

> It works for outlook2007.It also works for outlook2003 when mail format

> is 'Microsoft Office Word 2003 to Rich Text email Messages' but when we

> use mail format as 'Microsoft Office Word 2003 and edit e-mail

> messages.' it doesn't work.

>

> I have developed addin in C#.

> form is opened using form.showDialog() method.This method made

> inspector as modal.
 
K

Ken Slovak - [MVP - Outlook]

Post whatever you're going to post here.

"nitwalke@gmail.com" <nitwalkegmail.com.49iiib@invalid> wrote in message

news:nitwalkegmail.com.49iiib@invalid...

> Please see following link to get answer

> http://tinyurl.com/y5kmhht
>
 
Here is code.

//form object is windows form

OutlookWindow32 inspectorIWin32Window = new OutlookWindow32((Object)_mailItem.GetInspector, true);

form.ShowDialog(inspectorIWin32Window );

// above code makes inspector as modal.it solves my problem

//If user clicks on send button of inspector and closes the form then send email event not fired.

//But I get another problem.

I have added a ContextMenuStrip on a form. When user click on contextMenu,, menu appears but form get minimised. This is happened after adding above code. Can I get any suggestion?

Post whatever you're going to post here.

"nitwalke@gmail.com" <nitwalkegmail.com.49iiib@invalid> wrote in message

news:nitwalkegmail.com.49iiib@invalid...

> Please see following link to get answer

> http://tinyurl.com/y5kmhht
>
 
I didn't get IOLKWindow class. Can you give code?




What do you mean by "This method made inspector as modal." ?




You aren't displaying the Inspector using Display() with the modal argument


are you?




You might need to get the window handle of the Inspector and supply an


IOLKWindow class object that returns that handle and supply that as the


owner of the modal form. I've often had to do that, especially with WordMail


Inspectors.




--


















"nitwalke@gmail.com" <nitwalkegmail.com.49gnu0@invalid> wrote in message


news:nitwalkegmail.com.49gnu0@invalid...

>

> It works for outlook2007.It also works for outlook2003 when mail format

> is 'Microsoft Office Word 2003 to Rich Text email Messages' but when we

> use mail format as 'Microsoft Office Word 2003 and edit e-mail

> messages.' it doesn't work.

>

> I have developed addin in C#.

> form is opened using form.showDialog() method.This method made

> inspector as modal.
 
K

Ken Slovak - [MVP - Outlook]

What you set up it just as good and will work as well.

"nitwalke@gmail.com" <nitwalkegmail.com.49ntgy@invalid> wrote in message

news:nitwalkegmail.com.49ntgy@invalid...

> I didn't get IOLKWindow class. Can you give code?
 
K

Ken Slovak - [MVP - Outlook]

I don't know what a ContextMenuStrip is or why the form it's on would appear

minimized.

"nitwalke@gmail.com" <nitwalkegmail.com.49ikco@invalid> wrote in message

news:nitwalkegmail.com.49ikco@invalid...

> Here is code.
> //form object is windows form

> OutlookWindow32 inspectorIWin32Window = new
> OutlookWindow32((Object)_mailItem.GetInspector, true);

> form.ShowDialog(inspectorIWin32Window );

> But I get another problem.

> I have added a ContextMenuStrip on a form. When user click on
> contextMenu,, menu appears but form get minimised. This is happened
> after adding above code. Can I get any suggestion?
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
E Can I hide an explorer or make an explorer modal Outlook VBA and Custom Forms 2
E Can I hide an explorer or make an explorer modal Outlook VBA and Custom Forms 2
T Customized form: The Forward option shows write layout Outlook VBA and Custom Forms 0
T 1:1 Datatransfer from incoming mail body to customs form body Outlook VBA and Custom Forms 0
V Latest Changes to form not appearing for some users Outlook VBA and Custom Forms 3
J Does the .fdm contain my custom form? How to make ol use it? - ol2007 Outlook VBA and Custom Forms 4
J ol2021 custom form not displaying pics Outlook VBA and Custom Forms 37
bdsermons Outlook 365 command button in outlook form Outlook VBA and Custom Forms 5
wayneame Changing the Form Used by Existing Task Items in a Folder Outlook VBA and Custom Forms 3
N Contact Form Notes Field Touch vs Mouse Using Outlook 0
cbufacchi Outlook 365 Populate custom Outlook Appoint form Outlook VBA and Custom Forms 2
C Create Meeting With Custom Form Outlook VBA and Custom Forms 2
W Designer Form 2013 and Script ? how ? Outlook VBA and Custom Forms 1
J Read Outlook Form fields Outlook VBA and Custom Forms 3
V Compound IF, OR, AND in Outlook form Outlook VBA and Custom Forms 4
J custom form not displaying pictures Outlook VBA and Custom Forms 7
I Button PDF in Outlook Contact custom form Outlook VBA and Custom Forms 1
K Font Sizing in Custom Form Regions for Contacts Outlook VBA and Custom Forms 1
V Validating Outlook form with "OR" and "AND" Outlook VBA and Custom Forms 1
M Outlook 2010 How could I globally redesign an outlook template form/region/inspector template used to display mail lists or an individual mails? Outlook VBA and Custom Forms 0
A How to stop user form from disapearing once mail window is closed? Outlook VBA and Custom Forms 0
K can't get custom form to update multiple contacts using VBA Outlook VBA and Custom Forms 3
V Form data not sending for some users Outlook VBA and Custom Forms 2
H Custom Outlook Contact Form VBA Outlook VBA and Custom Forms 1
witzker HowTo Change message Class of contact form Outlook VBA and Custom Forms 0
A VBscript stops running after updating form Outlook VBA and Custom Forms 1
witzker HowTo start a macro with an Button in OL contact form Outlook VBA and Custom Forms 12
D Emailed form is blank Outlook VBA and Custom Forms 0
F Validation on custom task form after task acceptance Outlook VBA and Custom Forms 1
C Add Form to Appointments Received, Automatically Outlook VBA and Custom Forms 6
V Date and/or time error in Outlook Form Outlook VBA and Custom Forms 0
A Form Position with Dual Monitors Outlook VBA and Custom Forms 2
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
M VbScript for Command Button on Contacts Custom Form Using Outlook 1
G Other users can't see P.2 with custom fields in Form Outlook VBA and Custom Forms 0
O Create a custom contact form - questions before messing things up... Outlook VBA and Custom Forms 4
L Custom Form Tutoral? Outlook VBA and Custom Forms 6
D Lost Access to Custom Form Outlook VBA and Custom Forms 4
A Form style totally changes Outlook VBA and Custom Forms 2
M vCard does not have user-defined fields from my custom contact form (365) Using Outlook 1
S Outlook Custom Form Scripting only working when clicking on "Run this form" Outlook VBA and Custom Forms 2
V Making a Date field mandatory in outlook form Outlook VBA and Custom Forms 2
R Add 'Company' to Select Names Form Using Outlook 1
Victor_50 Outlook 2013 Custom Contact Form starts with "E-mail 2" Outlook VBA and Custom Forms 2
C Custom Form (seperate layout pages and message reading pane) Outlook VBA and Custom Forms 0
C Reading Pane for Custom Form Outlook VBA and Custom Forms 2
N Custom Form Controls Not Visible To Recipient Outlook VBA and Custom Forms 3
BretAB Is it possible to add a lookup field to a Message form? Outlook VBA and Custom Forms 4
Randy Redekopp How To Merge Contact Info to Email Custom Form Template Using Outlook 2
D Problem with custom form including _DocSiteControl1 Outlook VBA and Custom Forms 0

Similar threads

Top