Just want to be sure about 2005

  • Thread starter Thread starter **Developer**
  • Start date Start date
D

**Developer**

Application.EnableVisualStyles()

'There is bug in the implementation of EnableVisualStyles that interferes
with Images stored in an ImageList component and Window Common Controls,

Application.DoEvents() 'Work around

I saw an option that makes me think the above is no longer necessary - is
that correct??



Same for allowing only one instance of an app - following code no longer
required - is that correct??

If
Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName).GetLength(0)
 
**Developer** said:
Application.EnableVisualStyles()

'There is bug in the implementation of EnableVisualStyles that interferes
with Images stored in an ImageList component and Window Common Controls,

Application.DoEvents() 'Work around

I saw an option that makes me think the above is no longer necessary - is
that correct??

IIRC the problem has been fixed.
Same for allowing only one instance of an app - following code no longer
required - is that correct??

ACK. You can enable visual styles and single-instance behavior in "My
Project".
 
Herfried said:
ACK. You can enable visual styles and single-instance behavior in "My
Project".

Although personally I find it rather irritating that you can't get the
project to launch from a Sub Main when using that, you're forced to provide
a startup form. Which for my project doesn't really work.

I tried using the old VS2003 method, and it worked on all the controls
except for ComboBoxes, which still had the non-visual-styles appearance and
looked particularly out-of-place. Is there a way to work around this?
 
Thanks

**Developer** said:
Application.EnableVisualStyles()

'There is bug in the implementation of EnableVisualStyles that interferes
with Images stored in an ImageList component and Window Common Controls,

Application.DoEvents() 'Work around

I saw an option that makes me think the above is no longer necessary - is
that correct??



Same for allowing only one instance of an app - following code no longer
required - is that correct??

If
Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName).GetLength(0)
 

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

Back
Top