0

I have a legacy .NET 2.0 windows forms application that I am working with. It works fine in XP but in Windows 7, if an aero theme is enabled the app starts up, but crashes when you click 'File' in the menu bar. The application runs fine when using a windows basic theme. It also runs fine if I select the 'Disable Desktop Composition' item in the properties of the shortcut.

I have run the code in visual studio with all exceptions turned on and found nothing. The regular windows event logs are no help either.

Karl
  • 92
  • 5
  • What do you mean by "menu bar?" If it's a console app, then there shouldn't be any menu bar. – Jacob Jun 14 '11 at 22:24
  • Sorry ! Not a console app but a windows forms application. I shall correct it. – Karl Jun 14 '11 at 22:27
  • Are there any event handlers associated with the menu bar or File menu? You should post that code if there are some. – Jacob Jun 14 '11 at 22:31
  • .NET is rather excellent at giving you very informative exceptions with a stack trace to show you what went wrong. If you haven't implemented an event handler for AppDomain.CurrentDomain.UnhandledException and display the value of e.ExceptionObject.ToString() then it is high time you do. – Hans Passant Jun 14 '11 at 23:49
  • Can you post a screenshot of the crash? Seeing it might help figure out what *kind* of crash it was. – Ian Boyd Jun 15 '11 at 01:10
  • There isn't an exception thrown, the application just freezes. It doesn't look like much, the file menu drops down and the app is unresponsive past that. It seems like it takes some time to render the borders of menu dropdown and then freezes. – Karl Jun 15 '11 at 18:29

1 Answers1

0

Please check the following items an give it another try:

  1. Check for 32 or 64 bit OS, both in IDE and your OS.
  2. Keep the .config file with the .exe file
  3. try to repair .net 2
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
Ehsan Zargar Ershadi
  • 24,115
  • 17
  • 65
  • 95
  • Ian, thanks for the info. This happens on multiple 32 bit machines so i dont think its a .net issue with a particular machine. What should I put in the .congif with the exe? – Karl Jun 15 '11 at 18:33