Well there you have it, a nifty little ActiveX control that uses the power of XML, the Internet, and Visual Basic. There are heaps of ways that you can improve on this control, and they will all give you some good programming practice. Here are some of them:
- Create a publicly accessible function called "SetBGColour" that will accept three integer values, R, G, and B. Set the background colour of the control to the windows version of these RGB values, and return the old colour as an integer. The functions declaration would look like this: Public SetBGColor(R as integer, G as integer, B as integer) As integer
- Create a "Next >>" link at the bottom of the control. Add some code to display the next five news headlines. When all of the twenty headlines have been displayed, display a "<< Previous" button link, to navigate back through the articles.
- Use the news categories at http://w.moreover.com/categories/category_list_xml.html to add a drop down box and a command button to the top of our ActiveX control. Let the user choose a category, and retrieve the headlines for that category.
Comments