For vb.net (view is this code, only show one buttton)
clsMsgBoxV1.ShowDialog("PDF solo de albaranes. (No avisarme mas)", "PDF")
and use this shared class:
Public Class clsMsgBoxV1
Shared prompt As Form
Shared chk As CheckBox
Public Shared Function ShowDialog(Text As String, caption As String) As Boolean
'frmUsuario
prompt = New Form()
chk = New CheckBox()
prompt.StartPosition = FormStartPosition.CenterParent
prompt.Width = 220
prompt.Height = 150
prompt.Text = caption
prompt.MinimumSize = prompt.Size
prompt.MaximumSize = prompt.Size
prompt.MaximizeBox = False
prompt.MinimizeBox = False
Dim panel As FlowLayoutPanel = New FlowLayoutPanel()
chk.Text = Text
chk.Width = chk.Width * 2
chk.Height = 50
Dim ok As Button = New Button() With {
.Text = "Leido"
}
AddHandler ok.Click, AddressOf OKClick
'Dim no As Button = New Button() With {
'.Text = "No"
'}
'AddHandler no.Click, AddressOf NoClick
ok.Width = prompt.Width - 30
panel.Controls.Add(chk)
panel.SetFlowBreak(chk, True)
panel.Controls.Add(ok)
'panel.Controls.Add(no)
prompt.Controls.Add(panel)
prompt.ShowDialog()
prompt.Dispose()
Return chk.Checked
End Function
Private Shared Sub NoClick(sender As Object, e As EventArgs)
prompt.Close()
End Sub
Private Shared Sub OKClick(sender As Object, e As EventArgs)
prompt.Close()
End Sub
End Class