Visual basic / XML
Xnews: application to design a simple electronic newspaper
In my time at Two2Tango I had an assignment to write an electronic newspaper. The purpose of this was to offer customers a way to publish content to their employees without having to go full-scale webserver/intranet.
The idea was actually quite good, all employees had a simple trayicon that would check every 3 minutes or so for a changed file on an FTP-server. If this file had actually changed, the trayicon would retrieve it and launch the main application. The FTP-file was the content for a "newspaper"-like document that could feature text (flat text and titles) , images, hyperlinks and scrolling marquees.
The company had to assign a "publisher" - someone to edit and publish the newspaper. This person could actually edit the document and type text and change images and such. It was done in a pretty crude-but-effective sort of way, so I decided to start to code a similar program in my spare time at home.
This was around the time XML was up-and-coming and I started to get interested in that. I decided to have the application store the content as XML. In the old application it was never possible to change the locations of the elements, the publisher had to choose between 10 templates and he or she could change the text and the images. Xnews (the follow-up I wrote at home) featured movable objects, layering and scaling of objects.
I actually never finished Xnews properly, but it has so many useful Visual Basic code that I decided to publish the code here under a GPL license. I would like to encourage anyone to use and maybe even finish the code.
It may come very useful to you if you are looking for the following stuff in Visual Basic code:
- Moving objects on a form
- Scaling objects on a form using handles
- Selecting objects on a form with handles
- Layering objects on a form
- Editing textobjects at runtime
- Nudging objects using the keyboard arrows
- Keeping an object in proportion whilst scaling
To download the Visual Basic 6 sourcecode as a .ZIP click here. Look below for some screenshots of the application in action:
overlap and selecting
realtime resizing with handles
resizing images