Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Visual Basic

Date:04/20/05
Author:Jeff Shepherd
URL:n/a
Comments:1
Info:n/a
Score: (2.35 in 26 votes)
   'Jeff Shepherd 9/12/96 <jeff@trg.saic.com>
   '99 Bottles of Beer for Visual Basic
   '(1) Start a new project, paste a single listbox on the form.
   '(2) Double-click on the form, paste the following code into
   'the Form_Load sub. (3) Hit F5 to run

   Dim n As Integer
   Dim s As String

   Width = 6000
   Height = Screen.Height * 2 / 3
   Top = (Screen.Height - Height) / 2
   Left = (Screen.Width - Width) / 2
   Caption = "99 Bottles of Beer"
   List1.Top = 0
   List1.Left = 0
   List1.Width = Form1.ScaleWidth
   List1.Height = Form1.ScaleHeight

   List1.AddItem s & "99 bottles of Beer on the wall,"
   List1.AddItem s & "99 bottles of Beeeer..."
   List1.AddItem "You take one down, pass it around..."
   For n = 98 To 1 Step -1
      s = IIf(n = 1, n & " final bottle", n & " bottles")
      List1.AddItem s & " of Beer on the wall."
      List1.AddItem ""
      List1.AddItem s & " of Beer on the wall,"
      List1.AddItem s & " of Beeeer..."
      List1.AddItem "You take one down, pass it around..."
   Next n
   List1.AddItem "No more bottles of Beer on the wall."

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
Scrolling text using the print command.Seirian J. Pardoe02/27/067

Comments

>>  battue said on 09/29/05 04:16:31

battue Average... sorry... We all know that VB is locked to windows, why not show something that is diffent. It has the power.

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: