dwb
dwb

Reputation: 483

YesNo Message box OnTop

I am trying to use a MessageBox.Show command with the YesNo options. What I am needing is for it to be always on top.

Current code:

 Try
                Dim result As Integer = MessageBox.Show("Dsign has been reset. Would you like to make a ticket?", "Dsign", MessageBoxButtons.YesNo)

                If result = DialogResult.No Then
                    BGDsign.ReportProgress(100, "Dsign Reset")
                    Exit Sub
                ElseIf result = DialogResult.Yes Then
                End If

            Catch
            End Try

I know how to use the Form.ShowDialog()but unsure how to do it for a yesno message box.

Upvotes: 0

Views: 751

Answers (1)

David Wilson
David Wilson

Reputation: 4439

Instead of MessageBox.Show, try this

Dim result As MsgBoxResult = MsgBox("Dsign has been reset. Would you like to make a ticket?", MsgBoxStyle.YesNo + MsgBoxStyle.SystemModal, "Dsign")

Upvotes: 2

Related Questions