Bug: EnableVisualStyle with Open/SaveFileDialog

G

Guest

Hi

i have a strange problem with the open/savefiledialog.

1st Case
===============================================
If i call in my big mdi-application (25 Forms) a openfiledialog or a savefiledialog like ..

If Me.SaveFileDialog1.ShowDialog = DialogResult.OK Then ..

and click inside the dialog at the scrollbar, the application quits with a System.NullReferenceException

If i disable Application.EnableVisualStyles all works fine ????

2nd Case
===============================================
If i build a new application with only one form1 and call the filedialogs like the same with EnableVisualStyles everything is ok

3rd Case
===============================================
If i copy the form from case 2 to case 1 and call the filedialogs from form1 (same form, same code) the application quits like case 1

Application.EnableVisualStyles / XP-Styles is the key for that bug. Does anybody can help

Best regard

Michael Herrman

Windows XP-Pro, VB.Net Pro, Framework 1.1.4322.573
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?TWljaGFlbA==?= said:
Application.EnableVisualStyles / XP-Styles is the key for that bug. Does anybody can help ?

Does calling 'Application.DoEvents' directly after 'EnableVisualStyles' help?
 

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