Click here to Skip to main content
15,896,493 members
Home / Discussions / C#
   

C#

 
AnswerRe: Restrict a file to be open Pin
Richard MacCutchan26-Oct-10 0:47
mveRichard MacCutchan26-Oct-10 0:47 
AnswerRe: Restrict a file to be open Pin
OriginalGriff26-Oct-10 0:53
mveOriginalGriff26-Oct-10 0:53 
AnswerRe: Restrict a file to be open Pin
Pete O'Hanlon26-Oct-10 0:56
mvePete O'Hanlon26-Oct-10 0:56 
AnswerRe: Restrict a file to be open Pin
#realJSOP26-Oct-10 1:32
professional#realJSOP26-Oct-10 1:32 
GeneralRe: Restrict a file to be open Pin
Mirko198026-Oct-10 3:12
Mirko198026-Oct-10 3:12 
Questionproblem with purecomponents Pin
f_aliani25-Oct-10 23:24
f_aliani25-Oct-10 23:24 
AnswerRe: problem with purecomponents Pin
OriginalGriff25-Oct-10 23:37
mveOriginalGriff25-Oct-10 23:37 
QuestionVSTO outlook stopping fire events while running...? Pin
leeoze25-Oct-10 23:04
leeoze25-Oct-10 23:04 
Hi I'm writing an outlook addin in VisuaStudio 2008 using the buildin Outlook addin project template of VS2008.

In my code I added a new button to one of the ActiveExplorer() commandbars.
I made it changed according to the number of items selected in the ActiveExplorer
using Application.ActiveExplorer().SelectionChange event.

this works just fine up until I click on the button and load my winForm. after doing so it seems like the Application events that I used (including : SelectionChange and ItemContextMenuDisplay) stopped triggered. and the button as a result stopped changing according to the number of items selected.

The winform is empty and loads up as ShowDialog.

Any ideas why and how to fix it? tnx leeoz

here is part of the relevant code (I only missed out the AddMenuBar(), ThisAddIn_Shutdown() and the other events which have the same problem after showing this winForm):

private void InternalStartup()
        {
            this.Application.ItemContextMenuDisplay +=new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemContextMenuDisplayEventHandler(Application_ItemContextMenuDisplay);
            this.Application.ContextMenuClose +=new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ContextMenuCloseEventHandler(Application_ContextMenuClose);
            this.Application.ActiveExplorer().SelectionChange += new Microsoft.Office.Interop.Outlook.ExplorerEvents_10_SelectionChangeEventHandler(ThisAddIn_SelectionChange);
            this.Startup += new System.EventHandler(ThisAddIn_Startup);            
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
        }



void ThisAddIn_SelectionChange()
        {
            if (btnManualFiling != null)
            {
                if (this.Application.ActiveExplorer().Selection.Count > 0)
                {

                    btnManualFiling.Enabled = true;                    

                }
                else
                {
                    btnManualFiling.Enabled = false;                    
                }
                CurrentSelection = this.Application.ActiveExplorer().Selection.Count.ToString();
                btnManualFiling.Caption = TomaxManCaption + "(" + CurrentSelection + " items)";
            }
        }

private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
                        AddMenuBar();
         }

private void buttonOne_Click(Office.CommandBarButton ctrl, ref bool cancel)
        {            
            frmManualFiling wnd = new frmManualFiling(this.Application);
            wnd.ShowDialog();
            wnd.Dispose();
            wnd = null;
            
         }

AnswerRe: VSTO outlook stopping fire events while running...? Pin
_Erik_26-Oct-10 1:51
_Erik_26-Oct-10 1:51 
GeneralNo knews there... still no answer Pin
leeoze26-Oct-10 3:27
leeoze26-Oct-10 3:27 
GeneralRe: No knews there... still no answer [modified] Pin
_Erik_26-Oct-10 4:21
_Erik_26-Oct-10 4:21 
GeneralRe: No knews there... still no answer Pin
_Erik_26-Oct-10 5:22
_Erik_26-Oct-10 5:22 
GeneralRe: Amazing, tnx it's working :) Pin
leeoze26-Oct-10 7:22
leeoze26-Oct-10 7:22 
Questionhow to Preventing double submit in ASP Pin
Sasmi_Office25-Oct-10 22:27
Sasmi_Office25-Oct-10 22:27 
AnswerRe: how to Preventing double submit in ASP Pin
Arun Jacob25-Oct-10 22:54
Arun Jacob25-Oct-10 22:54 
Questionstore procedure or sql command Pin
sa.alavifar25-Oct-10 20:52
sa.alavifar25-Oct-10 20:52 
AnswerRe: store procedure or sql command Pin
dan!sh 25-Oct-10 21:45
professional dan!sh 25-Oct-10 21:45 
AnswerRe: store procedure or sql command Pin
Keith Barrow25-Oct-10 21:46
professionalKeith Barrow25-Oct-10 21:46 
GeneralRe: store procedure or sql command Pin
sa.alavifar25-Oct-10 22:20
sa.alavifar25-Oct-10 22:20 
GeneralRe: store procedure or sql command Pin
Pete O'Hanlon25-Oct-10 22:25
mvePete O'Hanlon25-Oct-10 22:25 
GeneralRe: store procedure or sql command Pin
OriginalGriff25-Oct-10 23:21
mveOriginalGriff25-Oct-10 23:21 
GeneralLittle Bobby Tables Pin
Keith Barrow26-Oct-10 1:39
professionalKeith Barrow26-Oct-10 1:39 
GeneralRe: Little Bobby Tables Pin
OriginalGriff26-Oct-10 1:46
mveOriginalGriff26-Oct-10 1:46 
GeneralRe: Little Bobby Tables Pin
Keith Barrow26-Oct-10 2:18
professionalKeith Barrow26-Oct-10 2:18 
GeneralRe: Little Bobby Tables Pin
OriginalGriff26-Oct-10 2:23
mveOriginalGriff26-Oct-10 2:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.