Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why dusn't this code Work?
#1
Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If CheckBox1.Checked = True Then
            MessageBox.Show("TEST", "TEST", MessageBoxButtons.OK)
        Else
            MessageBox.Show("TEST", "TEST", MessageBoxButtons.OKCancel)
            If MessageBoxButtons.Cancel = Click Then
                MessageBox.Show("Are you shor you want to quit?", "TEST", MessageBoxButtons.YesNo, MesssageBoxIcon.Question)
                If MessageBoxButtons.Yes = Click Then
                    End
                End If
            End If
        End If

    End Sub
End Class
#2
Sorry to hear you're having trouble, here is a corrected version of that.(Note there's probably a million other ways to do this.)

Code:
If CheckBox1.Checked = True Then
            MsgBox("Test", MsgBoxStyle.OkOnly, "Test")
        Else
            If MsgBox("test", MsgBoxStyle.OkCancel, "test") = MsgBoxResult.Cancel Then
                If MsgBox("Are You Sure?", MsgBoxStyle.YesNo, "Test") = MsgBoxResult.Yes Then
                    Me.Close()
                End If
            End If
        End If
#3
Yes, I am pretty sure that ZManAlpha has the correct version, but be sure to test it and make sure that it does everything you need it to!
My Blog | My Setup | My Videos | Have a wonderful day.
#4
IT WORKS!!!!! Thanks!


Possibly Related Threads…
Thread Author Replies Views Last Post
  Downloading from FTP server doesn't work brco900033 5 20,583 08-16-2013, 04:32 AM
Last Post: brco900033
  Windows API Code Pack 1.1 brco900033 1 8,190 10-30-2012, 08:12 PM
Last Post: brandonio21
  Code From .exe manishshrestha60 2 11,247 09-26-2012, 04:06 AM
Last Post: Macatone

Forum Jump:


Users browsing this thread: 1 Guest(s)