Home All Groups Group Topic Archive Search About

Window's Vista Controls

Author
27 Feb 2007 11:51 PM
BrianTa
Hi,

I have VS2005 running on Windows Vista, and all seems to operate just fine -
except the app I have created uses a scrollbar control added to a panel
control.  It operates correctly, but does not have the "look" of a Vista
scrollbar.  The RichTextBox I am using has Vista looking scrollbars, though
(hence they don't match). Can someone tell me what I need to do to make them
match (at least - and preferably to look like Vista SB's). I am currently
running (at least before the upgrade to Vista) .Net 2.0.  I don't know if I
need to add an extension to VS2005 or .....?

Thanks in advance!
-Brian

Author
28 Feb 2007 4:48 PM
RobinS
Do you have XP visual styles enabled? C# or VB:?

Robin S.
--------------------------
Show quote
"BrianTa" <bria***@hughes.net> wrote in message
news:OHkK7osWHHA.896@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I have VS2005 running on Windows Vista, and all seems to operate just
> fine - except the app I have created uses a scrollbar control added to a
> panel control.  It operates correctly, but does not have the "look" of a
> Vista scrollbar.  The RichTextBox I am using has Vista looking
> scrollbars, though (hence they don't match). Can someone tell me what I
> need to do to make them match (at least - and preferably to look like
> Vista SB's). I am currently running (at least before the upgrade to
> Vista) .Net 2.0.  I don't know if I need to add an extension to VS2005 or
> .....?
>
> Thanks in advance!
> -Brian
Author
28 Feb 2007 5:11 PM
BrianTa
Hi Robin,

Then app is written in C#.  And, to the best of my knowledge, I am doing
nothing special to sway the appearance from one style to the next.  I have
looked at the settings (and will relook again) - but I don't think I am
doing anything style specific.  There are a couple of odd things here.  One
is that the scrollbar looks like it is supposed to under the designer.  And
two, if I create a simple app (panel control with a vscrollbar beside it)
then the scrollbar looks as it should.  All this seems to tell me that I
have something (though I don't know what) set awry.

-Brian

Show quote
"RobinS" <RobinS@NoSpam.yah.none> wrote in message
news:1KmdnVLr7qLbL3jYnZ2dnUVZ_oqmnZ2d@comcast.com...
> Do you have XP visual styles enabled? C# or VB:?
>
> Robin S.
> --------------------------
> "BrianTa" wrote in message news:OHkK7osWHHA.896@TK2MSFTNGP05.phx.gbl...
>> Hi,
>>
>> I have VS2005 running on Windows Vista, and all seems to operate just
>> fine - except the app I have created uses a scrollbar control added to a
>> panel control.  It operates correctly, but does not have the "look" of a
>> Vista scrollbar.  The RichTextBox I am using has Vista looking
>> scrollbars, though (hence they don't match). Can someone tell me what I
>> need to do to make them match (at least - and preferably to look like
>> Vista SB's). I am currently running (at least before the upgrade to
>> Vista) .Net 2.0.  I don't know if I need to add an extension to VS2005 or
>> .....?
>>
>> Thanks in advance!
>> -Brian
>
>
Author
28 Feb 2007 8:14 PM
BrianTa
Just one extra bit of added info - it appears that any older pre-Vista
projects that I have, have this issue - and it's not just with the
scrollbars, it's with buttons (etc) as well - they show up great in design
mode, but look like the older style buttons upon execution.

Show quote
"BrianTa" <icu2oo@NoSpam.net> wrote in message
news:%234cgMu1WHHA.3568@TK2MSFTNGP06.phx.gbl...
> Hi Robin,
>
> Then app is written in C#.  And, to the best of my knowledge, I am doing
> nothing special to sway the appearance from one style to the next.  I have
> looked at the settings (and will relook again) - but I don't think I am
> doing anything style specific.  There are a couple of odd things here.
> One is that the scrollbar looks like it is supposed to under the designer.
> And two, if I create a simple app (panel control with a vscrollbar beside
> it) then the scrollbar looks as it should.  All this seems to tell me that
> I have something (though I don't know what) set awry.
>
> -Brian
>
> "RobinS" <RobinS@NoSpam.yah.none> wrote in message
> news:1KmdnVLr7qLbL3jYnZ2dnUVZ_oqmnZ2d@comcast.com...
>> Do you have XP visual styles enabled? C# or VB:?
>>
>> Robin S.
>> --------------------------
>> "BrianTa" wrote in message news:OHkK7osWHHA.896@TK2MSFTNGP05.phx.gbl...
>>> Hi,
>>>
>>> I have VS2005 running on Windows Vista, and all seems to operate just
>>> fine - except the app I have created uses a scrollbar control added to a
>>> panel control.  It operates correctly, but does not have the "look" of a
>>> Vista scrollbar.  The RichTextBox I am using has Vista looking
>>> scrollbars, though (hence they don't match). Can someone tell me what I
>>> need to do to make them match (at least - and preferably to look like
>>> Vista SB's). I am currently running (at least before the upgrade to
>>> Vista) .Net 2.0.  I don't know if I need to add an extension to VS2005
>>> or .....?
>>>
>>> Thanks in advance!
>>> -Brian
>>
>>
>
Author
1 Mar 2007 5:07 AM
RobinS
In VB, there is an option on the project properties screen that allows you
to enable the XP Visual Styles. I believe in C#, you have to do this in the
Main program where you start up your application.

I think it's something like Application.EnableVisualStyles. You can use the
ObjectBrowser to check for sure.

My theory would be if you enable it, it will fix your Vista-display
problem. My guess would be it doesn't mean XP per se, but XP versus
Windows2000 or WindowsNT style, so if you upgraded to Vista, I'd think it
would tell whether to show the controls in the newest style, i.e. Vista.

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
-----------------------------------------------
Show quote
"BrianTa" <icu2oo@NoSpam.net> wrote in message
news:%234cgMu1WHHA.3568@TK2MSFTNGP06.phx.gbl...
> Hi Robin,
>
> Then app is written in C#.  And, to the best of my knowledge, I am doing
> nothing special to sway the appearance from one style to the next.  I
> have looked at the settings (and will relook again) - but I don't think I
> am doing anything style specific.  There are a couple of odd things here.
> One is that the scrollbar looks like it is supposed to under the
> designer.  And two, if I create a simple app (panel control with a
> vscrollbar beside it) then the scrollbar looks as it should.  All this
> seems to tell me that I have something (though I don't know what) set
> awry.
>
> -Brian
>
> "RobinS" <RobinS@NoSpam.yah.none> wrote in message
> news:1KmdnVLr7qLbL3jYnZ2dnUVZ_oqmnZ2d@comcast.com...
>> Do you have XP visual styles enabled? C# or VB:?
>>
>> Robin S.
>> --------------------------
>> "BrianTa" wrote in message news:OHkK7osWHHA.896@TK2MSFTNGP05.phx.gbl...
>>> Hi,
>>>
>>> I have VS2005 running on Windows Vista, and all seems to operate just
>>> fine - except the app I have created uses a scrollbar control added to
>>> a panel control.  It operates correctly, but does not have the "look"
>>> of a Vista scrollbar.  The RichTextBox I am using has Vista looking
>>> scrollbars, though (hence they don't match). Can someone tell me what I
>>> need to do to make them match (at least - and preferably to look like
>>> Vista SB's). I am currently running (at least before the upgrade to
>>> Vista) .Net 2.0.  I don't know if I need to add an extension to VS2005
>>> or .....?
>>>
>>> Thanks in advance!
>>> -Brian
>>
>>
>
Author
1 Mar 2007 5:58 AM
BrianTa
You're a genius! That took care of the issue.

The calls to...

Application.EnableVisualStyles();                                    // and
Application.SetCompatibleTextRenderingDefault(false);

....are being generated at initial program creation .  All my new projects
have this added - the old ones don't.
I don't know how I missed it.... but glad you caught it.

Thanks again,
-Brian

Show quote
"RobinS" <RobinS@NoSpam.yah.none> wrote in message
news:qaCdnfFf7uEJwnvYnZ2dnUVZ_vupnZ2d@comcast.com...
> In VB, there is an option on the project properties screen that allows you
> to enable the XP Visual Styles. I believe in C#, you have to do this in
> the Main program where you start up your application.
>
> I think it's something like Application.EnableVisualStyles. You can use
> the ObjectBrowser to check for sure.
>
> My theory would be if you enable it, it will fix your Vista-display
> problem. My guess would be it doesn't mean XP per se, but XP versus
> Windows2000 or WindowsNT style, so if you upgraded to Vista, I'd think it
> would tell whether to show the controls in the newest style, i.e. Vista.
>
> Robin S.
> Ts'i mahnu uterna ot twan ot geifur hingts uto.
> -----------------------------------------------
> "BrianTa" <icu2oo@NoSpam.net> wrote in message
> news:%234cgMu1WHHA.3568@TK2MSFTNGP06.phx.gbl...
>> Hi Robin,
>>
>> Then app is written in C#.  And, to the best of my knowledge, I am doing
>> nothing special to sway the appearance from one style to the next.  I
>> have looked at the settings (and will relook again) - but I don't think I
>> am doing anything style specific.  There are a couple of odd things here.
>> One is that the scrollbar looks like it is supposed to under the
>> designer.  And two, if I create a simple app (panel control with a
>> vscrollbar beside it) then the scrollbar looks as it should.  All this
>> seems to tell me that I have something (though I don't know what) set
>> awry.
>>
>> -Brian
>>
>> "RobinS" <RobinS@NoSpam.yah.none> wrote in message
>> news:1KmdnVLr7qLbL3jYnZ2dnUVZ_oqmnZ2d@comcast.com...
>>> Do you have XP visual styles enabled? C# or VB:?
>>>
>>> Robin S.
>>> --------------------------
>>> "BrianTa" wrote in message news:OHkK7osWHHA.896@TK2MSFTNGP05.phx.gbl...
>>>> Hi,
>>>>
>>>> I have VS2005 running on Windows Vista, and all seems to operate just
>>>> fine - except the app I have created uses a scrollbar control added to
>>>> a panel control.  It operates correctly, but does not have the "look"
>>>> of a Vista scrollbar.  The RichTextBox I am using has Vista looking
>>>> scrollbars, though (hence they don't match). Can someone tell me what I
>>>> need to do to make them match (at least - and preferably to look like
>>>> Vista SB's). I am currently running (at least before the upgrade to
>>>> Vista) .Net 2.0.  I don't know if I need to add an extension to VS2005
>>>> or .....?
>>>>
>>>> Thanks in advance!
>>>> -Brian
>>>
>>>
>>
>
>
Author
1 Mar 2007 7:34 AM
RobinS
Cool. I'm glad it worked for you!

Robin S.
------------------------------
Show quote
"BrianTa" <icu2oo@NoSpam.net> wrote in message
news:u9wRpa8WHHA.1016@TK2MSFTNGP04.phx.gbl...
> You're a genius! That took care of the issue.
>
> The calls to...
>
> Application.EnableVisualStyles();                                    //
> and
> Application.SetCompatibleTextRenderingDefault(false);
>
> ...are being generated at initial program creation .  All my new projects
> have this added - the old ones don't.
> I don't know how I missed it.... but glad you caught it.
>
> Thanks again,
> -Brian
>
> "RobinS" <RobinS@NoSpam.yah.none> wrote in message
> news:qaCdnfFf7uEJwnvYnZ2dnUVZ_vupnZ2d@comcast.com...
>> In VB, there is an option on the project properties screen that allows
>> you to enable the XP Visual Styles. I believe in C#, you have to do this
>> in the Main program where you start up your application.
>>
>> I think it's something like Application.EnableVisualStyles. You can use
>> the ObjectBrowser to check for sure.
>>
>> My theory would be if you enable it, it will fix your Vista-display
>> problem. My guess would be it doesn't mean XP per se, but XP versus
>> Windows2000 or WindowsNT style, so if you upgraded to Vista, I'd think
>> it would tell whether to show the controls in the newest style, i.e.
>> Vista.
>>
>> Robin S.
>> Ts'i mahnu uterna ot twan ot geifur hingts uto.
>> -----------------------------------------------
>> "BrianTa" <icu2oo@NoSpam.net> wrote in message
>> news:%234cgMu1WHHA.3568@TK2MSFTNGP06.phx.gbl...
>>> Hi Robin,
>>>
>>> Then app is written in C#.  And, to the best of my knowledge, I am
>>> doing nothing special to sway the appearance from one style to the
>>> next.  I have looked at the settings (and will relook again) - but I
>>> don't think I am doing anything style specific.  There are a couple of
>>> odd things here. One is that the scrollbar looks like it is supposed to
>>> under the designer.  And two, if I create a simple app (panel control
>>> with a vscrollbar beside it) then the scrollbar looks as it should.
>>> All this seems to tell me that I have something (though I don't know
>>> what) set awry.
>>>
>>> -Brian
>>>
>>> "RobinS" <RobinS@NoSpam.yah.none> wrote in message
>>> news:1KmdnVLr7qLbL3jYnZ2dnUVZ_oqmnZ2d@comcast.com...
>>>> Do you have XP visual styles enabled? C# or VB:?
>>>>
>>>> Robin S.
>>>> --------------------------
>>>> "BrianTa" wrote in message
>>>> news:OHkK7osWHHA.896@TK2MSFTNGP05.phx.gbl...
>>>>> Hi,
>>>>>
>>>>> I have VS2005 running on Windows Vista, and all seems to operate just
>>>>> fine - except the app I have created uses a scrollbar control added
>>>>> to a panel control.  It operates correctly, but does not have the
>>>>> "look" of a Vista scrollbar.  The RichTextBox I am using has Vista
>>>>> looking scrollbars, though (hence they don't match). Can someone tell
>>>>> me what I need to do to make them match (at least - and preferably to
>>>>> look like Vista SB's). I am currently running (at least before the
>>>>> upgrade to Vista) .Net 2.0.  I don't know if I need to add an
>>>>> extension to VS2005 or .....?
>>>>>
>>>>> Thanks in advance!
>>>>> -Brian
>>>>
>>>>
>>>
>>
>>
>

AddThis Social Bookmark Button