Error DialogResult is not a member of forms

0

Hi, I wanted to know if you can help me with this error that you sent me and I do not know how to solve it. I'll be grateful.

the error is this line

I am working on VB.NET 2015 Component DevExpress and Sql 2012

If accion = "new" Then
  If MessageBox.Show("¿Seguro que desea Registrar?", "Aviso Importante", 
     MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
ClassGeneral.IURegistros("new", "0", cmbAceite.EditValue, cmbfiltro.EditValue, cmbplaca.EditValue, txtActual.EditValue, txtcambio.EditValue, dtFecha.EditValue)
  End If
End If

I thank you in advance

    
asked by Jose 22.10.2016 в 23:42
source

1 answer

0

Under certain circumstances, the use of Windows.Forms.DialogResult.Yes may result in the error:

  

'Forms' is not a member of 'Windows'

... or in Spanish:

  

'Forms' is not a member of 'Windows'

So I have some doubts about the accuracy of the error message you gave us.

Anyway, I suggest trying to replace the expression Windows.Forms.DialogResult.Yes with one of the following 2 options:

DialogResult.Yes

o ...

System.Windows.Forms.DialogResult.Yes
    
answered by 23.10.2016 в 00:15