473,468 Members | 1,525 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Application.EnableVisualStyles() and Splah Screen

Hi.

I made a simple VB.Net 2003 application in which i have one Module with the
Sub Main and two forms with un button in each one.
I run the application on Windows XP Professional.

This is the code in Module1:

Module Module1
Sub Main()
Application.EnableVisualStyles()
Dim frm1 As New Form1
frm1.ShowDialog()
Application.Run(New Form2)
End Sub
End Module

The first problem is that the button on Form1 isn't XP Style, even if the
FlatStyle property is System.
When i press the button on Form1 the form is closed and Form2 appears, but
also in this form the button is not XP style.

But, if i don't show Form1, removing frm1.ShowDialog, the button on Form2 is
ok with XP Style.

In my real application Form1 will be a Spash Screen and before opening Form2
there will be some code.

What's wrong?

Thanks.

Grazie.
Ciao
--
Skysurfer
--
Skysurfer
Nov 21 '05 #1
4 3145
Module Module1
Sub Main()
Application.EnableVisualStyles()
Application.DoEvents() '<-----------
Dim frm1 As New Form1
frm1.ShowDialog()
Application.Run(New Form2)
End Sub
End Module
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
Nov 21 '05 #2
"Skysurfer" <sk*********@libero.it> schrieb:
I made a simple VB.Net 2003 application in which i have one Module with
the
Sub Main and two forms with un button in each one.
I run the application on Windows XP Professional.

This is the code in Module1:

Module Module1
Sub Main()
Application.EnableVisualStyles()
\\\
Application.DoEvents()
///
Dim frm1 As New Form1
frm1.ShowDialog()
\\\
frm1.Dispose()
///
Application.Run(New Form2)
End Sub
End Module

The first problem is that the button on Form1 isn't XP Style, even if the
FlatStyle property is System.


'Application.EnableVisualStyles' Bug
<URL:http://www.codeproject.com/buglist/EnableVisualStylesBug.asp>

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

Nov 21 '05 #3
"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> ha
scritto nel messaggio news:%2****************@TK2MSFTNGP10.phx.gbl...
Module Module1
Sub Main()
Application.EnableVisualStyles()
Application.DoEvents() '<-----------
Dim frm1 As New Form1
frm1.ShowDialog()
Application.Run(New Form2)
End Sub
End Module
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html

Thank you very much, Mick!!!

--
Skysurfer
Nov 21 '05 #4
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> ha scritto nel
messaggio news:%2****************@tk2msftngp13.phx.gbl...
"Skysurfer" <sk*********@libero.it> schrieb:
I made a simple VB.Net 2003 application in which i have one Module with
the
Sub Main and two forms with un button in each one.
I run the application on Windows XP Professional.

This is the code in Module1:

Module Module1
Sub Main()
Application.EnableVisualStyles()


\\\
Application.DoEvents()
///
Dim frm1 As New Form1
frm1.ShowDialog()


\\\
frm1.Dispose()
///
Application.Run(New Form2)
End Sub
End Module

The first problem is that the button on Form1 isn't XP Style, even if the FlatStyle property is System.


'Application.EnableVisualStyles' Bug
<URL:http://www.codeproject.com/buglist/EnableVisualStylesBug.asp>

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


Thank you very much, Herfried!!!
--
Skysurfer

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...
0
by: | last post by:
Hi there movers & shakers, The example below demonstrates a behaviour that is anoying the tits off of me! It doesn't happen whilst debugging from the IDE only when you run the compiled exe from...
1
by: GB | last post by:
Hi, Under VB.NET in VS2005 : In my Main star routine, I start by : MyForms.Splah.show() to display the Splah form while initializing the app. The Splah show is activeted , but it remains in...
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...
9
by: Brett Wesoloski | last post by:
I am new to VS2005. I changed my program.cs file to be a different form I am working on. But when I go to run the application it still brings up the form that was originally declared as new. ...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.