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

Home Posts Topics Members FAQ

Vertical scroll position of a rich textbox control

Ted
I am trying to return the vertical scroll position of a rich textbox
control using Access 2000. It seems to work for the horizontal scroll
bar, but not the vertical. Code follows:

Option Explicit
Private Declare Function GetScrollPos Lib "user32" (ByVal hwnd As
Long, ByVal nBar As Long) As Long
Private Declare Function GetFocus Lib "user32" () As Long
Private Const SB_VERT = 0
'****************some event
Dim lPosition As Integer
Dim lHandle As Long
Me.axcEsign.SetFocus
lHandle = GetFocus()
'MsgBox lHandle

lPosition = GetScrollPos(lHandle, SB_VERT)
MsgBox lPosition

Any ideas?
Thanks
Nov 13 '05 #1
1 4912
If I remember correctly, GetFocus would return the handle for the
ActiveX reflector window and not handle for the RTF window itself. Just
use the hWnd property exposed by the RTF control itself.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Ted" <st******@ceva.net> wrote in message
news:39**************************@posting.google.c om...
I am trying to return the vertical scroll position of a rich textbox
control using Access 2000. It seems to work for the horizontal scroll
bar, but not the vertical. Code follows:

Option Explicit
Private Declare Function GetScrollPos Lib "user32" (ByVal hwnd As
Long, ByVal nBar As Long) As Long
Private Declare Function GetFocus Lib "user32" () As Long
Private Const SB_VERT = 0
'****************some event
Dim lPosition As Integer
Dim lHandle As Long
Me.axcEsign.SetFocus
lHandle = GetFocus()
'MsgBox lHandle

lPosition = GetScrollPos(lHandle, SB_VERT)
MsgBox lPosition

Any ideas?
Thanks


Nov 13 '05 #2

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

Similar topics

0
by: David Pratt | last post by:
Hi. I am putting together a database application on Zope. I have built a pager for my records (20 per page) but do not want the browser scroll bars to reset to the top of the browser each time the...
0
by: Sachin | last post by:
How to match the look and feel of vertical scroll bar with the inbuilt vertical scroll bars of some controls like PrintPreviewControl, Rich Text box , etc. Their scroll bars look blue where the...
6
by: Rachel Suddeth | last post by:
I have the index of a line in the Lines array of a RichTextBox. I would like to have it scroll so that line displays at the top. Is there no way to do this? The only way I can see to make it...
1
by: JC | last post by:
I'm sure you've all seen the save scroll position from 4 guys from rolla which can be found here > http://aspnet.4guysfromrolla.com/articles/111704-1.aspx BUT try to get that to work AND still be...
7
by: bienwell | last post by:
Hi, I'm using the CheckBoxList control in ASP.NET for Web development. This checkboxlist is bound by the database. If we have more items for this checkbox list, it takes space on the page. I...
0
by: billy_cormic | last post by:
Hello, I am currently using Visual Studio 2005 for a project and I am attempting to employing the new treeview control using VB.net. I have placed the treeview on top of a panel and have enabled...
2
by: Sean Liming \(MVP\) | last post by:
I have a communication program using the SerialPort control. The application performs the serial read in sPort_DataReceived thread and data is displayed in a RichTextBox using the callback/invoke...
7
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client...
8
by: ayamopamo | last post by:
Hi- I am trying to center a web page. It seems like this should be very simple to do, but apparently it isn't my day. I have successfully centered the background by calling it in the css body tag:...
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...
0
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,...
0
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...
0
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,...
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?

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.