by john tomson (9 Submissions)
Category: Miscellaneous
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Mon 14th November 2005
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
a magic 8 ball program
API Declarations
1 commandbutton called command1
Private Sub Command1_Click()
Command1.BackColor = &H80000007
Command1.ForeColor = &HFF00&
Command1.Caption = "Ask"
Label9.BackColor = &H80000007
Label9.ForeColor = &HFF00&
Randomize
myvalue = Int((19 * Rnd) + 1)
If myvalue = 1 Then
Label9.Caption = "Outlook Good"
ElseIf myvalue = 2 Then
Label9.Caption = "My Reply Is No"
ElseIf myvalue = 3 Then
Label9.Caption = "With Out Doubt"
ElseIf myvalue = 4 Then
Label9.Caption = "Can't Predict Now"
ElseIf myvalue = 5 Then
Label9.Caption = "Very Doubtful"
ElseIf myvalue = 6 Then
Label9.Caption = "Signs Point To Yes"
ElseIf myvalue = 7 Then
Label9.Caption = "Yes Definitely"
ElseIf myvalue = 8 Then
Label9.Caption = "Yes"
ElseIf myvalue = 9 Then
Label9.Caption = "You May Rely On It"
ElseIf myvalue = 10 Then
Label9.Caption = "My Sources Say No"
ElseIf myvalue = 11 Then
Label9.Caption = "Reply Hazy Try Again"
ElseIf myvalue = 12 Then
Label9.Caption = "Outlook Not Good"
ElseIf myvalue = 13 Then
Label9.Caption = "Most Likely"
ElseIf myvalue = 14 Then
Label9.Caption = "As I See Yes"
ElseIf myvalue = 15 Then
Label9.Caption = "Don't Count On It"
ElseIf myvalue = 16 Then
Label9.Caption = "Concintrate And Ask Again"
ElseIf myvalue = 17 Then
Label9.Caption = "It Is Certain"
ElseIf myvalue = 18 Then
Label9.Caption = "It Is Decidedly So"
ElseIf myvalue = 19 Then
Label9.Caption = "Better Not Tell Now"
End If
End Sub