1

抱歉,我是 VB6 的初学者。我有这个:

Private Sub Command5_Click()
    If MessageBox.Show("Sei sicuro di voler uscire?", "Sicuro?", MessageBoxButtons.YesNo) = DialogResult.Yes Then
        Unload Me
    End If
End Sub

但它返回一个错误:

Run-time error '424':
Object required

请问,有人可以回答我的问题吗?

4

1 回答 1

5

MessageBox.Show并且MessageBoxButtons是 .NET 的东西。(顺便说一下,你为什么不使用 .NET?:))这是它在 VB6 中的样子:

If MsgBox("Sei sicuro di voler uscire?", vbYesNo, "Sicuro?") = vbYes Then
于 2012-12-27T19:31:19.860 回答