Results 1 to 2 of 2

Thread: Final APP tell me what you think

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2010
    Posts
    23

    Final APP tell me what you think

    Alright here is my final result of my test app I made for my very first time.

    Tell me what you think.

    Public Class Form1
    Dim r As New Random

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Timer1.Enabled = True
    Timer1.Interval = 100
    Label1.Text = "0"
    Label1.Text = r.Next(1, 20).ToString
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim op As Double
    If TextBox1.Text = Label1.Text Then
    MsgBox("You guessed right!")
    For op = 100.0 To 0.0 Step -0.01
    Me.Opacity = op
    Application.DoEvents()
    Next
    For op = 0.0 To 100.0 Step 0.01
    Me.Opacity = op
    Application.DoEvents()
    Next
    Else
    MsgBox("You guessed wrong!, Please guess again")
    Label1.Text = r.Next(1, 20).ToString
    For op = 100.0 To 0.0 Step -0.01
    Me.Opacity = op
    Application.DoEvents()
    Next
    For op = 0.0 To 100.0 Step 0.01
    Me.Opacity = op
    Application.DoEvents()
    Next
    End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    If Label4.ForeColor = Color.Red Then
    Label4.ForeColor = Color.Lime
    ElseIf Label4.ForeColor = Color.Lime Then
    Label4.ForeColor = Color.Blue
    ElseIf Label4.ForeColor = Color.Blue Then
    Label4.ForeColor = Color.Red
    End If
    End Sub
    End Class

    Credits to:

    Some people on the forums for teaching me random functions, And how to change the Opacity of the form to 0.0 back to 100.0 in about a second when, guessed wrong and right!

    Thanks,
    Cody.

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Final APP tell me what you think

    Could you please wrap your code in [HIGHLIGHT][/HIGHLIGHT] tags to make it easier for people to read! Also could you mention which language and version you are using, thank you!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

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