How Do I Find MyApplication Events?

S

Stewart Berman

I have a Visual Studio 2005 Windows Forms project. I open the ApplicationEvents.vb file and the
General drop down menu is empty.

What option will populate it?
 
J

Jie Wang [MSFT]

Hi Stewart,

Do you have the "Enable Application Framework" option checked in your
Project Properties (in the Application tab)?

This option must be enabled so you can have the application events.

If this option is enabled, to access code for application events:

1. Select a project in Solution Explorer, and then on the Project menu,
click Properties.

2 .Select the Application page.

3. Click the View Application Events button to open the Code Editor.

Now there should be a (MyApplication Events) item in the General drop down
list.

Or you can try manually add the following code to the MyApplication class
and see if it compiles:

Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As
Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles
Me.Startup
' place holder
End Sub

Thanks,

Jie Wang

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Stewart Berman

If this option is enabled, to access code for application events:

The option is enabled and your instructions are just what I did to open the ApplicatinoEvents.vb
and, as I mentioned in my first posting, the General drop down list is empty.
Or you can try manually add the following code to the MyApplication class
and see if it compiles:

There isn't any class to add it to. If I just copy it into the ApplicationEvents.vb files via the
code editor it says "Statement is not valid in a namespace.

I finally fixed it. I created a new windows forms project, clicked on the Application Events button
copied the generated code
Namespace My

' The following events are availble for MyApplication:
'
' Startup: Raised when the application starts, before the startup form is created.
' Shutdown: Raised after all application forms are closed. This event is not raised if the
application terminates abnormally.
' UnhandledException: Raised if the application encounters an unhandled exception.
' StartupNextInstance: Raised when launching a single-instance application and the application
is already active.
' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
Partial Friend Class MyApplication

End Class

End Namespace

and pasted it into the ApplicationEvents.vb file in the project I was having a problem with.

That seemed to fix it.

I then went back into the project and deleted ApplicationEvents.vb completely. Pressing the
Application Events button recreated it properly.

Finally, I closed the project, manually edited the ApplicationEvents.vb file and deleted call of the
lines in the file and saved it -- basically an empty file. I then opened the project, pressed
Application Events and had the same problem as I originally had.

Conclusion: The original problem was caused by an empty ApplicatoinEvents.vb file. Visual Studio
2005 is very unstable and often goes into a hard loop that requires killing it so a corrupted file
is not unexpected. I tried reporting the problem but Microsoft is no longer accepting bug reports
for Visual Studio.
 
J

Jie Wang [MSFT]

Oh, I didn't expect the ApplicationEvents.vb file is empty at the first
place, that's my fault.

So I think the problem is, if the ApplicationEvents.vb file is created with
the MyApplication class code in it, how come these code got deleted at some
point? Could be some issues in the Visual Studio product if you can
reproduce the problem (code automatically deleted by IDE) stably.

I'm not sure what you mean by "Microsoft is no longer accepting bug reports
for Visual Studio". If you mean Visual Studio 2005, you can call Microsoft
Customer Support Services to report the problem and request for a fix. And
I can also help you get your voices to the product team. We're always
listerning to our customers. :)

By the way, do you have Visual Studio 2005 SP1 installed?

Regards,

Jie Wang

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Stewart Berman

So I think the problem is, if the ApplicationEvents.vb file is created with
the MyApplication class code in it, how come these code got deleted at some
point? Could be some issues in the Visual Studio product if you can
reproduce the problem (code automatically deleted by IDE) stably.

This is the only time I noticed it because it is the only time I tried to use it.

The hard loop does occur frequently but is not 100% reproducible. (My project directory usually has
quite a few .tmp files from the crashes which I have to manually cleanup.)
I'm not sure what you mean by "Microsoft is no longer accepting bug reports
for Visual Studio". If you mean Visual Studio 2005, you can call Microsoft

https://connect.microsoft.com/VisualStudio
Which says it is for:
Help us make Microsoft Visual Studio and the Microsoft .NET Framework the best they can be by
reporting bugs and suggesting features.

Does not accept bug reports for Visual Studio 2005.

https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=12227
Microsoft Visual Studio 2005 Family and Earlier
We are no longer accepting feedback for Microsoft Visual Studio 2005 and earlier products.

Even though:
http://support.microsoft.com/lifecycle/?p1=3041
Says Visual Studio 2005 Professional Edition has a Mainstream Support retirement date of 4/12/2011

So it should be fully supported but it isn't.
Customer Support Services to report the problem and request for a fix. And
I can also help you get your voices to the product team. We're always
listerning to our customers. :)

This is the official channel for submitting and tracking bugs:
https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=12367&wa=wsignin1.0#Q10
Why was this site set up?
Our goal is to create a community around product feedback and provide you with a channel for
communication with the engineering teams working on Visual Studio and the .NET framework. We want to
partner with you to keep improving these products.

Again, this is the site for reaching Developer Division engineers:
https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=12367&wa=wsignin1.0#Q10
We only accept feedback for Developer Division technologies through the
http://connect.microsoft.com/VisualStudio site. If you would like to provide feedback on other
Microsoft technologies, please visit the Connect Directory: https://connect.microsoft.com/directory/

There does not appear to be a way to report and track a Visual Studio 2005 bug.
By the way, do you have Visual Studio 2005 SP1 installed?

Yes and two security patches:

Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework Version 2.0.50727 SP2
Installed Edition: Professional
Microsoft Visual Basic 2005 77626-009-0000007-41081
Microsoft Visual C# 2005 77626-009-0000007-41081
Microsoft Visual C++ 2005 77626-009-0000007-41081
Microsoft Visual J# 2005 77626-009-0000007-41081
Microsoft Visual Studio 2005 Tools for Applications 77626-009-0000007-41081
Microsoft Visual Web Developer 2005 77626-009-0000007-41081
Microsoft Web Application Projects 2005 77626-009-0000007-41081
Microsoft Web Application Projects 2005 Version 8.0.50727.762
Crystal Reports AAC60-G0CSA4B-V7000AY
Dotfuscator Community Edition
Dotfuscator for Visual Studio. Copyright (C) 2002-2007 PreEmptive Solutions LLC
Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB937061)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB947738)
 
J

Jie Wang [MSFT]

Hi Stewart,

Okay, now I understand your concern.

Yes the Connect site no longer have an option for submitting Visual Studio
2005 bugs, because that site is a channel for relatively new products, our
development team uses it to get fast feedback so the new product can be
improved quickly. However, Visual Studio 2005 has been shipped for around
3.5 years, the product team needs to move on. Eventually, it is the support
team's business to keep listening to customers and proving support.

If you believe what you saw is a bug in Visual Studio 2005, please contact
our technical support and provide them necessary information about it. The
support team will then take actions to get a solution out for you.

To contact our Technical Support team, please see info on this page:
http://msdn.microsoft.com/en-us/subscriptions/bb266240.aspx

If you have any further questions regarding the support questions, please
don't hesitate to let me know; or you can just contact your local MSDN
Subscription support team for help.

Regards,

Jie Wang

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Stewart Berman

To contact our Technical Support team, please see info on this page:

I tried to go through the "submit an incident online" process. I got to the Provide product ID and
selected Let Microsoft locate the product identification number. It failed to find it so I pressed
the Skip this button.

It then asked for Payment Method: Contracts or Software Assurance. I have neither so I pressed the
Skip this button. It then asked me to select how much I wanted to pay and I assume the next page
would have asked for a credit card.

I do not see why I have to pay Microsoft to report a bug in its software. I would not even want to
burn one of the Support Incidents I am entitled to under my MSDN subscription to report a bug but I
was not offered that choice anyway.

I went through a similar process the last time I mentioned the problem in a managed news group and
hit the same dead end. It is bad enough to have to spend hours debugging Microsoft's applications
-- but to have to pay for the privilege?
 
J

Jie Wang [MSFT]

Hi Stewart,

If the issue you reported is finally confirmed a bug in the product,
Microsoft will not charge you a penny.

You can contact your local MSDN support team to confirm the details.

Best regards,

Jie Wang

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Stewart Berman

Meanwhile I have to layout the money and then wait until Microsoft gets around to confirming it as a
bug. Since Visual Studio 2005 is not considered a priority product there is a good chance it will
never get resolved and I'll be out the money and time.

I have been hitting the bug less frequently lately so I think I just live with it until I switch to
a fully supported product (i.e. Visual Studio 2008) where you don't have to pay in advance to file a
bug report.
 
E

Eric

If VS2008 runs on your machine, and your program imports to it just fine,
that would be the recommended path.
Why run an old version of the same product if you have a bug which can be
fixed by upgrading?
The only point to not upgrading is if the old version does everything you
need it to so you don't want to take a chance that upgrading might break
something.
 
S

Stewart Berman

Visual Studio 2005 is required for this project so I am stuck with it. I will switch to Visual
Studio 2008 when I am finished with this phase.

I have Visual Studio 2008 installed on a couple of VMs under my development Windows Server 2008 and
have used it -- just not for this version of the project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top