473,473 Members | 4,297 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VScrollBar Style Inconsistencies

I have two apps, both developed using the same VBE, and both having a
VScrollBar, but the two VScrollBars have very different styles. (In the
screen shot, which I had hoped to attach but can't, one appears on the left
and the other appears on the right. But, even without the screen shot,
referring to the two cases as the "left case" and the "right case" seems to
make as much sense as any other way of distinguishing the two cases. So
I'll stick with that.) In the one case, on the left, the VScrollBar uses a
baby blue and
white color scheme and rounded corners. To me it has a more modern
appearance than the one on the right, which uses a beige and light beige
color scheme and square corners.

In both cases the VScrollBars are on a usercontrol which inherits from
UserControl. (I don't know why I do that other than an assumption that
UserControl must exist so that user controls can inherit from it.) In both
cases the VScrollBars are instantiated by a "Dim vsb As New VScrollBar" in
the Class. In both cases the constructor of the usercontrol uses the
following code to place and display the VScrollBar ...

vsb.Location = New Point(Me.Width - vsb.Width, 0)
vsb.Height = Me.Height
vsb.Enabled = True
vsb.Show()
Controls.Add(vsb)

In the case on the right, although it is not obvious, the text "label text"
results from a Label which is also part of the usercontrol. But removing it
makes no difference. In the case on the left the usercontrol contains only
the VScrollBar and the form contains only the usercontrol. In the case on
the right the usercontrol contains only the VScrollBar and a Label but the
usercontrol is on a somewhat "busy" form - i.e. it contains a number of
controls.

I've found a lot of previous discussion about differing styles for
VScrollBars in different circumstances. But my VScrollBars occur in the
same circumstances! One of the earlier posts, although it didn't explain my
problem, contained a URL I'd like to look at but the link no longer works.
(It's appended below.)

I'll be grateful for any insight anyone can provide.

Thanks, Bob

=====================================

To apply XP theme to your application, you may just simply bind your
controls to Comctl32.dll version 6.0 (it's so great that no additional code
needed). Here is an article on this topic from MSDN, which described it in
detailed. You may get it from the link below:
Using Windows XP Visual Styles With Controls on Windows Forms
http://msdn.microsoft.com/library/en...ml/vbtchUsingW...
PVisualStylesWithControlsOnWindowsForms.asp
Please Note: it is not all controls support XP visual style. However
ScrollBars supports :)
I hope this information helps you.
Best regards,
Lion Shi [MSFT]
MCSE, MCSD
Microsoft Support Engineer
Sep 29 '08 #1
1 1728
"eBob.com" <eB******@totallybogus.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>
I've found a lot of previous discussion about differing styles for
VScrollBars in different circumstances. But my VScrollBars occur in the
same circumstances! One of the earlier posts, although it didn't explain
my
problem, contained a URL I'd like to look at but the link no longer works.
(It's appended below.)

I'll be grateful for any insight anyone can provide.

Thanks, Bob
Yeah, MSDN can't seem to leave well enough alone.... I guess they don't have
the tools it requires to keep their page URLs from constantly changing...
or, could be some hotdog with a "better idea" changing everything... who
knows.

Next time you find a broken link (which will be fairly often), just hit
google. You can find MSDN articles with google faster than using MS's search
(which usually leads you in circles, right back to the broken link)

I googled for the exact phrase "Visual Styles With Controls On Windows
Forms" (basically, the broken URL with spaces added) and came up with
this....

Using Windows XP Visual Styles With Controls on Windows Forms
http://msdn.microsoft.com/en-us/library/aa289524.aspx

Note that article's from 2002, so who knows what good it'll do. You'd think
that, with the huge framework and the time they've had to straighten these
things out, any "XP Styles" issues would be a thing of the past by now.
Sep 30 '08 #2

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

Similar topics

0
by: Gawelek | last post by:
I would like to "cheat" VScrollBar in DataGrid. That means I want to link for example DataTable with 50 rows to DataGrid. But I want, that VScrollBar looks as if DataTable contains for example...
1
by: Durand | last post by:
Hi all, I'm trying to create a vScrollBar with a dynamic value. When I change the maximum value inside a method, it works inside a method, but when I leave this method the maximum value returns...
1
by: Dmitri Shvetsov | last post by:
Hi All, Did somebody play with vScrollBar in C#? I've got a small trouble. When I assign the Maximum value and try to move the slider of the vScrollBar to a maximum position I can't get the...
2
by: Hans [DiaGraphIT] | last post by:
Hi! In a windowsapplication i have a datagrid where I dont want the vertical scrollbar to be visible. I can't find HorizontalScrollBar and VerticalScrollBar properties anywhere. I've tried...
0
by: bleedledeep | last post by:
I have a DataGrid that ends up with a VScrollBar due to the number of rows, and the behavior I want is for the bottom-most row of the DataGrid to be shown, i.e., I want the VScrollBar all the way...
2
by: Sascha Schmidt | last post by:
Hello ! I'm trying to combine an external (not part of the panel) vertical scrollbar (VScrollBar) with a panel in order to scroll the content of the panel vertically using the external ...
8
by: Darren Dale | last post by:
I was just searching for some guidance on how to name packages and modules, and discovered some inconsistencies on the www.python.org. http://www.python.org/doc/essays/styleguide.html says "Module...
1
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm using the System.Windows.Forms.VScrollBar on my form. I'm handling VScrollBar Scroll event. I want to handle the Up, Down, PageUp PageDown keys for this VScrollBar, but when I register to...
0
by: Longkhi | last post by:
Hi everybody. I have quite a problem with the vscrollbar component. The control I'm using has a built-in scrollbar, but I have 5 of those controls, and I would like to bind the external...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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

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