Groups | Blog | Home
all groups > vb.net controls > june 2006 >

vb.net controls : Textbox scrollbar


J Y
6/8/2006 10:56:44 AM
I'm building a window form with VB.net. The purpose of this app is to show
some legal terms in a text box and users will accept or deny the terms.
Similar to the one when installing software. There is a feature I want to
implement but still out of luck after a day of researching and testing.

The text box is a not large enough to display the pages long text. So I
enabled the vertical scrollbar. How do I know if the scrollbar is moved to
the bottom of the textbox so it triggers the enabling of accept/cancel
buttons? The control does not give me any coordinates, max, min, etc values
or other events to use.

THanks
JY

GhostInAK
6/8/2006 11:05:11 PM
Hello J,

I agree with Herfried in both respects. While technically possible, this
is a terrible idea. Windows 2000 tried to do this with their OS installer.
All it did was make people hold down the PgDn button for a second or two
before hitting the key to proceed. There is simply NO practical way of forcing
someone to read a EULA. And why would you want to? Are you a control freak?
A EULA is there to cover yer ass. Who cares if the user read it as long
as it was presented to them.

-Boo

[quoted text, click to view]

Herfried K. Wagner [MVP]
6/9/2006 12:09:09 AM
"J Y" <jasperyue@msn.com> schrieb:
[quoted text, click to view]

Maybe this is possible by overriding the textbox' 'WndProc' method and
handling 'WM_VSCROLL', and then using 'GetScrollInfo' to determine the
current scroll position. However, I don't think that it is very
user-friendly to let users scroll down the textbox in order to enable
buttons.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
AddThis Social Bookmark Button