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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

News Ticker for windows

Status
Not open for further replies.

simeybt

Programmer
Nov 3, 2003
147
GB
All,
I have a new project on the horizon. What I have been requested is to develop a windows News ticker that is displayed at the bottom of the window. I had a look into this a developed a prototype using XML, JavaScript and HTML. It now turns out that I cant customise the web page as much as I would like and have decided to develop in VB. Could anyone tell me if it is possible to developed a ticker tape application using VB. I want the ticker tape to be displayed just above the task bar and to be on top all the time I would also like any application resized above the ticker tape.

Any information at all to get me started would be greatly appreciated. I’ve been googling this for hours and have only really got back JavaScript/Html examples. I think I need mine to be a stand alone application

Simon
 
i believe this was strongms example but i cant find the thread... dont know how helpful it is but....

(form 2 picture boxes a timer and a command button)
Code:
Option Explicit

Private RightMargin As Long
Private LeftMargin As Long
Private DisplayText As String

Private Sub Command1_Click()
    EnableScroller "Though yet of Hamlet our dear brother's death the memory be green..."
End Sub

Private Sub EnableScroller(strText As String)
    Dim lp As Long
    Dim multiString  As Long
    
    Picture1.Width = Picture1.TextWidth(strText)
    Picture1.Height = Picture1.TextHeight(strText)
    Picture1.AutoRedraw = True
    Picture1.Cls
    Picture1.Print strText
    Picture1.AutoRedraw = False
    Picture2.AutoRedraw = False ' Ensure this, else routine much slower as VB buffers the painting

    RightMargin = Picture2.ScaleWidth
    LeftMargin = Picture1.TextWidth(strText)
    DisplayText = strText
    Timer1.Interval = 10 ' Won't get better than resolution of about 54 on W98
    Timer1.Enabled = True
    'For lp = Picture1.ScaleWidth To -Picture1.TextWidth(strText) Step -15
    'Picture2.PaintPicture Picture1.Image, lp, 0
    'Form1.Refresh
    'Next
End Sub

Private Sub Timer1_Timer()
    Static lp As Long
    
    If lp > LeftMargin + RightMargin Then lp = 0
    Picture2.PaintPicture Picture1.Image, RightMargin - lp, 0
    lp = lp + 15 ' assuming we are working in twips in both source and target pictureboxes

End Sub

good luck

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
To get the best response to a question, please check out FAQ222-2244 first
A General Guide To Excel in VB FAQ222-3383
 
For reference, here's the original thread: thread222-531427
 
Thanks guys,
I can’t just try your suggestions just yet. Just to follow up on the second bit is it possible to make this window have a presence like the windows task bar. I would like my task bar to placed statically on the screen and not be hidden no mater what program is loaded.

Simon
 
ive seen an example somewhere and ill post back when i find it of creating a "taskbar" style app... lots of API calls and was a little unstable but it might be of use.

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
To get the best response to a question, please check out FAQ222-2244 first
A General Guide To Excel in VB FAQ222-3383
 
found it


good luck and enjoy



If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
To get the best response to a question, please check out FAQ222-2244 first
A General Guide To Excel in VB FAQ222-3383
 
thanks for your persistance i be trying this out in the next days

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top