Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scroll an MSAccess form continuosly using SendMessage

Status
Not open for further replies.

SmrRyan

Technical User
Jan 20, 2010
10
0
0
AU
Hi,
I wonder if some careful examiner of the bounds in which we must work has figured out SendMessage!

I would like to be able to make use of the SendMessage API call to get an MSAccess form to scroll continuously.

I've been able to achieve a similar outcome using VB, but VB has a built-in command for getting a form (or a control) to scroll in this way. What I'm trying for is a pixel-wise scroll. A bit like when you click your mouse-wheel, then drag it a touch to get a slow screen-scroll. In VB, I placed an large Image control within a smaller Panel control. Then i hooked up some code to scroll the panel, leading to a smooth scrolling of the contained image, which is actually my aim here .. scrolling of an image.

In MSAccess, it would perhaps also be OK if I could scroll an image control, but not sure that Image controls ever even have scroll bars or scroll ability ... nor if it is possible to contain an image control within some kind of containing control, and to scroll the containing control.

There's a fair bit or material on the web about SendMessage, and almost all the time I can find the solutions to my questions in the 'history' of so many questions posed and so many solutions provided. But somehow sendMessage has me puzzled.

Many thanks if anyone can show how to achieve this, or even if someone can declare definitely that it is not possible ... (in VBA).

SMR
 

Hi,

There are amny MS Access Forums, one of which is forum702.

I'm sure that you'll get the proper attention in one of them.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Oh, ok -- this vba forum a bit too general when it can be nailed down to an access forms Q.

Nice if there was a way to 'reclassify' the thread but can't a find a way. Guess I'll have to copy and paste ... And maybe dig up some example code. After all, think I managed to get SendMessage to give page-wise scrolling of a form, so it was just the pixel-wise to figure out.

Thanks for that

SMR
 
I'm thinking maybe to not bother with this now.

Decided that instead of scrolling the form (and the contained image), I could just 'scroll' a control down the form, continually setting focus to it.

Used a command button (1mm x 1mm to keep it out the way) called cmdForAutoScroll, and looped something like this:

cmdForAutoScroll.Top = cmdForAutoScroll.Top + 1
cmdForAutoScroll.SetFocus


If anyone else ever seeks to try the smooth scroll with Access, this works fairly well, plus it means you
get auto scroll without even needing to have scroll bars.

The command button slides down the page a bit faster than snail-pace (adjustable of course) and thus moves the image.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top