Results 1 to 2 of 2

Thread: [RESOLVED] messagebox help

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2004
    Posts
    1,202

    Resolved [RESOLVED] messagebox help

    can anyone help me pleaase when i click yes and no it ends the program can anyone help.

    Code:
          MsgBox("Do you really want to abour the scan", MsgBoxStyle.YesNo, "Abort")
            If vbYes Then
                Application.Exit()
            Else
                Timer1.Enabled = True
            End If
    come back and mark your original post as resoved if your problem is fixed

    Jamie Garland

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: messagebox help

    You need to catch the result in a variable. Here is an example using MessageBox.Show:

    Code:
            Dim result As DialogResult
            result = MessageBox.Show("Do you really want to abour the scan", "Abort", MessageBoxButtons.YesNo)
            If result = Windows.Forms.DialogResult.Yes Then
    
            End If

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