Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / July 2006

Tip: Looking for answers? Try searching our database.

What events do WindowEvents actually cover?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kehlar - 12 Jul 2006 19:16 GMT
I'm handling WindowEvents in my code to try and capture when a solution
Property Page dialog is closing. It doesn't work. I'm getting events when
closing the IDE and closing any form or document, but not when it's a pop-up
dialog (like project or solution property pages). Does WindowEvents only
cover modaless windows?

This is really frustrating, all I want is to get notification when the
startup project has been changed, but there seems to be no way to make that
happen.
Carlos J. Quintero [VB MVP] - 13 Jul 2006 10:12 GMT
WindowEvents does not cover those modal dialogs, only toolwindows and
document windows.

To detect when the Startup project has changed I would:

1) Capture the AfterExecute event of the command
"Project.SetupasStartUpProject". See:

HOWTO: Capturing commands events from Visual Studio .NET add-ins.
http://www.mztools.com/resources_vsnet_addins.htm

2) Capture when the Project Properties modal dialog has been closed Capture
the AfterExecute event of the command "Project.Properties" in VS.NET
2002/2003. In VS 2005 the window is modeless so I am not sure it it will
work.

Finally, when a problem is unsolvable you need to start thinking if being
notified when the startup project has been changed is really necessary or if
you could modify the logic or user interface of your scenario to get that
data only when required.

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

> I'm handling WindowEvents in my code to try and capture when a solution
> Property Page dialog is closing. It doesn't work. I'm getting events when
[quoted text clipped - 7 lines]
> that
> happen.
kehlar - 13 Jul 2006 18:39 GMT
> 2) Capture when the Project Properties modal dialog has been closed Capture
> the AfterExecute event of the command "Project.Properties" in VS.NET
[quoted text clipped - 5 lines]
> you could modify the logic or user interface of your scenario to get that
> data only when required.

That's where I'm heading toward right now, but I'll give your suggestion a
try before giving up. I could always try hacks like using a timer to probe
for the current startup project, or listen to all windows on the desktop but
I really don't want to go there.

Thanks!
> > I'm handling WindowEvents in my code to try and capture when a solution
> > Property Page dialog is closing. It doesn't work. I'm getting events when
[quoted text clipped - 7 lines]
> > that
> > happen.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.