I am developing an application for Windows CE using Visual Studio 2008.
Code:
private void cmdLogOn_Click(object sender, EventArgs e)
{
if (loginStatus == false)
{
DialogResult dialogresult = MessageBox.Show("Are you sure?", "text", MessageBoxButtons.YesNo);
if (dialogresult == DialogResult.Yes)
{
//Do Stuff;
}
}
else
{
//Do stuff
}
}
I am getting the error : "No overload for method 'Show' takes '3' arguments". Any idea why?
EDIT: Here is a step by step using a new application to demonstrate the issue:
2.Visual C# > Smart Device Project
button1
& a label = label1
The simple answer is in the .NET Compact framework there is no overload which takes 3 arguments, as the error says.
You can use this:
DialogResult dialogresult = MessageBox.Show("Are you sure?", "text",
MessageBoxButtons.YesNo, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);