scroll text in bar form caption

mohamedmatter

Registered User.
Local time
Today, 11:51
Joined
Oct 25, 2015
Messages
122
i want create move text in caption form move form frist bar to end move from right to left
 

Attachments

  • bandicam 2019-11-01 16-11-23-534.jpg
    bandicam 2019-11-01 16-11-23-534.jpg
    27.9 KB · Views: 226
Not quite clear what you are asking
In form design view, type your text in the caption property.
Unless your language settings prevent it, the form caption you type will then be shown on the left of the title bar.
If you leave the caption blank, it will show the form name
 
Colin,
I *think* the o/p wants to scroll the text from right to left.?

I'm sure you did exactly that with one of your forms a good while back? Is it called a Marquee effect?
 
Colin,
I *think* the o/p wants to scroll the text from right to left.?

I'm sure you did exactly that with one of your forms a good while back? Is it called a Marquee effect?
yes
i wants to scroll the text from right to left.?
that's rights
please hlp me
 
Colin,
I *think* the o/p wants to scroll the text from right to left.?

I'm sure you did exactly that with one of your forms a good while back? Is it called a Marquee effect?
Is this possible in the Form's caption (shown on the Title bar)?
 
Is this possible in the Form's caption (shown on the Title bar)?

Well I am not the expert of course, but if you have =Marquee("Text for title bar") in the caption property, would that not do it.?

I was thinking of the Auto_Title0 in the header as well.

I've just tried a simple function and it just show my formula =Marquee("Text")

However, could it not be done in VBA with timer and adjusting the text.?

A lot of work for effect I admit, but if that is what the o/p wants.?

This wil do it. Needs more work though.

Code:
Option Compare Database
Option Explicit
Public iPos As Integer


Private Sub Form_Load()
iPos = 1
End Sub

Private Sub Form_Timer()
Dim strText As String
strText = "                   This is a test"
Me.Caption = Mid(strText, iPos, Len(strText) - iPos)
iPos = iPos + 1
End Sub
 
Last edited:
So, if a Timer is involved, wouldn't that cause quite a bit of flicker? Just curious...
 
So, if a Timer is involved, wouldn't that cause quite a bit of flicker? Just curious...

Well the timer is not an event I have played with TBH, but a value of 500 seems OK.

At the end of the day, I am just offering a way that might be possible.?

It is up to the o/p if they think is is worth the effort.? and whether any flicker is soemthing they can live with.? Might even slow the form down.?
 
Right. I can't imagine working with a form that tries to interrupt what I'm doing every half a second. This requirement may or may not be fulfilled using VBA, but I think it's better served using some API instead. Personally, I would just avoid it. Just my 2 cents...
 
Right. I can't imagine working with a form that tries to interrupt what I'm doing every half a second. This requirement may or may not be fulfilled using VBA, but I think it's better served using some API instead. Personally, I would just avoid it. Just my 2 cents...

That would be my view as well. :D
 
Ah I understand now!
You can certainly scroll text from right to left in both textboxes & labels.
As already stated the effect is called marquee text
You can see this in the following example apps: Attention Seeking Database and Password Login.

However:
a) Marquee text should only be used sparingly to get users' attention. If on all the time, the effect is irritating.
b) I've never tried to do this in the form caption. Even though its possible I really wouldn't recommend it
 
Stephen Labans, as is frequently the case for matters complicated, has a hack for doing this that requires little in the way of resources, he says...and you can always take him at his word:

http://www.lebans.com/hscroller.htm

Linq ;0)>
 
Stephen Labans, as is frequently the case for matters complicated, has a hack for doing this that requires little in the way of resources, he says...and you can always take him at his word:

http://www.lebans.com/hscroller.htm

Linq ;0)>
Hi Linq. Thanks for the pointer. As I had suspected, it's better to use API for something like this. Good luck!
 
Stephen Labans, as is frequently the case for matters complicated, has a hack for doing this that requires little in the way of resources, he says...and you can always take him at his word:
http://www.lebans.com/hscroller.htm

Hi Linq. Thanks for the pointer. As I had suspected, it's better to use API for something like this. Good luck!

I've looked at the example database on Stephen's site and, as with all his work, its very clever.
However IMHO its totally over the top for this purpose

It also scrolls text in the Access window title bar NOT the form title bar

The attached example shows how a scrolling form header caption can be achieved using the same code as for marquee text with no API required. Its a borderless form ...so no title bar

attachment.php


Each scroll can be run separately or at the same time.
The scroll speed can also be adjusted to suit user preference.

I doubt the resource overhead is much different in Stephen's example (based on APIs) or this one - the issue in both apps would the side effects of running a form timer whilst doing other form activity

Speaking for myself, a scrolling header or title bar would annoy me intensely .... but if that's what the OP wants ....:D
 

Attachments

Last edited:
Updated version - this time also with scrollable form title bar caption - as originally requested by the OP.

attachment.php


As I said before, its not something I'd recommend but its easy enough to do ...all without using APIs

You can run each of the 3 items individually or together ...though I doubt anyone would ever actually want all 3 effects at the same time
 

Attachments

Users who are viewing this thread

Back
Top Bottom