PC Review


Reply
Thread Tools Rate Thread

Catching menu item click event

 
 
Jill
Guest
Posts: n/a
 
      19th Aug 2005
I am coding an Outlook addin using Visual Basic and CDO. In my addin,
I have added several items to the "Tools" menu. One of these menu
items starts a process that can take several minutes to complete. A
second menu item becomes enabled only when this process is running, and
this second menu item is used to stop the process started by the first
menu item.

I am able to catch the menu button click event and start the process
with no proplems. I have added a DoEvents call into the main loop of
my proccess to allow events to be handled while the process is still
running. I am able to catch serveral types of events while the process
is running. However, I cannot catch another menu button click event
while the process is still running, i.e. while the first menu button
click is still being handled.

Any ideas why i am unable to catch the second menu button click event?
An ideas how to fix/circumvent this issue?

Thanks!

 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      22nd Aug 2005
Use a timer control to start up your long running process. Set the timer
control to ON when the first click event fires. The timer will fire after
that and start your process, which will allow the first Click event
procedure to complete before the process starts and therefore your second
click will fire.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jill" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am coding an Outlook addin using Visual Basic and CDO. In my addin,
> I have added several items to the "Tools" menu. One of these menu
> items starts a process that can take several minutes to complete. A
> second menu item becomes enabled only when this process is running, and
> this second menu item is used to stop the process started by the first
> menu item.
>
> I am able to catch the menu button click event and start the process
> with no proplems. I have added a DoEvents call into the main loop of
> my proccess to allow events to be handled while the process is still
> running. I am able to catch serveral types of events while the process
> is running. However, I cannot catch another menu button click event
> while the process is still running, i.e. while the first menu button
> click is still being handled.
>
> Any ideas why i am unable to catch the second menu button click event?
> An ideas how to fix/circumvent this issue?
>
> Thanks!
>


 
Reply With Quote
 
New Member
Join Date: Jun 2005
Posts: 2
 
      21st Sep 2005
Maybe using threads may solve your problem.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Click event on menu item is lost after first time firing of the event mayuresh.kasture@gmail.com Microsoft Excel Programming 1 2nd Apr 2007 01:25 PM
Custom event handling for click of menu item. trialproduct2004@yahoo.com Microsoft Dot NET 2 23rd Feb 2007 07:08 PM
How to allow click event on menu item parent =?Utf-8?B?TWFydHkgQ3J1aXNl?= Microsoft VB .NET 1 10th Aug 2005 02:26 AM
Custom Form-Catching item,inspector Save event =?Utf-8?B?YmFjazJncmlk?= Microsoft Outlook Form Programming 0 13th Jun 2005 08:57 PM
Problem catching click event Kjell Kristiansson Microsoft VB .NET 2 3rd May 2005 08:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:04 PM.