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

Problem working with system color

P: n/a
Hi,

I want to use the user color scheme to set the color of my forms.

I now I have to use the. System.Drawing.SystemColors, but which color is the
color of a form background as used in other applications.

In the end all I want to do is

form1.backcolor = system.whatever.color

Is this possible, and how?
Nov 20 '05 #1
Share this Question
Share on Google+
36 Replies


P: n/a
* "AussieRules" <so*****@nowhere.com> scripsit:
I want to use the user color scheme to set the color of my forms.

I now I have to use the. System.Drawing.SystemColors, but which color is the
color of a form background as used in other applications.

In the end all I want to do is

form1.backcolor = system.whatever.color


'SystemColors.Control'.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
"AussieRules" <so*****@nowhere.com> schrieb

I am trying to use the color scheme as set by the user(olive green,
silver, default).

When use the systemcolors.window I get the form color to be white,
not the color that apps like office03 uses which is linked to the
themes

Hope that makes sense..


Oh, I see. You want to apply the "visual styles". In Framework 1.1 you can
call System.Windows.Forms.Application.EnableVisualStyle s. In Framework 1.0
you have to add some lines to the application.config file. Search this group
for "visual styles" and you'll find some hints.
--
Armin

Nov 20 '05 #3

P: n/a
On Tue, 21 Oct 2003 23:00:58 +0100, "AussieRules"
<so*****@nowhere.com> wrote:
Hi,

I want to use the user color scheme to set the color of my forms.

I now I have to use the. System.Drawing.SystemColors, but which color is the
color of a form background as used in other applications.

In the end all I want to do is

form1.backcolor = system.whatever.color

Is this possible, and how?


System.Drawing.SystemColors.Control is normal Form background.
System.Drawing.SystemColors.Window is the white bit inside a text box.
Nov 20 '05 #4

P: n/a
???
Unless you've changed it, it's already that colour.

"AussieRules" <so*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I want to use the user color scheme to set the color of my forms.

I now I have to use the. System.Drawing.SystemColors, but which color is the color of a form background as used in other applications.

In the end all I want to do is

form1.backcolor = system.whatever.color

Is this possible, and how?

Nov 20 '05 #5

P: n/a
The standard vb.net form color, is not the same as the form color of a theme
aware application.

The problem here is how to easily get the users XP theme color, and apply it
to forms and controls.

Thats how I see it
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:#I**************@tk2msftngp13.phx.gbl...
???
Unless you've changed it, it's already that colour.

"AussieRules" <so*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I want to use the user color scheme to set the color of my forms.

I now I have to use the. System.Drawing.SystemColors, but which color is

the
color of a form background as used in other applications.

In the end all I want to do is

form1.backcolor = system.whatever.color

Is this possible, and how?


Nov 20 '05 #6

P: n/a
If I add a new form to any VB.Net project, it's default backcolor is
SystemColors.Control, which is the same as the form color for any Visual
Styles aware application. What's more, if left at default value, the color
changes when you change the XP Styles Color scheme. What color are you
looking for?
I am using VS.NET 2003. Is the default form backcolor for VS.NET 2002 not
'SystemColors.Control'?

"news.microsoft.com" <au****@aussie.com> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
The standard vb.net form color, is not the same as the form color of a theme aware application.

The problem here is how to easily get the users XP theme color, and apply it to forms and controls.

Thats how I see it
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:#I**************@tk2msftngp13.phx.gbl...
???
Unless you've changed it, it's already that colour.

"AussieRules" <so*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I want to use the user color scheme to set the color of my forms.

I now I have to use the. System.Drawing.SystemColors, but which color
is the
color of a form background as used in other applications.

In the end all I want to do is

form1.backcolor = system.whatever.color

Is this possible, and how?



Nov 20 '05 #7

P: n/a
Hi,

My from backcolor is set to systemcolors.control, and the form is the
standard grey color, not the XP theme color of blue.

I am using 03 as well. Perhaps there is some other setting/code you have to
do this ?

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ep*************@tk2msftngp13.phx.gbl...
If I add a new form to any VB.Net project, it's default backcolor is
SystemColors.Control, which is the same as the form color for any Visual
Styles aware application. What's more, if left at default value, the color
changes when you change the XP Styles Color scheme. What color are you
looking for?
I am using VS.NET 2003. Is the default form backcolor for VS.NET 2002 not
'SystemColors.Control'?

"news.microsoft.com" <au****@aussie.com> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
The standard vb.net form color, is not the same as the form color of a theme
aware application.

The problem here is how to easily get the users XP theme color, and apply it
to forms and controls.

Thats how I see it
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:#I**************@tk2msftngp13.phx.gbl...
???
Unless you've changed it, it's already that colour.

"AussieRules" <so*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I want to use the user color scheme to set the color of my forms.
>
> I now I have to use the. System.Drawing.SystemColors, but which
color is the
> color of a form background as used in other applications.
>
> In the end all I want to do is
>
> form1.backcolor = system.whatever.color
>
> Is this possible, and how?
>
>



Nov 20 '05 #8

P: n/a
That Grey color is the standard form backcolor. Have a look at your
Appearance Tab under the Display Properties. The Sample Message Box has a
grey background not blue, therefore, the color you are looking for is not
standard. So what Blue color is it that you're looking for?

"AussieRules" <so*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

My from backcolor is set to systemcolors.control, and the form is the
standard grey color, not the XP theme color of blue.

I am using 03 as well. Perhaps there is some other setting/code you have to do this ?

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ep*************@tk2msftngp13.phx.gbl...
If I add a new form to any VB.Net project, it's default backcolor is
SystemColors.Control, which is the same as the form color for any Visual
Styles aware application. What's more, if left at default value, the color changes when you change the XP Styles Color scheme. What color are you
looking for?
I am using VS.NET 2003. Is the default form backcolor for VS.NET 2002 not 'SystemColors.Control'?

"news.microsoft.com" <au****@aussie.com> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
The standard vb.net form color, is not the same as the form color of a

theme
aware application.

The problem here is how to easily get the users XP theme color, and

apply
it
to forms and controls.

Thats how I see it
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:#I**************@tk2msftngp13.phx.gbl...
> ???
> Unless you've changed it, it's already that colour.
>
> "AussieRules" <so*****@nowhere.com> wrote in message
> news:%2****************@TK2MSFTNGP11.phx.gbl...
> > Hi,
> >
> > I want to use the user color scheme to set the color of my forms.
> >
> > I now I have to use the. System.Drawing.SystemColors, but which

color
is
> the
> > color of a form background as used in other applications.
> >
> > In the end all I want to do is
> >
> > form1.backcolor = system.whatever.color
> >
> > Is this possible, and how?
> >
> >
>
>



Nov 20 '05 #9

P: n/a
If you take a look at many of the compents that are 'theme aware' or take a
look at Microsoft Office 2003, you will see that a theme aware application
have colors that are based on some other setting, outside of the display
properties apperance tab.

A good example of this is from http://www.devcomponents.com/dotnetbar/. If
you look at the job image that changes you will see two versions of the same
window(ignore the money look alike) of the dotnetbar notepad. One being
based on the display property settings, which looks like a normal Win2000k
application with its grey background, and the other which is 'theme aware'
XP with a blue background.

Under XP display setting there is a color scheme option. There are three
options out of the box, default(blue), olive green, and silver.

The color of forms is set to be one of these colors, rather than the
standard grey.

With office2003, and other MS products being XP theme aware, it would seem
that microsoft have added a nice UI feature, but made it very hard for
developers to include this in there products.

Ignore the MS Money
Ther eis
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ux**************@tk2msftngp13.phx.gbl...
That Grey color is the standard form backcolor. Have a look at your
Appearance Tab under the Display Properties. The Sample Message Box has a
grey background not blue, therefore, the color you are looking for is not
standard. So what Blue color is it that you're looking for?

"AussieRules" <so*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

My from backcolor is set to systemcolors.control, and the form is the
standard grey color, not the XP theme color of blue.

I am using 03 as well. Perhaps there is some other setting/code you have

to
do this ?

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ep*************@tk2msftngp13.phx.gbl...
If I add a new form to any VB.Net project, it's default backcolor is
SystemColors.Control, which is the same as the form color for any Visual Styles aware application. What's more, if left at default value, the color changes when you change the XP Styles Color scheme. What color are you
looking for?
I am using VS.NET 2003. Is the default form backcolor for VS.NET 2002 not 'SystemColors.Control'?

"news.microsoft.com" <au****@aussie.com> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
> The standard vb.net form color, is not the same as the form color of a theme
> aware application.
>
> The problem here is how to easily get the users XP theme color, and

apply
it
> to forms and controls.
>
> Thats how I see it
>
>
> "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> news:#I**************@tk2msftngp13.phx.gbl...
> > ???
> > Unless you've changed it, it's already that colour.
> >
> > "AussieRules" <so*****@nowhere.com> wrote in message
> > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > Hi,
> > >
> > > I want to use the user color scheme to set the color of my forms. > > >
> > > I now I have to use the. System.Drawing.SystemColors, but which

color
is
> > the
> > > color of a form background as used in other applications.
> > >
> > > In the end all I want to do is
> > >
> > > form1.backcolor = system.whatever.color
> > >
> > > Is this possible, and how?
> > >
> > >
> >
> >
>
>



Nov 20 '05 #10

P: n/a
"news.microsoft.com" <au****@aussie.com> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
If you take a look at many of the compents that are 'theme aware' or take a look at Microsoft Office 2003, you will see that a theme aware application
have colors that are based on some other setting, outside of the display
properties apperance tab.

Office colors, just like Office Components, are not standard.
Office does it's own manipulation of colors based upon the current
System.Colors.
You can look for the WM_THEMECHANGED message to update the colors in your
app, but it is up to you to decide on what those colors are if you choose
not use the Windows Default.

A good example of this is from http://www.devcomponents.com/dotnetbar/. If
you look at the job image that changes you will see two versions of the same window(ignore the money look alike) of the dotnetbar notepad. One being
based on the display property settings, which looks like a normal Win2000k
application with its grey background, and the other which is 'theme aware'
XP with a blue background.

They all look like XP Themed windows to me. The first Notepad Sample window
shows the DotNetBar components with a custom appearance and the second shows
these components with the Standard XP Style.

Under XP display setting there is a color scheme option. There are three
options out of the box, default(blue), olive green, and silver.

The color of forms is set to be one of these colors, rather than the
standard grey.

Have a look at the Advanced options from the Appearance Tab. The color of
forms is set by 3DObjects, which in VB.Net is SystemColors.Control.

With office2003, and other MS products being XP theme aware, it would seem
that microsoft have added a nice UI feature, but made it very hard for
developers to include this in there products.

Ignore the MS Money
Ther eis
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ux**************@tk2msftngp13.phx.gbl...
That Grey color is the standard form backcolor. Have a look at your
Appearance Tab under the Display Properties. The Sample Message Box has a
grey background not blue, therefore, the color you are looking for is not standard. So what Blue color is it that you're looking for?

"AussieRules" <so*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

My from backcolor is set to systemcolors.control, and the form is the
standard grey color, not the XP theme color of blue.

I am using 03 as well. Perhaps there is some other setting/code you have
to
do this ?

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ep*************@tk2msftngp13.phx.gbl...
> If I add a new form to any VB.Net project, it's default backcolor is
> SystemColors.Control, which is the same as the form color for any Visual > Styles aware application. What's more, if left at default value, the color
> changes when you change the XP Styles Color scheme. What color are
you > looking for?
> I am using VS.NET 2003. Is the default form backcolor for VS.NET 2002 not
> 'SystemColors.Control'?
>
> "news.microsoft.com" <au****@aussie.com> wrote in message
> news:uW**************@TK2MSFTNGP09.phx.gbl...
> > The standard vb.net form color, is not the same as the form color

of a > theme
> > aware application.
> >
> > The problem here is how to easily get the users XP theme color,
and apply
> it
> > to forms and controls.
> >
> > Thats how I see it
> >
> >
> > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> > news:#I**************@tk2msftngp13.phx.gbl...
> > > ???
> > > Unless you've changed it, it's already that colour.
> > >
> > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > > Hi,
> > > >
> > > > I want to use the user color scheme to set the color of my

forms. > > > >
> > > > I now I have to use the. System.Drawing.SystemColors, but which color
> is
> > > the
> > > > color of a form background as used in other applications.
> > > >
> > > > In the end all I want to do is
> > > >
> > > > form1.backcolor = system.whatever.color
> > > >
> > > > Is this possible, and how?
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #11

P: n/a
Ok, so I think perhaps the orginal ? might need to be reword.

How do you set the standard windows form system.color to be the same color
as those applications that use a customer color, such as office03, (ie the
Olive Green, Blue, or silver.. XP Color Style)

So far from what I have been able to see, lots of people have ideas, but no
body has provided a confirmed, working concept or code sample on how to do
this.

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl...
"news.microsoft.com" <au****@aussie.com> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
If you take a look at many of the compents that are 'theme aware' or take
a
look at Microsoft Office 2003, you will see that a theme aware application have colors that are based on some other setting, outside of the display
properties apperance tab.

Office colors, just like Office Components, are not standard.
Office does it's own manipulation of colors based upon the current
System.Colors.
You can look for the WM_THEMECHANGED message to update the colors in your
app, but it is up to you to decide on what those colors are if you choose
not use the Windows Default.

A good example of this is from http://www.devcomponents.com/dotnetbar/. If you look at the job image that changes you will see two versions of the

same
window(ignore the money look alike) of the dotnetbar notepad. One being
based on the display property settings, which looks like a normal Win2000k application with its grey background, and the other which is 'theme aware' XP with a blue background.


They all look like XP Themed windows to me. The first Notepad Sample

window shows the DotNetBar components with a custom appearance and the second shows these components with the Standard XP Style.

Under XP display setting there is a color scheme option. There are three
options out of the box, default(blue), olive green, and silver.

The color of forms is set to be one of these colors, rather than the
standard grey.

Have a look at the Advanced options from the Appearance Tab. The color of
forms is set by 3DObjects, which in VB.Net is SystemColors.Control.

With office2003, and other MS products being XP theme aware, it would seem that microsoft have added a nice UI feature, but made it very hard for
developers to include this in there products.

Ignore the MS Money
Ther eis
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ux**************@tk2msftngp13.phx.gbl...
That Grey color is the standard form backcolor. Have a look at your
Appearance Tab under the Display Properties. The Sample Message Box has a grey background not blue, therefore, the color you are looking for is not standard. So what Blue color is it that you're looking for?

"AussieRules" <so*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> My from backcolor is set to systemcolors.control, and the form is
the > standard grey color, not the XP theme color of blue.
>
> I am using 03 as well. Perhaps there is some other setting/code you
have to
> do this ?
>
>
>
> "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> news:ep*************@tk2msftngp13.phx.gbl...
> > If I add a new form to any VB.Net project, it's default backcolor is > > SystemColors.Control, which is the same as the form color for any

Visual
> > Styles aware application. What's more, if left at default value, the color
> > changes when you change the XP Styles Color scheme. What color are you > > looking for?
> > I am using VS.NET 2003. Is the default form backcolor for VS.NET 2002 not
> > 'SystemColors.Control'?
> >
> > "news.microsoft.com" <au****@aussie.com> wrote in message
> > news:uW**************@TK2MSFTNGP09.phx.gbl...
> > > The standard vb.net form color, is not the same as the form
color of
a
> > theme
> > > aware application.
> > >
> > > The problem here is how to easily get the users XP theme color,

and > apply
> > it
> > > to forms and controls.
> > >
> > > Thats how I see it
> > >
> > >
> > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> > > news:#I**************@tk2msftngp13.phx.gbl...
> > > > ???
> > > > Unless you've changed it, it's already that colour.
> > > >
> > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > > > Hi,
> > > > >
> > > > > I want to use the user color scheme to set the color of my

forms.
> > > > >
> > > > > I now I have to use the. System.Drawing.SystemColors, but which > color
> > is
> > > > the
> > > > > color of a form background as used in other applications.
> > > > >
> > > > > In the end all I want to do is
> > > > >
> > > > > form1.backcolor = system.whatever.color
> > > > >
> > > > > Is this possible, and how?
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #12

P: n/a
OK. You won't do this through the Framework, you will have to use some
uxtheme functions. You will also need to monitor for the theme changes.

The following code will do what you want. The Color I chose was Color1 of
the two color gradient of the TasksPanel in Explorer:

**** Code starts **********************************************

#Region " XP Theme API "

'The uxtheme.dll function IsAppThemed() returns True
'if only the TitleBar has Visual Styles applied. A
'better way to check for Visual Styles is to check
'whether Comctl32.dll version 6 is in use.
Private Structure DLLVERSIONINFO
Dim cbSize As Integer
Dim dwMajorVersion As Integer
Dim dwMinorVersion As Integer
Dim dwBuildNumber As Integer
Dim dwPlatformID As Integer
End Structure

<DllImport("Comctl32.dll", _
entrypoint:="DllGetVersion", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Overloads Shared Function IsAppThemed( _
ByRef pdvi As DLLVERSIONINFO) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl, _
CharSet:=CharSet.Unicode)> _
Private Shared Function OpenThemeData( _
ByVal hwnd As IntPtr, _
ByVal pszClassList As String) As IntPtr
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function CloseThemeData( _
ByVal hTheme As IntPtr) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function GetThemeColor( _
ByVal hTheme As IntPtr, _
ByVal iPartID As Integer, _
ByVal iStateId As Integer, _
ByVal iPropId As Integer, _
ByRef pColor As rgbColor) As Integer
End Function

Private Const EBP_HEADERBACKGROUND As Integer = 1

Private Const TMT_GRADIENTCOLOR1 As Integer = 3810
Private Const TMT_GRADIENTCOLOR2 As Integer = 3811
Private Const TMT_GRADIENTCOLOR3 As Integer = 3812
Private Const TMT_GRADIENTCOLOR4 As Integer = 3813
Private Const TMT_GRADIENTCOLOR5 As Integer = 3814

Private S_OK As Integer = 0

Private Const WM_THEMECHANGED As Integer = &H31A

Private Structure rgbColor
Dim r As Byte
Dim g As Byte
Dim b As Byte
End Structure

#End Region

Private Function SetFormColor() As Boolean

Dim ReturnValue As Boolean = False

'----Check we are using Visual Styles
Dim dvi As New DLLVERSIONINFO
dvi.cbSize = Marshal.SizeOf(dvi)
IsAppThemed(dvi)
If dvi.dwMajorVersion < 6 Then Return False
'----------------------------------

Dim hTheme As IntPtr = OpenThemeData(Me.Handle, _
"EXPLORERBAR")

If Not hTheme.Equals(IntPtr.Zero) Then
Dim c As New rgbColor
If GetThemeColor(hTheme, EBP_HEADERBACKGROUND, 0, _
TMT_GRADIENTCOLOR1, _
c) = S_OK Then
Me.BackColor = Color.FromArgb(255, c.r, c.g, c.b)
ReturnValue = True
End If
End If

CloseThemeData(hTheme)

Return ReturnValue

End Function

Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load

SetFormColor()

End Sub

Protected Overrides Sub WndProc( _
ByRef m As System.Windows.Forms.Message)

MyBase.WndProc(m)
If m.Msg = WM_THEMECHANGED Then SetFormColor()

End Sub

**** Code ends ***********************************************

HTH

Mick

"news.microsoft.com" <au****@aussie.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Ok, so I think perhaps the orginal ? might need to be reword.

How do you set the standard windows form system.color to be the same color
as those applications that use a customer color, such as office03, (ie the
Olive Green, Blue, or silver.. XP Color Style)

So far from what I have been able to see, lots of people have ideas, but no body has provided a confirmed, working concept or code sample on how to do
this.

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl...
"news.microsoft.com" <au****@aussie.com> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
If you take a look at many of the compents that are 'theme aware' or take
a
look at Microsoft Office 2003, you will see that a theme aware application have colors that are based on some other setting, outside of the display properties apperance tab.

Office colors, just like Office Components, are not standard.
Office does it's own manipulation of colors based upon the current
System.Colors.
You can look for the WM_THEMECHANGED message to update the colors in your app, but it is up to you to decide on what those colors are if you choose not use the Windows Default.

A good example of this is from http://www.devcomponents.com/dotnetbar/. If you look at the job image that changes you will see two versions of
the
same
window(ignore the money look alike) of the dotnetbar notepad. One
being based on the display property settings, which looks like a normal
Win2000k application with its grey background, and the other which is 'theme aware' XP with a blue background.


They all look like XP Themed windows to me. The first Notepad Sample

window
shows the DotNetBar components with a custom appearance and the second

shows
these components with the Standard XP Style.

Under XP display setting there is a color scheme option. There are three options out of the box, default(blue), olive green, and silver.

The color of forms is set to be one of these colors, rather than the
standard grey.


Have a look at the Advanced options from the Appearance Tab. The color of forms is set by 3DObjects, which in VB.Net is SystemColors.Control.

With office2003, and other MS products being XP theme aware, it would seem that microsoft have added a nice UI feature, but made it very hard for
developers to include this in there products.

Ignore the MS Money
Ther eis
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ux**************@tk2msftngp13.phx.gbl...
> That Grey color is the standard form backcolor. Have a look at your
> Appearance Tab under the Display Properties. The Sample Message Box has
a
> grey background not blue, therefore, the color you are looking for is not
> standard. So what Blue color is it that you're looking for?
>
> "AussieRules" <so*****@nowhere.com> wrote in message
> news:%2****************@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > My from backcolor is set to systemcolors.control, and the form is the > > standard grey color, not the XP theme color of blue.
> >
> > I am using 03 as well. Perhaps there is some other setting/code
you have
> to
> > do this ?
> >
> >
> >
> > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> > news:ep*************@tk2msftngp13.phx.gbl...
> > > If I add a new form to any VB.Net project, it's default
backcolor is > > > SystemColors.Control, which is the same as the form color for
any Visual
> > > Styles aware application. What's more, if left at default value,

the > color
> > > changes when you change the XP Styles Color scheme. What color are you
> > > looking for?
> > > I am using VS.NET 2003. Is the default form backcolor for VS.NET

2002
> not
> > > 'SystemColors.Control'?
> > >
> > > "news.microsoft.com" <au****@aussie.com> wrote in message
> > > news:uW**************@TK2MSFTNGP09.phx.gbl...
> > > > The standard vb.net form color, is not the same as the form color
of
a
> > > theme
> > > > aware application.
> > > >
> > > > The problem here is how to easily get the users XP theme

color, and
> > apply
> > > it
> > > > to forms and controls.
> > > >
> > > > Thats how I see it
> > > >
> > > >
> > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in

message > > > > news:#I**************@tk2msftngp13.phx.gbl...
> > > > > ???
> > > > > Unless you've changed it, it's already that colour.
> > > > >
> > > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > > > > Hi,
> > > > > >
> > > > > > I want to use the user color scheme to set the color of my
forms.
> > > > > >
> > > > > > I now I have to use the. System.Drawing.SystemColors, but

which
> > color
> > > is
> > > > > the
> > > > > > color of a form background as used in other applications.
> > > > > >
> > > > > > In the end all I want to do is
> > > > > >
> > > > > > form1.backcolor = system.whatever.color
> > > > > >
> > > > > > Is this possible, and how?
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #13

P: n/a
If that doesn't work for you another possibility is that you may be color
blind.
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:uo*************@TK2MSFTNGP09.phx.gbl...
OK. You won't do this through the Framework, you will have to use some
uxtheme functions. You will also need to monitor for the theme changes.

The following code will do what you want. The Color I chose was Color1 of
the two color gradient of the TasksPanel in Explorer:

**** Code starts **********************************************

#Region " XP Theme API "

'The uxtheme.dll function IsAppThemed() returns True
'if only the TitleBar has Visual Styles applied. A
'better way to check for Visual Styles is to check
'whether Comctl32.dll version 6 is in use.
Private Structure DLLVERSIONINFO
Dim cbSize As Integer
Dim dwMajorVersion As Integer
Dim dwMinorVersion As Integer
Dim dwBuildNumber As Integer
Dim dwPlatformID As Integer
End Structure

<DllImport("Comctl32.dll", _
entrypoint:="DllGetVersion", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Overloads Shared Function IsAppThemed( _
ByRef pdvi As DLLVERSIONINFO) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl, _
CharSet:=CharSet.Unicode)> _
Private Shared Function OpenThemeData( _
ByVal hwnd As IntPtr, _
ByVal pszClassList As String) As IntPtr
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function CloseThemeData( _
ByVal hTheme As IntPtr) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function GetThemeColor( _
ByVal hTheme As IntPtr, _
ByVal iPartID As Integer, _
ByVal iStateId As Integer, _
ByVal iPropId As Integer, _
ByRef pColor As rgbColor) As Integer
End Function

Private Const EBP_HEADERBACKGROUND As Integer = 1

Private Const TMT_GRADIENTCOLOR1 As Integer = 3810
Private Const TMT_GRADIENTCOLOR2 As Integer = 3811
Private Const TMT_GRADIENTCOLOR3 As Integer = 3812
Private Const TMT_GRADIENTCOLOR4 As Integer = 3813
Private Const TMT_GRADIENTCOLOR5 As Integer = 3814

Private S_OK As Integer = 0

Private Const WM_THEMECHANGED As Integer = &H31A

Private Structure rgbColor
Dim r As Byte
Dim g As Byte
Dim b As Byte
End Structure

#End Region

Private Function SetFormColor() As Boolean

Dim ReturnValue As Boolean = False

'----Check we are using Visual Styles
Dim dvi As New DLLVERSIONINFO
dvi.cbSize = Marshal.SizeOf(dvi)
IsAppThemed(dvi)
If dvi.dwMajorVersion < 6 Then Return False
'----------------------------------

Dim hTheme As IntPtr = OpenThemeData(Me.Handle, _
"EXPLORERBAR")

If Not hTheme.Equals(IntPtr.Zero) Then
Dim c As New rgbColor
If GetThemeColor(hTheme, EBP_HEADERBACKGROUND, 0, _
TMT_GRADIENTCOLOR1, _
c) = S_OK Then
Me.BackColor = Color.FromArgb(255, c.r, c.g, c.b)
ReturnValue = True
End If
End If

CloseThemeData(hTheme)

Return ReturnValue

End Function

Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load

SetFormColor()

End Sub

Protected Overrides Sub WndProc( _
ByRef m As System.Windows.Forms.Message)

MyBase.WndProc(m)
If m.Msg = WM_THEMECHANGED Then SetFormColor()

End Sub

**** Code ends ***********************************************

HTH

Mick

"news.microsoft.com" <au****@aussie.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Ok, so I think perhaps the orginal ? might need to be reword.

How do you set the standard windows form system.color to be the same color
as those applications that use a customer color, such as office03, (ie the Olive Green, Blue, or silver.. XP Color Style)

So far from what I have been able to see, lots of people have ideas, but

no
body has provided a confirmed, working concept or code sample on how to do this.

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl...
"news.microsoft.com" <au****@aussie.com> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
> If you take a look at many of the compents that are 'theme aware' or

take
a
> look at Microsoft Office 2003, you will see that a theme aware

application
> have colors that are based on some other setting, outside of the display > properties apperance tab.
>

Office colors, just like Office Components, are not standard.
Office does it's own manipulation of colors based upon the current
System.Colors.
You can look for the WM_THEMECHANGED message to update the colors in your app, but it is up to you to decide on what those colors are if you choose not use the Windows Default.

>
> A good example of this is from http://www.devcomponents.com/dotnetbar/.
If
> you look at the job image that changes you will see two versions of

the same
> window(ignore the money look alike) of the dotnetbar notepad. One being > based on the display property settings, which looks like a normal

Win2000k
> application with its grey background, and the other which is 'theme

aware'
> XP with a blue background.
>

They all look like XP Themed windows to me. The first Notepad Sample

window
shows the DotNetBar components with a custom appearance and the second

shows
these components with the Standard XP Style.

>
> Under XP display setting there is a color scheme option. There are three > options out of the box, default(blue), olive green, and silver.
>
> The color of forms is set to be one of these colors, rather than the
> standard grey.
>

Have a look at the Advanced options from the Appearance Tab. The color of forms is set by 3DObjects, which in VB.Net is SystemColors.Control.

>
> With office2003, and other MS products being XP theme aware, it would seem
> that microsoft have added a nice UI feature, but made it very hard
for > developers to include this in there products.
>
>
>
> Ignore the MS Money
>
>
> Ther eis
> "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> news:ux**************@tk2msftngp13.phx.gbl...
> > That Grey color is the standard form backcolor. Have a look at your > > Appearance Tab under the Display Properties. The Sample Message Box
has
a
> > grey background not blue, therefore, the color you are looking for is not
> > standard. So what Blue color is it that you're looking for?
> >
> > "AussieRules" <so*****@nowhere.com> wrote in message
> > news:%2****************@TK2MSFTNGP10.phx.gbl...
> > > Hi,
> > >
> > > My from backcolor is set to systemcolors.control, and the form
is the
> > > standard grey color, not the XP theme color of blue.
> > >
> > > I am using 03 as well. Perhaps there is some other setting/code you have
> > to
> > > do this ?
> > >
> > >
> > >
> > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> > > news:ep*************@tk2msftngp13.phx.gbl...
> > > > If I add a new form to any VB.Net project, it's default backcolor
is
> > > > SystemColors.Control, which is the same as the form color for

any > Visual
> > > > Styles aware application. What's more, if left at default
value, the
> > color
> > > > changes when you change the XP Styles Color scheme. What color

are you
> > > > looking for?
> > > > I am using VS.NET 2003. Is the default form backcolor for
VS.NET 2002
> > not
> > > > 'SystemColors.Control'?
> > > >
> > > > "news.microsoft.com" <au****@aussie.com> wrote in message
> > > > news:uW**************@TK2MSFTNGP09.phx.gbl...
> > > > > The standard vb.net form color, is not the same as the form

color
of
> a
> > > > theme
> > > > > aware application.
> > > > >
> > > > > The problem here is how to easily get the users XP theme

color, and
> > > apply
> > > > it
> > > > > to forms and controls.
> > > > >
> > > > > Thats how I see it
> > > > >
> > > > >
> > > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message > > > > > news:#I**************@tk2msftngp13.phx.gbl...
> > > > > > ???
> > > > > > Unless you've changed it, it's already that colour.
> > > > > >
> > > > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > > > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > > > > > Hi,
> > > > > > >
> > > > > > > I want to use the user color scheme to set the color of my > forms.
> > > > > > >
> > > > > > > I now I have to use the. System.Drawing.SystemColors, but which
> > > color
> > > > is
> > > > > > the
> > > > > > > color of a form background as used in other applications. > > > > > > >
> > > > > > > In the end all I want to do is
> > > > > > >
> > > > > > > form1.backcolor = system.whatever.color
> > > > > > >
> > > > > > > Is this possible, and how?
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #14

P: n/a
Well I got a laugh out that one... Doesn't happen to often in a news group!

Thanks
"Road Warrior" <sp*****@getbounced.net> wrote in message
news:Oz**************@TK2MSFTNGP12.phx.gbl...
If that doesn't work for you another possibility is that you may be color
blind.
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:uo*************@TK2MSFTNGP09.phx.gbl...
OK. You won't do this through the Framework, you will have to use some
uxtheme functions. You will also need to monitor for the theme changes.

The following code will do what you want. The Color I chose was Color1 of
the two color gradient of the TasksPanel in Explorer:

**** Code starts **********************************************

#Region " XP Theme API "

'The uxtheme.dll function IsAppThemed() returns True
'if only the TitleBar has Visual Styles applied. A
'better way to check for Visual Styles is to check
'whether Comctl32.dll version 6 is in use.
Private Structure DLLVERSIONINFO
Dim cbSize As Integer
Dim dwMajorVersion As Integer
Dim dwMinorVersion As Integer
Dim dwBuildNumber As Integer
Dim dwPlatformID As Integer
End Structure

<DllImport("Comctl32.dll", _
entrypoint:="DllGetVersion", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Overloads Shared Function IsAppThemed( _
ByRef pdvi As DLLVERSIONINFO) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl, _
CharSet:=CharSet.Unicode)> _
Private Shared Function OpenThemeData( _
ByVal hwnd As IntPtr, _
ByVal pszClassList As String) As IntPtr
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function CloseThemeData( _
ByVal hTheme As IntPtr) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function GetThemeColor( _
ByVal hTheme As IntPtr, _
ByVal iPartID As Integer, _
ByVal iStateId As Integer, _
ByVal iPropId As Integer, _
ByRef pColor As rgbColor) As Integer
End Function

Private Const EBP_HEADERBACKGROUND As Integer = 1

Private Const TMT_GRADIENTCOLOR1 As Integer = 3810
Private Const TMT_GRADIENTCOLOR2 As Integer = 3811
Private Const TMT_GRADIENTCOLOR3 As Integer = 3812
Private Const TMT_GRADIENTCOLOR4 As Integer = 3813
Private Const TMT_GRADIENTCOLOR5 As Integer = 3814

Private S_OK As Integer = 0

Private Const WM_THEMECHANGED As Integer = &H31A

Private Structure rgbColor
Dim r As Byte
Dim g As Byte
Dim b As Byte
End Structure

#End Region

Private Function SetFormColor() As Boolean

Dim ReturnValue As Boolean = False

'----Check we are using Visual Styles
Dim dvi As New DLLVERSIONINFO
dvi.cbSize = Marshal.SizeOf(dvi)
IsAppThemed(dvi)
If dvi.dwMajorVersion < 6 Then Return False
'----------------------------------

Dim hTheme As IntPtr = OpenThemeData(Me.Handle, _
"EXPLORERBAR")

If Not hTheme.Equals(IntPtr.Zero) Then
Dim c As New rgbColor
If GetThemeColor(hTheme, EBP_HEADERBACKGROUND, 0, _
TMT_GRADIENTCOLOR1, _
c) = S_OK Then
Me.BackColor = Color.FromArgb(255, c.r, c.g, c.b)
ReturnValue = True
End If
End If

CloseThemeData(hTheme)

Return ReturnValue

End Function

Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load

SetFormColor()

End Sub

Protected Overrides Sub WndProc( _
ByRef m As System.Windows.Forms.Message)

MyBase.WndProc(m)
If m.Msg = WM_THEMECHANGED Then SetFormColor()

End Sub

**** Code ends ***********************************************

HTH

Mick

"news.microsoft.com" <au****@aussie.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Ok, so I think perhaps the orginal ? might need to be reword.

How do you set the standard windows form system.color to be the same color as those applications that use a customer color, such as office03, (ie the Olive Green, Blue, or silver.. XP Color Style)

So far from what I have been able to see, lots of people have ideas, but no
body has provided a confirmed, working concept or code sample on how
to
do this.

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl...
> "news.microsoft.com" <au****@aussie.com> wrote in message
> news:OG**************@TK2MSFTNGP10.phx.gbl...
> > If you take a look at many of the compents that are 'theme aware'
or take
> a
> > look at Microsoft Office 2003, you will see that a theme aware
application
> > have colors that are based on some other setting, outside of the display
> > properties apperance tab.
> >
>
> Office colors, just like Office Components, are not standard.
> Office does it's own manipulation of colors based upon the current
> System.Colors.
> You can look for the WM_THEMECHANGED message to update the colors in

your
> app, but it is up to you to decide on what those colors are if you

choose
> not use the Windows Default.
>
> >
> > A good example of this is from

http://www.devcomponents.com/dotnetbar/.
If
> > you look at the job image that changes you will see two versions of
the
> same
> > window(ignore the money look alike) of the dotnetbar notepad. One

being
> > based on the display property settings, which looks like a normal
Win2000k
> > application with its grey background, and the other which is
'theme aware'
> > XP with a blue background.
> >
>
> They all look like XP Themed windows to me. The first Notepad Sample
window
> shows the DotNetBar components with a custom appearance and the second shows
> these components with the Standard XP Style.
>
> >
> > Under XP display setting there is a color scheme option. There are

three
> > options out of the box, default(blue), olive green, and silver.
> >
> > The color of forms is set to be one of these colors, rather than the > > standard grey.
> >
>
> Have a look at the Advanced options from the Appearance Tab. The color of
> forms is set by 3DObjects, which in VB.Net is SystemColors.Control.
>
> >
> > With office2003, and other MS products being XP theme aware, it would seem
> > that microsoft have added a nice UI feature, but made it very hard for > > developers to include this in there products.
> >
> >
> >
> > Ignore the MS Money
> >
> >
> > Ther eis
> > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> > news:ux**************@tk2msftngp13.phx.gbl...
> > > That Grey color is the standard form backcolor. Have a look at your > > > Appearance Tab under the Display Properties. The Sample Message Box has
> a
> > > grey background not blue, therefore, the color you are looking
for is
> not
> > > standard. So what Blue color is it that you're looking for?
> > >
> > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > news:%2****************@TK2MSFTNGP10.phx.gbl...
> > > > Hi,
> > > >
> > > > My from backcolor is set to systemcolors.control, and the form is the
> > > > standard grey color, not the XP theme color of blue.
> > > >
> > > > I am using 03 as well. Perhaps there is some other
setting/code you
> have
> > > to
> > > > do this ?
> > > >
> > > >
> > > >
> > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in
message > > > > news:ep*************@tk2msftngp13.phx.gbl...
> > > > > If I add a new form to any VB.Net project, it's default

backcolor
is
> > > > > SystemColors.Control, which is the same as the form color for any
> > Visual
> > > > > Styles aware application. What's more, if left at default value, the
> > > color
> > > > > changes when you change the XP Styles Color scheme. What
color are
> you
> > > > > looking for?
> > > > > I am using VS.NET 2003. Is the default form backcolor for

VS.NET > 2002
> > > not
> > > > > 'SystemColors.Control'?
> > > > >
> > > > > "news.microsoft.com" <au****@aussie.com> wrote in message
> > > > > news:uW**************@TK2MSFTNGP09.phx.gbl...
> > > > > > The standard vb.net form color, is not the same as the
form color
> of
> > a
> > > > > theme
> > > > > > aware application.
> > > > > >
> > > > > > The problem here is how to easily get the users XP theme

color,
> and
> > > > apply
> > > > > it
> > > > > > to forms and controls.
> > > > > >
> > > > > > Thats how I see it
> > > > > >
> > > > > >
> > > > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in

message
> > > > > > news:#I**************@tk2msftngp13.phx.gbl...
> > > > > > > ???
> > > > > > > Unless you've changed it, it's already that colour.
> > > > > > >
> > > > > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > > > > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I want to use the user color scheme to set the color

of my > > forms.
> > > > > > > >
> > > > > > > > I now I have to use the. System.Drawing.SystemColors, but > which
> > > > color
> > > > > is
> > > > > > > the
> > > > > > > > color of a form background as used in other applications. > > > > > > > >
> > > > > > > > In the end all I want to do is
> > > > > > > >
> > > > > > > > form1.backcolor = system.whatever.color
> > > > > > > >
> > > > > > > > Is this possible, and how?
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #15

P: n/a
Hi,

Thanks for the code. I have plugged it into a new VB project and stepped
through the code to learn from it.

The following command however returns false, and therefore the color is not
set

If dvi.dwMajorVersion < 6 Then Return False

I have the color theme set on my XP machine(olive green), so I figure that
the comcontrol vb.net is using is less than version 6.

How do I get the Comctl32.dll to be used(I figure this is the problem but I
could be wrong ?)

Thanks heaps!


"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:uo*************@TK2MSFTNGP09.phx.gbl...
OK. You won't do this through the Framework, you will have to use some
uxtheme functions. You will also need to monitor for the theme changes.

The following code will do what you want. The Color I chose was Color1 of
the two color gradient of the TasksPanel in Explorer:

**** Code starts **********************************************

#Region " XP Theme API "

'The uxtheme.dll function IsAppThemed() returns True
'if only the TitleBar has Visual Styles applied. A
'better way to check for Visual Styles is to check
'whether Comctl32.dll version 6 is in use.
Private Structure DLLVERSIONINFO
Dim cbSize As Integer
Dim dwMajorVersion As Integer
Dim dwMinorVersion As Integer
Dim dwBuildNumber As Integer
Dim dwPlatformID As Integer
End Structure

<DllImport("Comctl32.dll", _
entrypoint:="DllGetVersion", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Overloads Shared Function IsAppThemed( _
ByRef pdvi As DLLVERSIONINFO) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl, _
CharSet:=CharSet.Unicode)> _
Private Shared Function OpenThemeData( _
ByVal hwnd As IntPtr, _
ByVal pszClassList As String) As IntPtr
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function CloseThemeData( _
ByVal hTheme As IntPtr) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function GetThemeColor( _
ByVal hTheme As IntPtr, _
ByVal iPartID As Integer, _
ByVal iStateId As Integer, _
ByVal iPropId As Integer, _
ByRef pColor As rgbColor) As Integer
End Function

Private Const EBP_HEADERBACKGROUND As Integer = 1

Private Const TMT_GRADIENTCOLOR1 As Integer = 3810
Private Const TMT_GRADIENTCOLOR2 As Integer = 3811
Private Const TMT_GRADIENTCOLOR3 As Integer = 3812
Private Const TMT_GRADIENTCOLOR4 As Integer = 3813
Private Const TMT_GRADIENTCOLOR5 As Integer = 3814

Private S_OK As Integer = 0

Private Const WM_THEMECHANGED As Integer = &H31A

Private Structure rgbColor
Dim r As Byte
Dim g As Byte
Dim b As Byte
End Structure

#End Region

Private Function SetFormColor() As Boolean

Dim ReturnValue As Boolean = False

'----Check we are using Visual Styles
Dim dvi As New DLLVERSIONINFO
dvi.cbSize = Marshal.SizeOf(dvi)
IsAppThemed(dvi)
If dvi.dwMajorVersion < 6 Then Return False
'----------------------------------

Dim hTheme As IntPtr = OpenThemeData(Me.Handle, _
"EXPLORERBAR")

If Not hTheme.Equals(IntPtr.Zero) Then
Dim c As New rgbColor
If GetThemeColor(hTheme, EBP_HEADERBACKGROUND, 0, _
TMT_GRADIENTCOLOR1, _
c) = S_OK Then
Me.BackColor = Color.FromArgb(255, c.r, c.g, c.b)
ReturnValue = True
End If
End If

CloseThemeData(hTheme)

Return ReturnValue

End Function

Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load

SetFormColor()

End Sub

Protected Overrides Sub WndProc( _
ByRef m As System.Windows.Forms.Message)

MyBase.WndProc(m)
If m.Msg = WM_THEMECHANGED Then SetFormColor()

End Sub

**** Code ends ***********************************************

HTH

Mick

"news.microsoft.com" <au****@aussie.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Ok, so I think perhaps the orginal ? might need to be reword.

How do you set the standard windows form system.color to be the same color
as those applications that use a customer color, such as office03, (ie the Olive Green, Blue, or silver.. XP Color Style)

So far from what I have been able to see, lots of people have ideas, but

no
body has provided a confirmed, working concept or code sample on how to do this.

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl...
"news.microsoft.com" <au****@aussie.com> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
> If you take a look at many of the compents that are 'theme aware' or

take
a
> look at Microsoft Office 2003, you will see that a theme aware

application
> have colors that are based on some other setting, outside of the display > properties apperance tab.
>

Office colors, just like Office Components, are not standard.
Office does it's own manipulation of colors based upon the current
System.Colors.
You can look for the WM_THEMECHANGED message to update the colors in your app, but it is up to you to decide on what those colors are if you choose not use the Windows Default.

>
> A good example of this is from http://www.devcomponents.com/dotnetbar/.
If
> you look at the job image that changes you will see two versions of

the same
> window(ignore the money look alike) of the dotnetbar notepad. One being > based on the display property settings, which looks like a normal

Win2000k
> application with its grey background, and the other which is 'theme

aware'
> XP with a blue background.
>

They all look like XP Themed windows to me. The first Notepad Sample

window
shows the DotNetBar components with a custom appearance and the second

shows
these components with the Standard XP Style.

>
> Under XP display setting there is a color scheme option. There are three > options out of the box, default(blue), olive green, and silver.
>
> The color of forms is set to be one of these colors, rather than the
> standard grey.
>

Have a look at the Advanced options from the Appearance Tab. The color of forms is set by 3DObjects, which in VB.Net is SystemColors.Control.

>
> With office2003, and other MS products being XP theme aware, it would seem
> that microsoft have added a nice UI feature, but made it very hard
for > developers to include this in there products.
>
>
>
> Ignore the MS Money
>
>
> Ther eis
> "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> news:ux**************@tk2msftngp13.phx.gbl...
> > That Grey color is the standard form backcolor. Have a look at your > > Appearance Tab under the Display Properties. The Sample Message Box
has
a
> > grey background not blue, therefore, the color you are looking for is not
> > standard. So what Blue color is it that you're looking for?
> >
> > "AussieRules" <so*****@nowhere.com> wrote in message
> > news:%2****************@TK2MSFTNGP10.phx.gbl...
> > > Hi,
> > >
> > > My from backcolor is set to systemcolors.control, and the form
is the
> > > standard grey color, not the XP theme color of blue.
> > >
> > > I am using 03 as well. Perhaps there is some other setting/code you have
> > to
> > > do this ?
> > >
> > >
> > >
> > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> > > news:ep*************@tk2msftngp13.phx.gbl...
> > > > If I add a new form to any VB.Net project, it's default backcolor
is
> > > > SystemColors.Control, which is the same as the form color for

any > Visual
> > > > Styles aware application. What's more, if left at default
value, the
> > color
> > > > changes when you change the XP Styles Color scheme. What color

are you
> > > > looking for?
> > > > I am using VS.NET 2003. Is the default form backcolor for
VS.NET 2002
> > not
> > > > 'SystemColors.Control'?
> > > >
> > > > "news.microsoft.com" <au****@aussie.com> wrote in message
> > > > news:uW**************@TK2MSFTNGP09.phx.gbl...
> > > > > The standard vb.net form color, is not the same as the form

color
of
> a
> > > > theme
> > > > > aware application.
> > > > >
> > > > > The problem here is how to easily get the users XP theme

color, and
> > > apply
> > > > it
> > > > > to forms and controls.
> > > > >
> > > > > Thats how I see it
> > > > >
> > > > >
> > > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message > > > > > news:#I**************@tk2msftngp13.phx.gbl...
> > > > > > ???
> > > > > > Unless you've changed it, it's already that colour.
> > > > > >
> > > > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > > > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > > > > > Hi,
> > > > > > >
> > > > > > > I want to use the user color scheme to set the color of my > forms.
> > > > > > >
> > > > > > > I now I have to use the. System.Drawing.SystemColors, but which
> > > color
> > > > is
> > > > > > the
> > > > > > > color of a form background as used in other applications. > > > > > > >
> > > > > > > In the end all I want to do is
> > > > > > >
> > > > > > > form1.backcolor = system.whatever.color
> > > > > > >
> > > > > > > Is this possible, and how?
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #16

P: n/a
Sorry! I totally forgot that New users don't know about Enabling Visual
Styles.

For Framework 1.1(VS2003):
Expand the Windows Form Designer generated code region.
Add Application.EnableVisualStyles() to Sub New(). Several people also
suggest adding Application.DoEvents. I add it although I have never
experienced problems without it.

Alternatively add a Manifest File for your App.
"AussieRules" <so*****@nowhere.com> wrote in message
news:en**************@TK2MSFTNGP12.phx.gbl...
Hi,

Thanks for the code. I have plugged it into a new VB project and stepped
through the code to learn from it.

The following command however returns false, and therefore the color is not set

If dvi.dwMajorVersion < 6 Then Return False

I have the color theme set on my XP machine(olive green), so I figure that
the comcontrol vb.net is using is less than version 6.

How do I get the Comctl32.dll to be used(I figure this is the problem but I could be wrong ?)

Thanks heaps!


"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:uo*************@TK2MSFTNGP09.phx.gbl...
OK. You won't do this through the Framework, you will have to use some
uxtheme functions. You will also need to monitor for the theme changes.

The following code will do what you want. The Color I chose was Color1 of
the two color gradient of the TasksPanel in Explorer:

**** Code starts **********************************************

#Region " XP Theme API "

'The uxtheme.dll function IsAppThemed() returns True
'if only the TitleBar has Visual Styles applied. A
'better way to check for Visual Styles is to check
'whether Comctl32.dll version 6 is in use.
Private Structure DLLVERSIONINFO
Dim cbSize As Integer
Dim dwMajorVersion As Integer
Dim dwMinorVersion As Integer
Dim dwBuildNumber As Integer
Dim dwPlatformID As Integer
End Structure

<DllImport("Comctl32.dll", _
entrypoint:="DllGetVersion", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Overloads Shared Function IsAppThemed( _
ByRef pdvi As DLLVERSIONINFO) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl, _
CharSet:=CharSet.Unicode)> _
Private Shared Function OpenThemeData( _
ByVal hwnd As IntPtr, _
ByVal pszClassList As String) As IntPtr
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function CloseThemeData( _
ByVal hTheme As IntPtr) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function GetThemeColor( _
ByVal hTheme As IntPtr, _
ByVal iPartID As Integer, _
ByVal iStateId As Integer, _
ByVal iPropId As Integer, _
ByRef pColor As rgbColor) As Integer
End Function

Private Const EBP_HEADERBACKGROUND As Integer = 1

Private Const TMT_GRADIENTCOLOR1 As Integer = 3810
Private Const TMT_GRADIENTCOLOR2 As Integer = 3811
Private Const TMT_GRADIENTCOLOR3 As Integer = 3812
Private Const TMT_GRADIENTCOLOR4 As Integer = 3813
Private Const TMT_GRADIENTCOLOR5 As Integer = 3814

Private S_OK As Integer = 0

Private Const WM_THEMECHANGED As Integer = &H31A

Private Structure rgbColor
Dim r As Byte
Dim g As Byte
Dim b As Byte
End Structure

#End Region

Private Function SetFormColor() As Boolean

Dim ReturnValue As Boolean = False

'----Check we are using Visual Styles
Dim dvi As New DLLVERSIONINFO
dvi.cbSize = Marshal.SizeOf(dvi)
IsAppThemed(dvi)
If dvi.dwMajorVersion < 6 Then Return False
'----------------------------------

Dim hTheme As IntPtr = OpenThemeData(Me.Handle, _
"EXPLORERBAR")

If Not hTheme.Equals(IntPtr.Zero) Then
Dim c As New rgbColor
If GetThemeColor(hTheme, EBP_HEADERBACKGROUND, 0, _
TMT_GRADIENTCOLOR1, _
c) = S_OK Then
Me.BackColor = Color.FromArgb(255, c.r, c.g, c.b)
ReturnValue = True
End If
End If

CloseThemeData(hTheme)

Return ReturnValue

End Function

Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load

SetFormColor()

End Sub

Protected Overrides Sub WndProc( _
ByRef m As System.Windows.Forms.Message)

MyBase.WndProc(m)
If m.Msg = WM_THEMECHANGED Then SetFormColor()

End Sub

**** Code ends ***********************************************

HTH

Mick

"news.microsoft.com" <au****@aussie.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Ok, so I think perhaps the orginal ? might need to be reword.

How do you set the standard windows form system.color to be the same color as those applications that use a customer color, such as office03, (ie the Olive Green, Blue, or silver.. XP Color Style)

So far from what I have been able to see, lots of people have ideas, but no
body has provided a confirmed, working concept or code sample on how
to
do this.

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl...
> "news.microsoft.com" <au****@aussie.com> wrote in message
> news:OG**************@TK2MSFTNGP10.phx.gbl...
> > If you take a look at many of the compents that are 'theme aware'
or take
> a
> > look at Microsoft Office 2003, you will see that a theme aware
application
> > have colors that are based on some other setting, outside of the display
> > properties apperance tab.
> >
>
> Office colors, just like Office Components, are not standard.
> Office does it's own manipulation of colors based upon the current
> System.Colors.
> You can look for the WM_THEMECHANGED message to update the colors in

your
> app, but it is up to you to decide on what those colors are if you

choose
> not use the Windows Default.
>
> >
> > A good example of this is from

http://www.devcomponents.com/dotnetbar/.
If
> > you look at the job image that changes you will see two versions of
the
> same
> > window(ignore the money look alike) of the dotnetbar notepad. One

being
> > based on the display property settings, which looks like a normal
Win2000k
> > application with its grey background, and the other which is
'theme aware'
> > XP with a blue background.
> >
>
> They all look like XP Themed windows to me. The first Notepad Sample
window
> shows the DotNetBar components with a custom appearance and the second shows
> these components with the Standard XP Style.
>
> >
> > Under XP display setting there is a color scheme option. There are

three
> > options out of the box, default(blue), olive green, and silver.
> >
> > The color of forms is set to be one of these colors, rather than the > > standard grey.
> >
>
> Have a look at the Advanced options from the Appearance Tab. The color of
> forms is set by 3DObjects, which in VB.Net is SystemColors.Control.
>
> >
> > With office2003, and other MS products being XP theme aware, it would seem
> > that microsoft have added a nice UI feature, but made it very hard for > > developers to include this in there products.
> >
> >
> >
> > Ignore the MS Money
> >
> >
> > Ther eis
> > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> > news:ux**************@tk2msftngp13.phx.gbl...
> > > That Grey color is the standard form backcolor. Have a look at your > > > Appearance Tab under the Display Properties. The Sample Message Box has
> a
> > > grey background not blue, therefore, the color you are looking
for is
> not
> > > standard. So what Blue color is it that you're looking for?
> > >
> > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > news:%2****************@TK2MSFTNGP10.phx.gbl...
> > > > Hi,
> > > >
> > > > My from backcolor is set to systemcolors.control, and the form is the
> > > > standard grey color, not the XP theme color of blue.
> > > >
> > > > I am using 03 as well. Perhaps there is some other
setting/code you
> have
> > > to
> > > > do this ?
> > > >
> > > >
> > > >
> > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in
message > > > > news:ep*************@tk2msftngp13.phx.gbl...
> > > > > If I add a new form to any VB.Net project, it's default

backcolor
is
> > > > > SystemColors.Control, which is the same as the form color for any
> > Visual
> > > > > Styles aware application. What's more, if left at default value, the
> > > color
> > > > > changes when you change the XP Styles Color scheme. What
color are
> you
> > > > > looking for?
> > > > > I am using VS.NET 2003. Is the default form backcolor for

VS.NET > 2002
> > > not
> > > > > 'SystemColors.Control'?
> > > > >
> > > > > "news.microsoft.com" <au****@aussie.com> wrote in message
> > > > > news:uW**************@TK2MSFTNGP09.phx.gbl...
> > > > > > The standard vb.net form color, is not the same as the
form color
> of
> > a
> > > > > theme
> > > > > > aware application.
> > > > > >
> > > > > > The problem here is how to easily get the users XP theme

color,
> and
> > > > apply
> > > > > it
> > > > > > to forms and controls.
> > > > > >
> > > > > > Thats how I see it
> > > > > >
> > > > > >
> > > > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in

message
> > > > > > news:#I**************@tk2msftngp13.phx.gbl...
> > > > > > > ???
> > > > > > > Unless you've changed it, it's already that colour.
> > > > > > >
> > > > > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > > > > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I want to use the user color scheme to set the color

of my > > forms.
> > > > > > > >
> > > > > > > > I now I have to use the. System.Drawing.SystemColors, but > which
> > > > color
> > > > > is
> > > > > > > the
> > > > > > > > color of a form background as used in other applications. > > > > > > > >
> > > > > > > > In the end all I want to do is
> > > > > > > >
> > > > > > > > form1.backcolor = system.whatever.color
> > > > > > > >
> > > > > > > > Is this possible, and how?
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #17

P: n/a
Followed your advice... but the same still occurs ?

I figure I must be doing something wrong, so my sub new code attached
--
#Region " Windows Form Designer generated code "

Public Sub New()

MyBase.New()

'This call is required by the Windows Form Designer.

InitializeComponent()

Application.EnableVisualStyles()

Application.DoEvents()

'Add any initialization after the InitializeComponent() call

End Sub

---
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:eY**************@tk2msftngp13.phx.gbl...
Sorry! I totally forgot that New users don't know about Enabling Visual
Styles.

For Framework 1.1(VS2003):
Expand the Windows Form Designer generated code region.
Add Application.EnableVisualStyles() to Sub New(). Several people also
suggest adding Application.DoEvents. I add it although I have never
experienced problems without it.

Alternatively add a Manifest File for your App.
"AussieRules" <so*****@nowhere.com> wrote in message
news:en**************@TK2MSFTNGP12.phx.gbl...
Hi,

Thanks for the code. I have plugged it into a new VB project and stepped
through the code to learn from it.

The following command however returns false, and therefore the color is not
set

If dvi.dwMajorVersion < 6 Then Return False

I have the color theme set on my XP machine(olive green), so I figure that
the comcontrol vb.net is using is less than version 6.

How do I get the Comctl32.dll to be used(I figure this is the problem but I
could be wrong ?)

Thanks heaps!


"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:uo*************@TK2MSFTNGP09.phx.gbl...
OK. You won't do this through the Framework, you will have to use some
uxtheme functions. You will also need to monitor for the theme changes.
The following code will do what you want. The Color I chose was Color1
of the two color gradient of the TasksPanel in Explorer:

**** Code starts **********************************************

#Region " XP Theme API "

'The uxtheme.dll function IsAppThemed() returns True
'if only the TitleBar has Visual Styles applied. A
'better way to check for Visual Styles is to check
'whether Comctl32.dll version 6 is in use.
Private Structure DLLVERSIONINFO
Dim cbSize As Integer
Dim dwMajorVersion As Integer
Dim dwMinorVersion As Integer
Dim dwBuildNumber As Integer
Dim dwPlatformID As Integer
End Structure

<DllImport("Comctl32.dll", _
entrypoint:="DllGetVersion", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Overloads Shared Function IsAppThemed( _
ByRef pdvi As DLLVERSIONINFO) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl, _
CharSet:=CharSet.Unicode)> _
Private Shared Function OpenThemeData( _
ByVal hwnd As IntPtr, _
ByVal pszClassList As String) As IntPtr
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function CloseThemeData( _
ByVal hTheme As IntPtr) As Integer
End Function

<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Cdecl)> _
Private Shared Function GetThemeColor( _
ByVal hTheme As IntPtr, _
ByVal iPartID As Integer, _
ByVal iStateId As Integer, _
ByVal iPropId As Integer, _
ByRef pColor As rgbColor) As Integer
End Function

Private Const EBP_HEADERBACKGROUND As Integer = 1

Private Const TMT_GRADIENTCOLOR1 As Integer = 3810
Private Const TMT_GRADIENTCOLOR2 As Integer = 3811
Private Const TMT_GRADIENTCOLOR3 As Integer = 3812
Private Const TMT_GRADIENTCOLOR4 As Integer = 3813
Private Const TMT_GRADIENTCOLOR5 As Integer = 3814

Private S_OK As Integer = 0

Private Const WM_THEMECHANGED As Integer = &H31A

Private Structure rgbColor
Dim r As Byte
Dim g As Byte
Dim b As Byte
End Structure

#End Region

Private Function SetFormColor() As Boolean

Dim ReturnValue As Boolean = False

'----Check we are using Visual Styles
Dim dvi As New DLLVERSIONINFO
dvi.cbSize = Marshal.SizeOf(dvi)
IsAppThemed(dvi)
If dvi.dwMajorVersion < 6 Then Return False
'----------------------------------

Dim hTheme As IntPtr = OpenThemeData(Me.Handle, _
"EXPLORERBAR")

If Not hTheme.Equals(IntPtr.Zero) Then
Dim c As New rgbColor
If GetThemeColor(hTheme, EBP_HEADERBACKGROUND, 0, _
TMT_GRADIENTCOLOR1, _
c) = S_OK Then
Me.BackColor = Color.FromArgb(255, c.r, c.g, c.b)
ReturnValue = True
End If
End If

CloseThemeData(hTheme)

Return ReturnValue

End Function

Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load

SetFormColor()

End Sub

Protected Overrides Sub WndProc( _
ByRef m As System.Windows.Forms.Message)

MyBase.WndProc(m)
If m.Msg = WM_THEMECHANGED Then SetFormColor()

End Sub

**** Code ends ***********************************************

HTH

Mick

"news.microsoft.com" <au****@aussie.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
> Ok, so I think perhaps the orginal ? might need to be reword.
>
> How do you set the standard windows form system.color to be the same

color
> as those applications that use a customer color, such as office03, (ie the
> Olive Green, Blue, or silver.. XP Color Style)
>
> So far from what I have been able to see, lots of people have ideas, but no
> body has provided a confirmed, working concept or code sample on how to
do
> this.
>
>
>
>
>
> "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> news:ee**************@TK2MSFTNGP10.phx.gbl...
> > "news.microsoft.com" <au****@aussie.com> wrote in message
> > news:OG**************@TK2MSFTNGP10.phx.gbl...
> > > If you take a look at many of the compents that are 'theme
aware' or > take
> > a
> > > look at Microsoft Office 2003, you will see that a theme aware
> application
> > > have colors that are based on some other setting, outside of the
display
> > > properties apperance tab.
> > >
> >
> > Office colors, just like Office Components, are not standard.
> > Office does it's own manipulation of colors based upon the current
> > System.Colors.
> > You can look for the WM_THEMECHANGED message to update the colors
in your
> > app, but it is up to you to decide on what those colors are if you
choose
> > not use the Windows Default.
> >
> > >
> > > A good example of this is from
http://www.devcomponents.com/dotnetbar/.
> If
> > > you look at the job image that changes you will see two versions

of the
> > same
> > > window(ignore the money look alike) of the dotnetbar notepad. One being
> > > based on the display property settings, which looks like a normal > Win2000k
> > > application with its grey background, and the other which is 'theme > aware'
> > > XP with a blue background.
> > >
> >
> > They all look like XP Themed windows to me. The first Notepad Sample > window
> > shows the DotNetBar components with a custom appearance and the second > shows
> > these components with the Standard XP Style.
> >
> > >
> > > Under XP display setting there is a color scheme option. There are three
> > > options out of the box, default(blue), olive green, and silver.
> > >
> > > The color of forms is set to be one of these colors, rather than the > > > standard grey.
> > >
> >
> > Have a look at the Advanced options from the Appearance Tab. The color of
> > forms is set by 3DObjects, which in VB.Net is SystemColors.Control. > >
> > >
> > > With office2003, and other MS products being XP theme aware, it

would
> seem
> > > that microsoft have added a nice UI feature, but made it very
hard for
> > > developers to include this in there products.
> > >
> > >
> > >
> > > Ignore the MS Money
> > >
> > >
> > > Ther eis
> > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> > > news:ux**************@tk2msftngp13.phx.gbl...
> > > > That Grey color is the standard form backcolor. Have a look at

your
> > > > Appearance Tab under the Display Properties. The Sample
Message Box
> has
> > a
> > > > grey background not blue, therefore, the color you are looking for is
> > not
> > > > standard. So what Blue color is it that you're looking for?
> > > >
> > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > news:%2****************@TK2MSFTNGP10.phx.gbl...
> > > > > Hi,
> > > > >
> > > > > My from backcolor is set to systemcolors.control, and the
form is
> the
> > > > > standard grey color, not the XP theme color of blue.
> > > > >
> > > > > I am using 03 as well. Perhaps there is some other setting/code you
> > have
> > > > to
> > > > > do this ?
> > > > >
> > > > >
> > > > >
> > > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message > > > > > news:ep*************@tk2msftngp13.phx.gbl...
> > > > > > If I add a new form to any VB.Net project, it's default
backcolor
> is
> > > > > > SystemColors.Control, which is the same as the form color for any
> > > Visual
> > > > > > Styles aware application. What's more, if left at default

value,
> the
> > > > color
> > > > > > changes when you change the XP Styles Color scheme. What color are
> > you
> > > > > > looking for?
> > > > > > I am using VS.NET 2003. Is the default form backcolor for

VS.NET
> > 2002
> > > > not
> > > > > > 'SystemColors.Control'?
> > > > > >
> > > > > > "news.microsoft.com" <au****@aussie.com> wrote in message
> > > > > > news:uW**************@TK2MSFTNGP09.phx.gbl...
> > > > > > > The standard vb.net form color, is not the same as the form > color
> > of
> > > a
> > > > > > theme
> > > > > > > aware application.
> > > > > > >
> > > > > > > The problem here is how to easily get the users XP theme
color,
> > and
> > > > > apply
> > > > > > it
> > > > > > > to forms and controls.
> > > > > > >
> > > > > > > Thats how I see it
> > > > > > >
> > > > > > >
> > > > > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in
message
> > > > > > > news:#I**************@tk2msftngp13.phx.gbl...
> > > > > > > > ???
> > > > > > > > Unless you've changed it, it's already that colour.
> > > > > > > >
> > > > > > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > > > > > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I want to use the user color scheme to set the color

of
my
> > > forms.
> > > > > > > > >
> > > > > > > > > I now I have to use the.

System.Drawing.SystemColors, but
> > which
> > > > > color
> > > > > > is
> > > > > > > > the
> > > > > > > > > color of a form background as used in other

applications.
> > > > > > > > >
> > > > > > > > > In the end all I want to do is
> > > > > > > > >
> > > > > > > > > form1.backcolor = system.whatever.color
> > > > > > > > >
> > > > > > > > > Is this possible, and how?
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #18

P: n/a
It should all be working. Add a Command button to your form and set it's
Flatstyle property to system. If the button is using Visual Styles then the
code should be working since the themed controls are in Common Controls 6.
If not then you have another problem.
Is your Titlebar displayed using Visual Styles?
"AussieRules" <so*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Followed your advice... but the same still occurs ?

I figure I must be doing something wrong, so my sub new code attached
--
#Region " Windows Form Designer generated code "

Public Sub New()

MyBase.New()

'This call is required by the Windows Form Designer.

InitializeComponent()

Application.EnableVisualStyles()

Application.DoEvents()

'Add any initialization after the InitializeComponent() call

End Sub

---
"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:eY**************@tk2msftngp13.phx.gbl...
Sorry! I totally forgot that New users don't know about Enabling Visual
Styles.

For Framework 1.1(VS2003):
Expand the Windows Form Designer generated code region.
Add Application.EnableVisualStyles() to Sub New(). Several people also
suggest adding Application.DoEvents. I add it although I have never
experienced problems without it.

Alternatively add a Manifest File for your App.
"AussieRules" <so*****@nowhere.com> wrote in message
news:en**************@TK2MSFTNGP12.phx.gbl...
Hi,

Thanks for the code. I have plugged it into a new VB project and stepped through the code to learn from it.

The following command however returns false, and therefore the color is
not
set

If dvi.dwMajorVersion < 6 Then Return False

I have the color theme set on my XP machine(olive green), so I figure that the comcontrol vb.net is using is less than version 6.

How do I get the Comctl32.dll to be used(I figure this is the problem but
I
could be wrong ?)

Thanks heaps!


"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:uo*************@TK2MSFTNGP09.phx.gbl...
> OK. You won't do this through the Framework, you will have to use
some > uxtheme functions. You will also need to monitor for the theme
changes. >
> The following code will do what you want. The Color I chose was Color1 of
> the two color gradient of the TasksPanel in Explorer:
>
> **** Code starts **********************************************
>
> #Region " XP Theme API "
>
> 'The uxtheme.dll function IsAppThemed() returns True
> 'if only the TitleBar has Visual Styles applied. A
> 'better way to check for Visual Styles is to check
> 'whether Comctl32.dll version 6 is in use.
> Private Structure DLLVERSIONINFO
> Dim cbSize As Integer
> Dim dwMajorVersion As Integer
> Dim dwMinorVersion As Integer
> Dim dwBuildNumber As Integer
> Dim dwPlatformID As Integer
> End Structure
>
> <DllImport("Comctl32.dll", _
> entrypoint:="DllGetVersion", _
> CallingConvention:=CallingConvention.Cdecl)> _
> Private Overloads Shared Function IsAppThemed( _
> ByRef pdvi As DLLVERSIONINFO) As Integer
> End Function
>
> <DllImport("UxTheme.dll", _
> CallingConvention:=CallingConvention.Cdecl, _
> CharSet:=CharSet.Unicode)> _
> Private Shared Function OpenThemeData( _
> ByVal hwnd As IntPtr, _
> ByVal pszClassList As String) As IntPtr
> End Function
>
> <DllImport("UxTheme.dll", _
> CallingConvention:=CallingConvention.Cdecl)> _
> Private Shared Function CloseThemeData( _
> ByVal hTheme As IntPtr) As Integer
> End Function
>
> <DllImport("UxTheme.dll", _
> CallingConvention:=CallingConvention.Cdecl)> _
> Private Shared Function GetThemeColor( _
> ByVal hTheme As IntPtr, _
> ByVal iPartID As Integer, _
> ByVal iStateId As Integer, _
> ByVal iPropId As Integer, _
> ByRef pColor As rgbColor) As Integer
> End Function
>
> Private Const EBP_HEADERBACKGROUND As Integer = 1
>
> Private Const TMT_GRADIENTCOLOR1 As Integer = 3810
> Private Const TMT_GRADIENTCOLOR2 As Integer = 3811
> Private Const TMT_GRADIENTCOLOR3 As Integer = 3812
> Private Const TMT_GRADIENTCOLOR4 As Integer = 3813
> Private Const TMT_GRADIENTCOLOR5 As Integer = 3814
>
> Private S_OK As Integer = 0
>
> Private Const WM_THEMECHANGED As Integer = &H31A
>
> Private Structure rgbColor
> Dim r As Byte
> Dim g As Byte
> Dim b As Byte
> End Structure
>
> #End Region
>
> Private Function SetFormColor() As Boolean
>
> Dim ReturnValue As Boolean = False
>
> '----Check we are using Visual Styles
> Dim dvi As New DLLVERSIONINFO
> dvi.cbSize = Marshal.SizeOf(dvi)
> IsAppThemed(dvi)
> If dvi.dwMajorVersion < 6 Then Return False
> '----------------------------------
>
> Dim hTheme As IntPtr = OpenThemeData(Me.Handle, _
> "EXPLORERBAR")
>
> If Not hTheme.Equals(IntPtr.Zero) Then
> Dim c As New rgbColor
> If GetThemeColor(hTheme, EBP_HEADERBACKGROUND, 0, _
> TMT_GRADIENTCOLOR1, _
> c) = S_OK Then
> Me.BackColor = Color.FromArgb(255, c.r, c.g, c.b)
> ReturnValue = True
> End If
> End If
>
> CloseThemeData(hTheme)
>
> Return ReturnValue
>
> End Function
>
> Private Sub Form1_Load(ByVal sender As Object, _
> ByVal e As System.EventArgs) _
> Handles MyBase.Load
>
> SetFormColor()
>
> End Sub
>
> Protected Overrides Sub WndProc( _
> ByRef m As System.Windows.Forms.Message)
>
> MyBase.WndProc(m)
> If m.Msg = WM_THEMECHANGED Then SetFormColor()
>
> End Sub
>
> **** Code ends ***********************************************
>
> HTH
>
> Mick
>
> "news.microsoft.com" <au****@aussie.com> wrote in message
> news:OJ**************@tk2msftngp13.phx.gbl...
> > Ok, so I think perhaps the orginal ? might need to be reword.
> >
> > How do you set the standard windows form system.color to be the
same color
> > as those applications that use a customer color, such as office03, (ie the
> > Olive Green, Blue, or silver.. XP Color Style)
> >
> > So far from what I have been able to see, lots of people have ideas, but
> no
> > body has provided a confirmed, working concept or code sample on
how
to
do
> > this.
> >
> >
> >
> >
> >
> > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
> > news:ee**************@TK2MSFTNGP10.phx.gbl...
> > > "news.microsoft.com" <au****@aussie.com> wrote in message
> > > news:OG**************@TK2MSFTNGP10.phx.gbl...
> > > > If you take a look at many of the compents that are 'theme aware'
or
> > take
> > > a
> > > > look at Microsoft Office 2003, you will see that a theme aware
> > application
> > > > have colors that are based on some other setting, outside of

the > display
> > > > properties apperance tab.
> > > >
> > >
> > > Office colors, just like Office Components, are not standard.
> > > Office does it's own manipulation of colors based upon the current > > > System.Colors.
> > > You can look for the WM_THEMECHANGED message to update the colors in > your
> > > app, but it is up to you to decide on what those colors are if
you > choose
> > > not use the Windows Default.
> > >
> > > >
> > > > A good example of this is from
> http://www.devcomponents.com/dotnetbar/.
> > If
> > > > you look at the job image that changes you will see two versions of
> the
> > > same
> > > > window(ignore the money look alike) of the dotnetbar notepad. One > being
> > > > based on the display property settings, which looks like a normal > > Win2000k
> > > > application with its grey background, and the other which is

'theme
> > aware'
> > > > XP with a blue background.
> > > >
> > >
> > > They all look like XP Themed windows to me. The first Notepad Sample > > window
> > > shows the DotNetBar components with a custom appearance and the

second
> > shows
> > > these components with the Standard XP Style.
> > >
> > > >
> > > > Under XP display setting there is a color scheme option. There are > three
> > > > options out of the box, default(blue), olive green, and
silver. > > > >
> > > > The color of forms is set to be one of these colors, rather than the
> > > > standard grey.
> > > >
> > >
> > > Have a look at the Advanced options from the Appearance Tab. The

color
> of
> > > forms is set by 3DObjects, which in VB.Net is SystemColors.Control. > > >
> > > >
> > > > With office2003, and other MS products being XP theme aware,
it would
> > seem
> > > > that microsoft have added a nice UI feature, but made it very

hard for
> > > > developers to include this in there products.
> > > >
> > > >
> > > >
> > > > Ignore the MS Money
> > > >
> > > >
> > > > Ther eis
> > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message > > > > news:ux**************@tk2msftngp13.phx.gbl...
> > > > > That Grey color is the standard form backcolor. Have a look at your
> > > > > Appearance Tab under the Display Properties. The Sample Message Box
> > has
> > > a
> > > > > grey background not blue, therefore, the color you are looking for
> is
> > > not
> > > > > standard. So what Blue color is it that you're looking for?
> > > > >
> > > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > > news:%2****************@TK2MSFTNGP10.phx.gbl...
> > > > > > Hi,
> > > > > >
> > > > > > My from backcolor is set to systemcolors.control, and the form is
> > the
> > > > > > standard grey color, not the XP theme color of blue.
> > > > > >
> > > > > > I am using 03 as well. Perhaps there is some other

setting/code
> you
> > > have
> > > > > to
> > > > > > do this ?
> > > > > >
> > > > > >
> > > > > >
> > > > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in

message
> > > > > > news:ep*************@tk2msftngp13.phx.gbl...
> > > > > > > If I add a new form to any VB.Net project, it's default
> backcolor
> > is
> > > > > > > SystemColors.Control, which is the same as the form
color
for
> any
> > > > Visual
> > > > > > > Styles aware application. What's more, if left at
default value,
> > the
> > > > > color
> > > > > > > changes when you change the XP Styles Color scheme. What

color
> are
> > > you
> > > > > > > looking for?
> > > > > > > I am using VS.NET 2003. Is the default form backcolor for VS.NET
> > > 2002
> > > > > not
> > > > > > > 'SystemColors.Control'?
> > > > > > >
> > > > > > > "news.microsoft.com" <au****@aussie.com> wrote in message > > > > > > > news:uW**************@TK2MSFTNGP09.phx.gbl...
> > > > > > > > The standard vb.net form color, is not the same as the

form
> > color
> > > of
> > > > a
> > > > > > > theme
> > > > > > > > aware application.
> > > > > > > >
> > > > > > > > The problem here is how to easily get the users XP theme > color,
> > > and
> > > > > > apply
> > > > > > > it
> > > > > > > > to forms and controls.
> > > > > > > >
> > > > > > > > Thats how I see it
> > > > > > > >
> > > > > > > >
> > > > > > > > "Mick Doherty" <md*******@nospam.ntlworld.com> wrote in > message
> > > > > > > > news:#I**************@tk2msftngp13.phx.gbl...
> > > > > > > > > ???
> > > > > > > > > Unless you've changed it, it's already that colour.
> > > > > > > > >
> > > > > > > > > "AussieRules" <so*****@nowhere.com> wrote in message
> > > > > > > > > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > > > > > > > > Hi,
> > > > > > > > > >
> > > > > > > > > > I want to use the user color scheme to set the

color of
my
> > > > forms.
> > > > > > > > > >
> > > > > > > > > > I now I have to use the.

System.Drawing.SystemColors, but
> > > which
> > > > > > color
> > > > > > > is
> > > > > > > > > the
> > > > > > > > > > color of a form background as used in other
applications.
> > > > > > > > > >
> > > > > > > > > > In the end all I want to do is
> > > > > > > > > >
> > > > > > > > > > form1.backcolor = system.whatever.color
> > > > > > > > > >
> > > > > > > > > > Is this possible, and how?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #19

P: n/a
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb
... and anyone who reads all your articles has to download every
article several times in quoted form.

This group really seems to be upside down sometimes. :-( (no blink)
--
Armin

Nov 20 '05 #20

P: n/a
That's a choice as far as I am concerned. You could always not download my
message at all. For those of you using automated Newsreaders I am sure you
can set up a Macro so that you do not download any message greater in size
than 2KB. I will continue to include the whole message as that is a
preference of mine. If you are not capable of adding a macro then add me to
your Blocked Senders list, I won't be offended.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bn*************@ID-208219.news.uni-berlin.de...
* "Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
Anyone who reads my replies can see what it relates to, even if they have previously read and deleted the message to which I am replying. Anyone
reading this message who has previously read and deleted the messages in
this thread will have no Idea what the discussion was about since you
deleted the content before replying.
Maybe you save all messages, but I delete all read messages, unless I have a reason to keep them. Any replies I read are meaningless if I don't know the question.


... and anyone who reads all your articles has to download every article
several times in quoted form.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #21

P: n/a
Personally, I don't have a problem scrolling through a message. Because of
the Indentation, I can immediately pick out any new content.

There seems to be a lot of discussion in this Newsgroup that has nothing at
all to do with Visual Basic Net. Humorous as it may be, if all that stopped
then there would be a lot of messages every day that do not need
downloading. These messages are mostly written by the same small group of
people, who try to enforce a set of rules on others. Surely one of those
rules is that the content of your message should relate to the Group to
which you are posting.

"Armin Zingler" <az*******@freenet.de> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
Anyone who reads my replies can see what it relates to, even if they
have previously read and deleted the message to which I am replying.
Anyone reading this message who has previously read and deleted the
messages in this thread will have no Idea what the discussion was
about since you deleted the content before replying.
Maybe you save all messages, but I delete all read messages, unless I
have a reason to keep them. Any replies I read are meaningless if I
don't know the question.
It is common practice to quote only the text you are referring to. That is
the reason why quotes are made at all. If somebody else deletes messages
that he/she is interested in later, it is definitely his/her own fault,

but for sure it is not yours or mine. Apart from this, it is impractical to
scroll and scroll and scroll down just to find out there is nothing new and that there is no additional paragraph you are referring to. There are only
paragraphs that have been posted several times. In addition, if somebody is really interested in, he can pull the referenced posts on demand directly
from the server or from google.
--
Armin

Nov 20 '05 #22

P: n/a
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
Personally, I don't have a problem scrolling through a message.
But I do have a problem. Please notice that you are not alone in this group.
Because of the Indentation, I can immediately pick out any new
content.
Yes, but there was no new content.
There seems to be a lot of discussion in this Newsgroup that has
nothing at all to do with Visual Basic Net. Humorous as it may be, if
all that stopped then there would be a lot of messages every day that
do not need downloading. These messages are mostly written by the
same small group of people, who try to enforce a set of rules on
others. Surely one of those rules is that the content of your message
should relate to the Group to which you are posting.

If some people would start to think about their ignorant behavior, there was
no need for discussions. Unfortunaty, these people are often immune to
sensible suggestions.
--
Armin

http://learn.to/quote
Nov 20 '05 #23

P: n/a
If you have a problem scrolling through a message, then don't.
I know that I am not alone in this group. I also know that you are not the
Groups Nanny.

Did you notice how easy it was for you to see that there was no new content?

Why do you consider individual preference to be ignorant?
"Users should not have a choice, so don't give them one." Who's going to use
that App?

If you don't like my preferences then add me to your Blocked Senders list.
Problem solved.

Sorry! Should I have put these answers inline for you?

Don't bother to scroll past here as there is no new inline content :-)

"Armin Zingler" <az*******@freenet.de> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
Personally, I don't have a problem scrolling through a message.
But I do have a problem. Please notice that you are not alone in this

group.
Because of the Indentation, I can immediately pick out any new
content.
Yes, but there was no new content.
There seems to be a lot of discussion in this Newsgroup that has
nothing at all to do with Visual Basic Net. Humorous as it may be, if
all that stopped then there would be a lot of messages every day that
do not need downloading. These messages are mostly written by the
same small group of people, who try to enforce a set of rules on
others. Surely one of those rules is that the content of your message
should relate to the Group to which you are posting.

If some people would start to think about their ignorant behavior, there

was no need for discussions. Unfortunaty, these people are often immune to
sensible suggestions.
--
Armin

http://learn.to/quote

Nov 20 '05 #24

P: n/a
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
If you have a problem scrolling through a message, then don't.


In news.announce.newusers there's a link to

http://www.plig.net/nnq/nquote.html

Read the basics or keep being ignorant.

(Actually I want to write "Please read it.." but being friendly is
considered being unfriendly)

For me: EOT

--
Armin

Nov 20 '05 #25

P: n/a
The Introduction of that Documentation contains the following phrase:

[Please do not consider this to be a "regulatory" document ("Thou shalt do
it this way because we say so!"), but rather as an "advocacy" document]

I'm sure that if I spent enough time looking around I'd find some document
that suggests that you should not use inline replies since that causes the
reader to unnecessarily scroll through the message to see your responses.

Individuality is not a bad thing. I'll do it my way, you do it yours.

Agreed: EOT

"Armin Zingler" <az*******@freenet.de> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
If you have a problem scrolling through a message, then don't.


In news.announce.newusers there's a link to

http://www.plig.net/nnq/nquote.html

Read the basics or keep being ignorant.

(Actually I want to write "Please read it.." but being friendly is
considered being unfriendly)

For me: EOT

--
Armin

Nov 20 '05 #26

P: n/a
* "Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
That's a choice as far as I am concerned. You could always not download my
message at all.
This will require a lot of time. I don't want to _read_ every message
_before_ downloading it... This won't work.
For those of you using automated Newsreaders I am sure you
can set up a Macro so that you do not download any message greater in size
than 2KB.
I will loose lots of interesting messages when doing that.
I will continue to include the whole message as that is a
preference of mine. If you are not capable of adding a macro then add me to
your Blocked Senders list, I won't be offended.


I appreciate your comments, but don't forget users with a really slow
internet connection. Make their life easier.

:-)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #27

P: n/a
* "Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
If you have a problem scrolling through a message, then don't.
I know that I am not alone in this group. I also know that you are not the
Groups Nanny.

Did you notice how easy it was for you to see that there was no new content?
I think that Armin and I try to make work in the groups easier for
everybody. Even people with slow connection, buggy newsreaders, people
who have very few time. That's part of being member of a community. We
try to enable others to access the groups as fast as possible.
Why do you consider individual preference to be ignorant?


Individual preference is not ignorant "per se", but it's ignorant if it
prevents other people from enjoying something.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #28

P: n/a
* "Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
I'm sure that if I spent enough time looking around I'd find some document
that suggests that you should not use inline replies since that causes the
reader to unnecessarily scroll through the message to see your responses.


I am waiting for a link...

EOT

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #29

P: n/a
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
The Introduction of that Documentation contains the following
phrase:

[Please do not consider this to be a "regulatory" document ("Thou
shalt do it this way because we say so!"), but rather as an
"advocacy" document]


If you'd understand the content, you'd see why it *makes sense* to follow
the suggestions even *without* being forced.
--
Armin

Nov 20 '05 #30

P: n/a
Even with all that content my message was only 17KB. Most slow users have a
56Kbps connection so it would only take 2 secs. I don't see that as a
problem for anyone who really wants the answer supplied in the message.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bn*************@ID-208219.news.uni-berlin.de...
* "Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
That's a choice as far as I am concerned. You could always not download my message at all.


This will require a lot of time. I don't want to _read_ every message
_before_ downloading it... This won't work.
For those of you using automated Newsreaders I am sure you
can set up a Macro so that you do not download any message greater in size than 2KB.


I will loose lots of interesting messages when doing that.
I will continue to include the whole message as that is a
preference of mine. If you are not capable of adding a macro then add me to your Blocked Senders list, I won't be offended.


I appreciate your comments, but don't forget users with a really slow
internet connection. Make their life easier.

:-)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #31

P: n/a
* "Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
Even with all that content my message was only 17KB. Most slow users have a
56Kbps connection so it would only take 2 secs. I don't see that as a
problem for anyone who really wants the answer supplied in the message.


I only know if I want the message _after_ reading it. But I see, there
are people who don't want to learn...

EOT

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #32

P: n/a
You said: EOT. (although you conveniently cut that part out of your reply).

"Armin Zingler" <az*******@freenet.de> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
The Introduction of that Documentation contains the following
phrase:

[Please do not consider this to be a "regulatory" document ("Thou
shalt do it this way because we say so!"), but rather as an
"advocacy" document]


If you'd understand the content, you'd see why it *makes sense* to follow
the suggestions even *without* being forced.
--
Armin

Nov 20 '05 #33

P: n/a
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
Even with all that content my message was only 17KB.
It would have been < 1 KB without the full quote.
Most slow users
have a 56Kbps connection so it would only take 2 secs. I don't see
that as a problem for anyone who really wants the answer supplied in
the message.


It's not the 2 secs or the 17KB. If everybody would make a fullquote it
takes 17 minutes (16 of them useless) instead of 1. Do you see the differnce
now?
--
Armin

Nov 20 '05 #34

P: n/a
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
You said: EOT. (although you conveniently cut that part out of your
reply).


There's was some hope left. ;-)
--
Armin

Nov 20 '05 #35

P: n/a
And if they only downloaded the last message there would be no need to
download the previous 16.
Now how many 1 or 2 kb messages have you and the gang submitted over the
last month that serve no purpose other than to Flame those of us trying to
help out. Those poor users with slow connections who have decided that they
can download the content of every message instead of just the headers, have
had to download Mbytes of messages that relate to nothing but Nannying.

"Armin Zingler" <az*******@freenet.de> wrote in message
news:en**************@TK2MSFTNGP09.phx.gbl...
"Mick Doherty" <md*******@nospam.ntlworld.com> schrieb
Even with all that content my message was only 17KB.
It would have been < 1 KB without the full quote.
Most slow users
have a 56Kbps connection so it would only take 2 secs. I don't see
that as a problem for anyone who really wants the answer supplied in
the message.


It's not the 2 secs or the 17KB. If everybody would make a fullquote it
takes 17 minutes (16 of them useless) instead of 1. Do you see the

differnce now?
--
Armin

Nov 20 '05 #36

P: n/a
* "Mick Doherty" <md*******@nospam.ntlworld.com> scripsit:
And if they only downloaded the last message there would be no need to
download the previous 16.
Now how many 1 or 2 kb messages have you and the gang submitted over the
last month that serve no purpose other than to Flame those of us trying to
help out. Those poor users with slow connections who have decided that they
can download the content of every message instead of just the headers, have
had to download Mbytes of messages that relate to nothing but Nannying.


*PLONK*

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #37

This discussion thread is closed

Replies have been disabled for this discussion.