Need advice / experience!! - Try my MSOffice-bar style news ticker
Hiya guys and girls,
I've been trying for months now on and off to finish off a project I set myself to create a news ticker that can dock to the top or bottom of the desktop, like the office toolbar.
When it's done i'll tidy it up, comment it better, and anyone who wants it can have it to get headlines from their site, can freely give it away etc, as long as they're not making money off it (it's a labour of love / learning for me really)
I've got a fair way on (i think! ), but I need pointers on where i'm going wrong, how to make it better. Basically i'm self-taught, scavenging code here and there, and probably not understanding it enough.
The idea is my ticker pulls a bunch of headlines and urls from a website (from a dynamic .asp page) and then scrolls them in it's own little window. Click a link, and up pops your default browser with the story in it. It also sits in the system tray and has it's own little menu there, and you can set up proxy settings, ticker speed etc.
I'm using the inet control to grab the stories, but for the purposes of this demo, it'll just parse a local .asp file (included) to get story headlines from www.vbworld.com. The red bit on the left is where you would put your website's logo. I've not quite sorted out the error trapping on the inet control (it seems a bit flaky, esp with proxy servers), which is why i'm getting the file locally.
Main problem, I think, is the subclassing to make the app stick to top and bottom of the screen, esp in win 98 .... i got the code from vbsquare.com, and it worked great for a while, but now seems a bit temperamental. This may be 'cos i'm also subclassing for mouseover events, and other things ....
anyway, please please please take a look, any constructive criticism / hints from the more experienced coders out there very much appreciated. If you think my whole approach is wrong, or one aspect is a mess, please tell me why. I just need to get this thing working better for the sake of my sanity ....
to get this to work you'll need to register the vb6 ssubtmr6.dll from vbaccelerator.com, here:
I don't think i have forgotten Isubclass ... did you register the dll? It deals with some of the subclassing, i think that's probably causing the problem .....
Last edited by chicocouk; Apr 8th, 2002 at 06:29 PM.
I've downloaded a bunch of code from that site that looks good, but it all requires that sssubtimer control. Unfortunately, I've never gotten it to register in my system properly. I'm not sure what I'm doing wrong, but I'd like to.
When the application is docked at the top of the screen, it resizes the desktop windows to give it an area to sit in.
But it also moves down with the other applications, instead of docking above them. This covers title bars of maximized applications, hiding the buttons and menu! see attached image
This also occurs at the screen bottom, but doesen't cover the titles.
Haven't looked at the source yet.
Jerry Grant................tnarG yrreJ Website: <JG-Design></.net> Email: [email protected] Working towards a bug free world......
(Not a Microsoft employee)
Jerry Grant................tnarG yrreJ Website: <JG-Design></.net> Email: [email protected] Working towards a bug free world......
(Not a Microsoft employee)
I've seen it do this on win98 machines, but it doesn't do it on my 2k box here, although it clearly does on yours ... damn
This is one of the bugs i'm trying to iron out at the moment, i got the docking code from vbsquare.com, and the original code didn't do this .... something i've since added is causing this, and i'm not yet sure what ....
i've been trying to stop it doing that for weeks now, can't seem to find the problem ... it was also doubling the size of the bar when docked, which looked awful too, but i sorted that recently, i was using the appbar extends me command before telling it how big the bar should be when docked, rather than after it
Any other problems, please let me know, i really want to get this working
It fixes the problem, is fully configurable and best of all is freeware. All you need to do is add your ticker and put your name on it!
Jerry Grant................tnarG yrreJ Website: <JG-Design></.net> Email: [email protected] Working towards a bug free world......
(Not a Microsoft employee)
Downloaded the sample, and it's the code i'm already using ...
I've done something somewhere to cause the problem when i've added code to put my links onto the bar ... i suspect it may be the form resize stuff i've added, although i can't seem to resolve it ... still trying though
That sample code is great though, when I found that I was over the moon, 'cos it was exactly what i was looking for
Turns out there's an undocumented "feature" in the appbar code. You have to ensure that the form you attach the appbar to has a border style of 5 "Sizeable ToolWindow", or else the bar will drop down like my app does. Default border style is, of course, "2 - Sizeable", which causes this bug.
'Course, i'm hiding the border styles from view, so this isn't even visible.
Worth bearing in mind if you're going to use the otherwise excellent appbar code.
Cheers
(If anyone's interested in getting the completed source for my ticker app when it's done, get in touch, the idea doesn't seem to have set the world on fire here )