By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,361 Members | 3,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,361 IT Pros & Developers. It's quick & easy.

Application.EnableVisualStyles and no image in Tab control

P: n/a
(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.

Nov 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"#ROBERT" <ro****@mailfsf.com> 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/>

Nov 22 '05 #2

P: n/a
No way... it is just the same.
---------------
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ev**************@TK2MSFTNGP10.phx.gbl...
"#ROBERT" <ro****@mailfsf.com> 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/>

Nov 22 '05 #3

P: n/a
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.


Nov 22 '05 #4

P: n/a
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" <ro****@mailfsf.com> wrote in message
news:OF**************@TK2MSFTNGP14.phx.gbl...
No way... it is just the same.
---------------
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ev**************@TK2MSFTNGP10.phx.gbl...
"#ROBERT" <ro****@mailfsf.com> 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/>


Nov 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.