Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Vertical Marquee

    Does anyone know of a "vertical marquee" control or API that works with VBA5 (Word 97). I'd like to display credits and maybe play a tune while the credits scroll up the form.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Vertical Marquee

    Kevin,

    Why not just use a listbox to scroll the credits? Add an item at the bottom and take one off the top. I'll leave the tune to someone else. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Charlotte

  3. #3
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Kevin,

    Try this:
    <pre>Option Explicit
    Private mintMax As Integer

    Private strFameList() As String

    Private Sub Timer()
    Static i As Integer
    Dim strMsg As String
    'Dim j As Integer

    If i > (mintMax + 2) Then
    i = 0
    End If

    Select Case i
    Case 0
    strMsg = vbCrLf & vbCrLf & strFameList(i)
    Case 1
    strMsg = vbCrLf & strFameList(i - 1) & vbCrLf & strFameList(i)
    Case UBound(strFameList) + 1
    strMsg = strFameList(i - 2) & vbCrLf & strFameList(i - 1)
    Case UBound(strFameList) + 2
    strMsg = strFameList(i - 2)
    Case Else
    strMsg = strFameList(i - 2) & vbCrLf & strFameList(i - 1) & _
    vbCrLf & strFameList(i)
    End Select

    lblFame.Caption = strMsg

    i = i + 1

    End Sub

    Private Sub UserForm_activate()
    Dim datStart As Date
    mintMax = 6
    ReDim strFameList(mintMax + 2) As String
    strFameList(0) = "Proudly brought to you by a cast of thousands including:"
    strFameList(1) = "Gary Frieder"
    strFameList(2) = "Phil Rabichow"
    strFameList(3) = "Kevin"
    strFameList(4) = "Charlotte"
    strFameList(5) = "Leif"
    strFameList(6) = "Chris Greaves"
    strFameList(7) = "Rory"
    strFameList(8) = "and others too numerous to mention"

    Dim datDiff As Long
    datStart = Now
    Do
    datDiff = DateDiff("S", Now(), datStart)
    Debug.Print datDiff
    If datDiff < 0 Then
    Call Timer
    datStart = Now
    End If
    DoEvents
    Loop

    End Sub</pre>

    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Geoff,

    Ah, relief for the lazy!

    Did you go to all the trouble to make this just for me?

    I like it. Consider it plagiarized! Just for that I'm going to post my ProperCase function. It's highly specific (as only a useful ProperCase function can be), but the structure is useful to anyone needing real ProperCase without a database of words.

    Thanks!
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Speaking of scrolling marquees, have you seen the Show VB Credits easter egg in VBA?

    Now that was a nice piece of work. That's what I want...
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  6. #6
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Kevin,

    I had the seed available in VB- but with a timer control rather than a loop.

    You are welcome to use it, as long as you don't remove any of the names.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  7. #7
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Ok, man. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

    You all deserve credits in my app (which last week won a Microsoft award, btw). <img src=/S/yep.gif border=0 alt=yep width=15 height=15>

    Although I said I'd use it, I'm tweeking too much and looking again. I forget how to get the Show VB Credits easter egg to display, but that's the kind of credits marquee I'm looking for. Anyway, no biggie.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  8. #8
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    How might I convert this to a horizontal marquee?

    Thanks!
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  9. #9
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Drk,

    It's probably a lot simpler with a horizontal marquee. You'd probably just have a single long screen, and at a set interval, take the first character and put it at the end of the string. You wouldn't then need that long select.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  10. #10
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Jeddah, Saudi Arabia
    Posts
    243
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Vertical Marquee

    Kevin,

    I knocked this VB6 program up at work while the boss wasn't looking. What am I saying, I am the boss. LOL

    It uses the ScrollWindowEx API call to scroll a picture up a frame on a form. I hope it helps.

    I hope it will work with Word 97 VBA. As far as I can tell, there's no reason it won't but I'm afraid I can't test it as I don't have Word 97.

    At least I think it will be a good starting point for you.

    The test picture I used is in the Zip file. You will have to alter the picture property of the Picturebox control to point to wherever you store the picture. Then run the test.

    Cheers,

    Kevin Bell
    Attached Files Attached Files

  11. #11
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Geoff, I loved the idea of this sub, but when I pulled it into a blank userform with just a list box on it to try it out, the compiler stopped and said that 'call timer' was an invalid use of property. Taking the 'call' out got the same response on 'timer'. What am I missing here? I'm using Word97, by the way.
    Beryl M


  12. #12
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Don't worry, ignore me - I only had half the code! Brain not working yet this morning ...
    Beryl M


  13. #13
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Geoff, it's great! Only one question - when I run this, whether by using userform.show in the immediate window or by running a macro, then close it, the code is still running in the background and I have to go into the VBE and click stop. Is there a line I could add to tell it to stop when it's no longer open, and if so, what precisely do I tell to stop and how? Timer.stop doesn't seem to do it, nor datdiff.stop ...

    Many thanks for your help
    Beryl M


  14. #14
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    Beryl,

    Six months later- that's stretching a little.

    I can't reproduce right now. But I'd put maybe something into, for instance, a click event on the form which set a module-level variable. Then put something into the "Timer" module which aborted itself if the module level variable was set.

    Does that mean something?
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  15. #15
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Vertical Marquee

    <img src=/S/blush.gif border=0 alt=blush width=15 height=15> Oops - sorry - didn't notice the date of your post, the latest post on the thread was only a few days ago and it was therefore at the top of the list!

    And nope, I'm afraid that lot went straight over my head! <img src=/S/doh.gif border=0 alt=doh width=15 height=15> But I'll keep a note and see if I can track down what you mean.

    Ta muchly
    Beryl M


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •