PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Lucky Eight Ball-VBForums
Results 1 to 2 of 2

Thread: Lucky Eight Ball

  1. #1

    Thread Starter
    Join Date
    May 2005

    Lucky Eight Ball

    Hi all!

    I have just finished an 8ball program.
    Its really basic but i would just like to see what you think about it.

    This is my 1st proper program as i am a noob at VB

    Any way i hope you like it!



    VB Code:
    1. Private Sub cmdAsk_Click()
    2.     Form1.Hide
    3.     Form2.Show
    4. End Sub
    6. Private Sub Form_Terminate()
    7.     Unload Form2
    8.     Unload Form1
    9. End Sub

    VB Code:
    1. Private Sub cmdAnswer_Click()
    2.     lblAnswer.Visible = True
    3.     cmdAnswer.Visible = False
    4.     cmdReplay.Visible = True
    5. End Sub
    7. Private Sub cmdReplay_Click()
    8.     Form2.Hide
    9.     Form1.Show
    10.     cmdAnswer.Visible = True
    11.     lblAnswer.Visible = False
    12.     cmdReplay.Visible = False
    13.     Form1.txtQuestion.Text = ""
    14. End Sub
    16. Sub Form_Activate()
    17. Randomize Timer
    18. With List1
    19.     .AddItem "Yes!"
    20.     .AddItem "No!"
    21.     .AddItem "Of Course!"
    22.     .AddItem "Nope!"
    23.     .AddItem "Never!"
    24.     .AddItem "Yup!"
    25.     .AddItem "Don't count on it!"
    26.     .AddItem "The outlook is good!"
    27.     .AddItem "50-50 chance!"
    28.     .AddItem "Mabye!"
    29.     .AddItem "Only in your dreams!"
    30.     .AddItem "One will never know!"
    31.     .AddItem "I don't know!"
    32. End With
    33. List1.ListIndex = Rnd * List1.ListCount
    34. lblAnswer.Caption = List1.Text
    36.     lblAnswer.ForeColor = vbWhite
    37.     lblAnswer.BackColor = vbBlack
    38.     lblAnswer.FontSize = "12"
    39.     lblAnswer.FontBold = True
    40.     Form2.lblQuestion.Caption = Form1.txtQuestion.Text
    41.     lblQuestion.FontSize = "11"
    42.     lblQuestion.FontBold = True
    45. End Sub
    47. Private Sub Form_Terminate()
    48.     Unload Form1
    49.     Unload Form2
    50. End Sub
    Attached Files Attached Files
    Last edited by si_the_geek; May 15th, 2005 at 05:58 PM. Reason: added code (sent via pm)

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Bristol, UK

    Re: Lucky Eight Ball

    The code/files within this thread (submitted: 5-5-2005) have been checked for malware by a moderator.

    Disclaimer: This does not necessarily mean that any compiled files (DLL/EXE/OCX etc) are completely safe, but any supplied code does not contain any obvious malware. It also does not imply that code is error free, or that it performs exactly as described.

    It is recommended that you manually check any code before running it, and/or use an automated tool such as Source Search by Minnow (available here or here).
    If you find any serious issues (ie: the code causes damage or some sort), please contact a moderator of this forum.

    Usage of any code/software posted on this forum is at your own risk.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width