PC Review


Reply
Thread Tools Rate Thread

Application.EnableVisualStyles and no image in Tab control

 
 
#ROBERT
Guest
Posts: n/a
 
      14th Mar 2005
(VS 2003 + .NET Framework 1.1 + WinXP Pro SP2)

Calling Application.EnableVisualStyles() after the initialization() removes
all images in the tab control (in the tab headers I mean). Without visual
styles enabled, I have no
problem. What is wrong and what is the solution?
(PS: Using a manifest file makes no trouble. just the function :
Application.EnableVisualStyles() )

Thanks for any help.





 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      14th Mar 2005
"#ROBERT" <(E-Mail Removed)> schrieb:
> Calling Application.EnableVisualStyles() after the initialization()
> removes
> all images in the tab control (in the tab headers I mean). Without visual
> styles enabled, I have no
> problem. What is wrong and what is the solution?


Call 'Application.DoEvents' directly after calling 'EnableVisualStyles'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

 
Reply With Quote
 
#ROBERT
Guest
Posts: n/a
 
      14th Mar 2005
No way... it is just the same.
---------------
"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "#ROBERT" <(E-Mail Removed)> schrieb:
>> Calling Application.EnableVisualStyles() after the initialization()
>> removes
>> all images in the tab control (in the tab headers I mean). Without visual
>> styles enabled, I have no
>> problem. What is wrong and what is the solution?

>
> Call 'Application.DoEvents' directly after calling 'EnableVisualStyles'.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>



 
Reply With Quote
 
Mick Doherty
Guest
Posts: n/a
 
      14th Mar 2005
Application.EnableVisualStyles and Application.DoEvents must be called in
Sub Main(), not Sub New()

i.e.
\\\
Shared Sub Main
Application.EnableVisualStyles
Application.DoEvents
Application.Run (New Form1)
End Sub
///

Alternatively, populate the imagelist during or after form load, or add a
manifest resource to the exe after you have built it.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


"#ROBERT" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> No way... it is just the same.
> ---------------
> "Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> "#ROBERT" <(E-Mail Removed)> schrieb:
>>> Calling Application.EnableVisualStyles() after the initialization()
>>> removes
>>> all images in the tab control (in the tab headers I mean). Without
>>> visual styles enabled, I have no
>>> problem. What is wrong and what is the solution?

>>
>> Call 'Application.DoEvents' directly after calling 'EnableVisualStyles'.
>>
>> --
>> M S Herfried K. Wagner
>> M V P <URL:http://dotnet.mvps.org/>
>> V B <URL:http://classicvb.org/petition/>

>
>



 
Reply With Quote
 
Rodger Constandse
Guest
Posts: n/a
 
      14th Mar 2005
I've experienced a lot of weird problems using EnableVisualStyles (with or
without calling DoEvents afterwards), including a mysterious
'System.Runtime.InteropServices.SEHException' exception.

Just use the manifest file.

--
Rodger Constandse

<http://www.SequenceDiagramEditor.com>
Sequence Diagram Editor - A quick and easy way to draw and edit sequence diagrams

#ROBERT wrote:

> (VS 2003 + .NET Framework 1.1 + WinXP Pro SP2)
>
> Calling Application.EnableVisualStyles() after the initialization() removes
> all images in the tab control (in the tab headers I mean). Without visual
> styles enabled, I have no
> problem. What is wrong and what is the solution?
> (PS: Using a manifest file makes no trouble. just the function :
> Application.EnableVisualStyles() )
>
> Thanks for any help.
>
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.EnableVisualStyles and no image in Tab control #ROBERT Microsoft Dot NET Framework 4 14th Mar 2005 09:55 PM
Application.EnableVisualStyles and no image in Tab control #ROBERT Microsoft Dot NET 4 14th Mar 2005 09:55 PM
Application.EnableVisualStyles() And Image on the button Sylvain Barde Microsoft VB .NET 1 1st Dec 2004 11:41 AM
Application.EnableVisualStyles() And Image on the button Sylvain Barde Microsoft Dot NET 1 1st Dec 2004 07:23 AM
Image Gone when apply Application.enablevisualstyles() A-PK Microsoft Dot NET Framework Forms 2 28th Feb 2004 11:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:51 AM.