473,782 Members | 2,485 Online
Bytes | Software Development & Data Engineering Community
+ 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(vs b)

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...
PVisualStylesWi thControlsOnWin dowsForms.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 1742
"eBob.com" <eB******@total lybogus.comwrot e in message
news:%2******** ********@TK2MSF TNGP05.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
1133
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 100 or 1000 rows. Is it possible to do ? I tried by Maximum properties, but it seems not to work. Gawel
1
1273
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 to previous value. My vScrollBar is not declared inside any method. Thanks Durand
1
5160
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 maximum value from a vScrollBar.Value. I can assume that to correct this problem is easy. I'm sure that's it's a bug, the developers didn't think about the width of the slider and this width is excluded from the vScrollBar total length, so we're...
2
1984
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 to create controls for this... without luck. Here is the code I'm using. Please tell me what I'm doing wrong. this.InitializeScrollBar(DataGrid1)
0
1271
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 to the bottom (maximum). I grab and set the VScrollBar using the following: if ( historyDataGrid.Controls is VScrollBar ) { VScrollBar vsb = (VScrollBar)historyDataGrid.Controls;
2
6019
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 VScrollbar. I can't set the "AutoScroll"-property to true and then use the generated scrollbars inside the panel, because i have to use this external scrollbar which is a modified/customized scrollbar, and doesn't look like a standard scrollbar.
8
1424
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 names can be either MixedCase or lowercase." That page also refers to PEP 8 at http://www.python.org/dev/peps/pep-0008/, which says "Modules should have short, all-lowercase names. ... Python packages should also have short, all-lowercase names...
1
2400
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 the keyDown and KeyPress events, it never gets there. So I also handled the key events of the form and from there I forwarded the event to the VScrollBar corresponding event, but still the VScrollBar events in never invoked. What should I do so...
0
1102
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 vscrollbar to scroll them all synchronically. I have tried several other methods such as the wndProc override method. It didn't work, so I'm trying this alternative method.
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10080
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9944
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.