Solved

Scrolling text up/down in a text box

Posted on 1998-08-29
2
169 Views
Last Modified: 2008-02-26
I'd like to make a scrolling marquee type of about box but am lost when it comes to scrolling text in a vertical motion and then refreshing it self and starting over again once the message as scrolled...ideas please. Thanks
0
Comment
Question by:smithgr
2 Comments
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 200 total points
ID: 1431772
Do something like this:

1. Add 5-7 blank lines into the edit box before the text, so it will show only the first line at the bottom of it, and then 5-6 blank lines after the text, so only 1 line will be shown at the top

2. Put this in a module:
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const EM_SCROLL = &HB5
Public Const SB_LINEDOWN = 1
Public Const SB_LINEUP = 0


3. Create a timer with the interval set to 300-500, depending on the size of the text


4.Put this in Timer1_Timer

Static N1 as integer
Dim I as integer
If N1='NumberOfLines  then
For I = 1 to 'NumberofLines
 SendMessage Text1.hwnd, EM_SCROLL, SB_LINEUP, 0
Next I
N1=0
End If


N1=N1+1
SendMessage Text1.hwnd, EM_SCROLL, SB_LINEDOWN, 0


Tell me if there are any problems

0
 
LVL 1

Author Comment

by:smithgr
ID: 1431773
Mike,

Thanks - I tried your suggestion but I didnt like the jumping of lines so what I did was to place a picture within a picture and place a label on that inner picture, I then scroll the inner picture within the outer picture which makes for smooth scrolling of the text - pictures and anything else placed on it. Thanks - your answer helped put me in the right direction.

Gary

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Mysql vs Oracle 10 120
DIR issue 7 47
MS Acccess - Update Field in Table when report is printed 6 37
Add a task in Outlook from access 11 32
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now