Home All Groups Group Topic Archive Search About

Just want to be sure about 2005

Author
29 Jan 2006 11:11 AM
**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)
Show quoteHide quote
> 1 Then

Author
29 Jan 2006 11:31 AM
Ken Tucker [MVP]
Hi,

        The visual styles are enabled by default in vs 2005

Ken
----------------
Show quoteHide quote
" **Developer**" <REMOVEdevelo***@a-znet.com> wrote in message
news:%23WfW9SMJGHA.1312@TK2MSFTNGP09.phx.gbl...
> 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)
> > 1 Then
>
>
Author
29 Jan 2006 12:19 PM
Herfried K. Wagner [MVP]
" **Developer**" <REMOVEdevelo***@a-znet.com> schrieb:
> 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".

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
29 Jan 2006 2:23 PM
Oenone
Herfried K. Wagner [MVP] wrote:
>> 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".

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?

--

(O)enone
Author
29 Jan 2006 2:46 PM
**Developer**
Thanks

Show quoteHide quote
" **Developer**" <REMOVEdevelo***@a-znet.com> wrote in message
news:%23WfW9SMJGHA.1312@TK2MSFTNGP09.phx.gbl...
> 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)
> > 1 Then
>
>