473,775 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Finding position of horizontal scroll bar VB.net

LegalIT
15 New Member
Hello,

I have an application that loads a set of database records into memory. I then have buttons to move to the first, next, previous or last record.

I would like to add a horizontal scroll bar so that the user can skip around; to the middle, towards the end, etc. I'm not sure what event to use to allow a user to move the scroll bar but then capture the value when the mouse button is released. When I try MouseCaptureCha nged it stops the whole time. When I try MouseLeave it doesn't stop until the mouse is moved instead of when the mouse button is released.

Any suggestions would be greatly appreciated.

LegalIT
Mar 4 '08 #1
1 3474
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

In VB6, ScrollBar is programmed like this:
Set Min and Max Values , In your case, it would be : 0 and RecordCount.
SmallChange =1, LargeChange=10 (Or Depending on the Data Volume)

and write the code in Change Evnet of the scroll bar..
ScrollBar.Value >> gives the position.

It should be the same in VB.net, I have not checked..

REgards
Veena
Mar 5 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2889
by: Nishant | last post by:
I have a combo box with a horizontal scroll bar. (Used SetHorizontalExtent) The dropdown with horizontal scroll bar works fine when I have more items in the dropdown list. However when the number of items is less, the horizontal scroll bar comes over the last item. If there is only one item, I am not able to see that item because of Horizontal scroll.
2
7524
by: Boaz Ben-Porat | last post by:
Hi all Is there a way to simulate a click on a scrollbar (horizontal) of a FataGrid ? I need to programmatically scroll the grid to the right/left upon some condition, when the total width of the grid columns is greater then the grid`s rectangle. TIA
2
4541
by: Tina | last post by:
Am I missing something or does the listbox web control not have a horizontal scroll capability? Thanks, T
2
2784
by: Grant Smith | last post by:
I am currently trying to expand upon the default datagrid control using VB.NET. I have noticed one quirk about it that I cna't seem to get around. If I have a datagrid that doesn't display all of the columns (say the grid is only big enough to display 2 and there are 3 columns total). If you go to the last column (so 3 of 3 in this example) and scroll either up from the top cell being displayed in the datagrid or down from the bottom...
5
10182
by: RobertK | last post by:
I have a table that displays one row of images (thumbnails). When a user clicks on an image it opens up a bigger image below it. The row has about 20 cells. I have a <divtag which allows the user to scroll left and right to see all the images. The problem is that when the user scrolls to the middle and clicks on the image. The click causes a post back and the page loads again and the scroll bar goes to the left. I need to know how to...
1
9107
by: amuven | last post by:
Hi All, I need to put a horizontal scroll bar for 4 cells alone where my first cell in table should not contain any horizontal scroll bar . In clear, let us say there are 5 columns in my table i want to put horizontal scroll bar only for 2nd,3rd,4th and 5th column alone where my 1st column should not horizontal scroll bar . so that I can scroll only last 4 columns . Please some one provide me sample code as early as possible in doing...
1
4887
by: nityaprakash | last post by:
Hi, I am displaying asp.net datagrid in DIV tag. I have specified following css to DIV. ..divBox { border:solid 1px black; min-width : 150px max-height : 150px;
1
4362
by: newbie009 | last post by:
How can I disable horizontal scroll in textbox for FireFox? Right now 1 textbox has vertical scroll and other textbox has horizontal scroll. It only looks like this on FireFox but it looks ugly. http://jumbofiles.com/example.gif I used this code but it only worked for IE not FireFox: style="overflow: scroll; overflow-y: scroll; overflow-x: hidden; overflow:-moz-scrollbars-vertical;" Basically I want only vertical scroll.
0
1667
by: shanteshk | last post by:
Hi I have developed ab application in which I fecing an Issue when I browse in Google chrome i.e The Horizontal scroll bar in not appearing in an application when applicatin page size gets wider than the screen size. I am getting the Vertical scroll bar and Horizantal scroll bar when I browse it all browser , except the Horizontal missing in google chrome but getting Verticle scroll bar in chrome Regards Shantesh Kulkarni
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10268
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...
0
10107
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10048
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
9916
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...
0
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5360
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
5486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4017
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

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.