473,385 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Application.EnableVisualStyles and no image in Tab control

(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 21 '05 #1
4 1020
"#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 21 '05 #2
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 21 '05 #3
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 21 '05 #4
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 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sylvain Barde | last post by:
When I use Application.EnableVisualStyles() Public Sub New() MyBase.New() Application.EnableVisualStyles() Application.DoEvents()
4
by: #ROBERT | last post by:
(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...
5
by: NormD | last post by:
I have a windows form application distributed via no click deployment. I am thinking about adding xp theme support using an application manifest. I know the manifest is not downloaded to the client...
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
3
by: Michael A. Covington | last post by:
I added Application.EnableVisualStyles() as the first statement in Main() of my program, and didn't notice much change in visual appearance, but what I *did* notice is that some of my buttons...
1
by: Smokey Grindle | last post by:
I am working in .NET 2.0 and am not using the application framework (design choice)... but when I turn on Application.EnableVisualStyles() I randomly have icons disappear in tree views and list...
0
by: sachinrmore | last post by:
Application.EnableVisualStyles apply visual style for all controls. I do not want the visual styles for some controls. How can I set it for single control.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.