Working with the Screensaver Starter Kit (by Irene Fan)

Working with the Screensaver Starter Kit (by Irene Fan)

  • Comments 4

(posted by Irene Fan)

Hi, I'm Irene and I'm an Exploring Microsoft intern in the Visual Basic group this summer along with Greg, Seth, and Emily. As VB Explorers, we spend eight weeks here in Redmond designing and coding an application to learn about the product development process firsthand; at the same time, we experience corporate life at Microsoft and learn about the work of program managers, developers, and software testers.

For our first project of the summer, we worked with Visual Basic's starter kits. My task was to understand and modify the Screensaver starter kit -- a screensaver displaying an RSS feed against a backdrop of photos. The starter kits come "finished" with easy-to-follow documentation while leaving plenty of room for customized features; some of my ideas for these included screensaver post-it notes, a mini Outlook summary showing unread emails and alerts, and picture captions to be displayed with each background photo.

I decided to implement the post-it notes, and here is where I quickly ran into trouble! Unlike most forms, the screensaver works by painting the background picture, RSS item headlines, and corresponding descriptions over everything already displayed on screen. One of the small extensions explained by the documentation in is a code modification for the user to browse through headlines by pressing up and down arrow keys; however, when I tried adding textboxes to hold notes, it took the focus off the painted portion, disabling this scrolling feature I liked.

To get around the problem, I decided to add the textbox to the screensaver's options form instead and paint my note the same way other text on screen is displayed. I wanted to call the options form at the press of a key during screensaver runtime, and this quickly brought me to my second major problem: the options form would quickly get painted over by the screensaver after appearing, leaving me no way to enter my edited note.

With help from program manager Joe Binder, I fixed my dilemma via a few lines of code for the screensaver form under the KeyDown event, where pressing "e" for edit brought up the options form:

   Case Keys.E
      Me.SendToBack()
      isActive = False                  'reset mouse position
      My.Forms.OptionsForm.ShowDialog()
      Me.BringToFront()

I normally wanted any mouse movement to close the screensaver, but a user might need the mouse while maneuvering around the options form. To prevent the screensaver from mistaking a user closing the options form as a sign to break out of screensaver mode, I reset the isActive flag.

All in all, I enjoyed the challenge of learning a new programming language; at the same time, in walking through the provided documentation and adding my own extensions, I was able to give some feedback to the VB team from a beginner's perspective.

Leave a Comment
  • Please add 7 and 2 and type the answer here:
  • Post
  • These are my today foundations about Microsoft on the web:
    First Longhorn Beta Invites Go Out (Via)...
  • These are my today foundations about Microsoft on the web:
    First Longhorn Beta Invites Go Out (Via)...
  • These are my today foundations about Microsofton the web: First Longhorn Beta Invites Go Out(Via) Microsoft
  • Thank useful content

Page 1 of 1 (4 items)