473,785 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XP Styles in vb.net 2003?

Is there a way to turn on XP Styles in 2003? Or is the manifest file still
the way to go?
Nov 21 '05 #1
9 2068
Hi,

Appliction.Enab leVisualStyles.

http://msdn.microsoft.com/library/de...tylestopic.asp

Ken
--------------------------------
"Terry Olsen" <to******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Is there a way to turn on XP Styles in 2003? Or is the manifest file still
the way to go?

Nov 21 '05 #2
Hi Terry,

It's pretty simple. Place this in the sub new of the start class of the
app:
MyBase.New()

Application.Ena bleVisualStyles ()

Application.DoE vents()

Then designate all checkboxes, command buttons, radio buttons flatstyle
property to 'system'.

This will allow all pc's running xp to see all of your controls with xp
styles.

HTH,

Bernie Yaeger

"Terry Olsen" <to******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Is there a way to turn on XP Styles in 2003? Or is the manifest file still the way to go?

Nov 21 '05 #3
This works also...but why does the MSDN tell you to put it in Sub Main and
then run Form1 from there?

"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
Hi Terry,

It's pretty simple. Place this in the sub new of the start class of the
app:
MyBase.New()

Application.Ena bleVisualStyles ()

Application.DoE vents()

Then designate all checkboxes, command buttons, radio buttons flatstyle
property to 'system'.

This will allow all pc's running xp to see all of your controls with xp
styles.

HTH,

Bernie Yaeger

"Terry Olsen" <to******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Is there a way to turn on XP Styles in 2003? Or is the manifest file

still
the way to go?


Nov 21 '05 #4
Hi Terry,

I guess they are making an assumption about your start class.

Bernie

"Terry Olsen" <to******@hotma il.com> wrote in message
news:uR******** ******@TK2MSFTN GP12.phx.gbl...
This works also...but why does the MSDN tell you to put it in Sub Main and
then run Form1 from there?

"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
Hi Terry,

It's pretty simple. Place this in the sub new of the start class of the
app:
MyBase.New()

Application.Ena bleVisualStyles ()

Application.DoE vents()

Then designate all checkboxes, command buttons, radio buttons flatstyle
property to 'system'.

This will allow all pc's running xp to see all of your controls with xp
styles.

HTH,

Bernie Yaeger

"Terry Olsen" <to******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Is there a way to turn on XP Styles in 2003? Or is the manifest file

still
the way to go?



Nov 21 '05 #5
* "Terry Olsen" <to******@hotma il.com> scripsit:
Is there a way to turn on XP Styles in 2003? Or is the manifest file still
the way to go?


<URL:http://www.google.de/groups?selm=Oqp ZkGGgEHA.3536%4 0TK2MSFTNGP12.p hx.gbl>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #6
It needs to be in Sub Main() so that images show in toolbars and
tabcontrols.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message
news:uq******** ******@tk2msftn gp13.phx.gbl...
Hi Terry,

I guess they are making an assumption about your start class.

Bernie

"Terry Olsen" <to******@hotma il.com> wrote in message
news:uR******** ******@TK2MSFTN GP12.phx.gbl...
This works also...but why does the MSDN tell you to put it in Sub Main
and
then run Form1 from there?

"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
> Hi Terry,
>
> It's pretty simple. Place this in the sub new of the start class of
> the
> app:
> MyBase.New()
>
> Application.Ena bleVisualStyles ()
>
> Application.DoE vents()
>
> Then designate all checkboxes, command buttons, radio buttons flatstyle
> property to 'system'.
>
> This will allow all pc's running xp to see all of your controls with xp
> styles.
>
> HTH,
>
> Bernie Yaeger
>
> "Terry Olsen" <to******@hotma il.com> wrote in message
> news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
> > Is there a way to turn on XP Styles in 2003? Or is the manifest file
> still
> > the way to go?
> >
> >
>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.737 / Virus Database: 491 - Release Date: 11/08/2004
Nov 21 '05 #7
Bernie,
Rather then inside the sub new, I would strongly recommend putting this in
the Sub Main of your start class as the other suggest.

Public Class MainForm
...

Public Shared Sub Main()
Application.Ena bleVisualStyles ()
Application.DoE vents()
Application.Run (New MainForm)
End Sub

End Class

For four major reasons:
1. Its not hidden in the construtor, which may be modified by the forms
designer.
2. It allows you to easily add any Global Exception Handlers at the same
time.
3. It allows you to customize the Application.Run itself (splash screens,
login dialog & such)
4. Its how most samples show it (consistency).

It has nothing really to do with "they are making an assumption about your
start class" per se. (as MainForm is going to be the start object in both
cases).

Hope this helps
Jay
"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
Hi Terry,

It's pretty simple. Place this in the sub new of the start class of the
app:
MyBase.New()

Application.Ena bleVisualStyles ()

Application.DoE vents()

Then designate all checkboxes, command buttons, radio buttons flatstyle
property to 'system'.

This will allow all pc's running xp to see all of your controls with xp
styles.

HTH,

Bernie Yaeger

"Terry Olsen" <to******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Is there a way to turn on XP Styles in 2003? Or is the manifest file

still
the way to go?


Nov 21 '05 #8
Why is the "DoEvents" needed? It seems to work okay without it...or am I
missing something?
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:OI******** ******@tk2msftn gp13.phx.gbl...
Bernie,
Rather then inside the sub new, I would strongly recommend putting this in
the Sub Main of your start class as the other suggest.

Public Class MainForm
...

Public Shared Sub Main()
Application.Ena bleVisualStyles ()
Application.DoE vents()
Application.Run (New MainForm)
End Sub

End Class

For four major reasons:
1. Its not hidden in the construtor, which may be modified by the forms
designer.
2. It allows you to easily add any Global Exception Handlers at the same
time.
3. It allows you to customize the Application.Run itself (splash screens,
login dialog & such)
4. Its how most samples show it (consistency).

It has nothing really to do with "they are making an assumption about your
start class" per se. (as MainForm is going to be the start object in both
cases).

Hope this helps
Jay
"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
Hi Terry,

It's pretty simple. Place this in the sub new of the start class of the
app:
MyBase.New()

Application.Ena bleVisualStyles ()

Application.DoE vents()

Then designate all checkboxes, command buttons, radio buttons flatstyle
property to 'system'.

This will allow all pc's running xp to see all of your controls with xp
styles.

HTH,

Bernie Yaeger

"Terry Olsen" <to******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Is there a way to turn on XP Styles in 2003? Or is the manifest file

still
the way to go?



Nov 21 '05 #9
Terry,
Selected controls (toolbars for example) do not always display correctly if
you call EnableVisualSty les without the DoEvents (yes a bug).

Hope this helps
Jay

"Terry Olsen" <to******@hotma il.com> wrote in message
news:uN******** *****@TK2MSFTNG P12.phx.gbl...
Why is the "DoEvents" needed? It seems to work okay without it...or am I
missing something?
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:OI******** ******@tk2msftn gp13.phx.gbl...
Bernie,
Rather then inside the sub new, I would strongly recommend putting this in the Sub Main of your start class as the other suggest.

Public Class MainForm
...

Public Shared Sub Main()
Application.Ena bleVisualStyles ()
Application.DoE vents()
Application.Run (New MainForm)
End Sub

End Class

For four major reasons:
1. Its not hidden in the construtor, which may be modified by the forms
designer.
2. It allows you to easily add any Global Exception Handlers at the same
time.
3. It allows you to customize the Application.Run itself (splash screens, login dialog & such)
4. Its how most samples show it (consistency).

It has nothing really to do with "they are making an assumption about your start class" per se. (as MainForm is going to be the start object in both cases).

Hope this helps
Jay
"Bernie Yaeger" <be*****@cherwe llinc.com> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
Hi Terry,

It's pretty simple. Place this in the sub new of the start class of the app:
MyBase.New()

Application.Ena bleVisualStyles ()

Application.DoE vents()

Then designate all checkboxes, command buttons, radio buttons flatstyle property to 'system'.

This will allow all pc's running xp to see all of your controls with xp styles.

HTH,

Bernie Yaeger

"Terry Olsen" <to******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
> Is there a way to turn on XP Styles in 2003? Or is the manifest file still
> the way to go?
>
>



Nov 21 '05 #10

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

Similar topics

0
1989
by: Quinton | last post by:
I'm running a website that uses CSS to format the text and a CGI program Coranto that icludes news updates via SSI. My problem is that some parts of the CSS don't seem to take effect on the included news. All four link styles are used, and all four work in the included text files. The text styles, on the other hand, seem not to work at all. The text that's part of the actual HTML file is formated according to the CSS codes. However, the...
6
6867
by: Harag | last post by:
Hi All If I had the following 3 style in a CSS file <style> .bordered {border: red thin soldid;} .warning {background-color: #900;} .box {padding: 5%; text-align:justify;} </style>
18
1774
by: Chris Mantoulidis | last post by:
There is a LARGE number of syntax styles in most (if not all) programming languages. For example, one syntax style (my current one): .... int main() { for (int i = 0; i < 50; i++) {
12
2577
by: dan.vendel | last post by:
Hi, I know nothing about javascript, but quite a lot about regulat html and CSS. Have bumped into a problem that people in this fine congregation perhaps can help me with. I'm making a webshop. When user eventually ends up at the credit card processor's secure pages, the styles are quite different from the actual site's. I have managed to change some basics through a control
6
1468
by: ht990332 | last post by:
I'm writing applications in vc++ .net 2003. How do I give the applications visual styles on winxp without adding a ..manifest file?
2
1560
by: Guenther Schabus | last post by:
e.Item.CssClass = "SelectedTab";Hello all, I am using .NET 1.1, VS 2003 - Syntax is C# I am trying to change ('enhanced') attributes set by an css-file dynamically. Content of an CSS-File: ..WhatEver { ...
4
3204
by: Mika M | last post by:
Hello! I'm using VB.NET 2003 and Windows Forms application type. Question: Why ComboBoxes are not changing their arrearance to XP-Styles look althought other UI Components does when I use the following code in my Sub Main ... System.Windows.Forms.Application.EnableVisualStyles() System.Windows.Forms.Application.DoEvents()
2
1016
by: Bill English | last post by:
Does anyone know how to do Office 2003 UI Styles, such as toolbar, status bar, etc...
2
2830
by: SiJP | last post by:
There is a lot of information out there that shows you how to use a manifest file with your .net application (exe) to enable windows xp styles. I am building a dll for COM interop, which contains a windows form. How can I enable windows xp styles to this form? (appname.dll.manifest doesn't work)
0
9481
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9953
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8978
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4054
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 we have to send another system

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.