how to correct this code of C#.net windows form?
-
private void CodetextBox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if(e.KeyCode.Equals(keys.f2)) { messagebox.show("choose code feature not available"); } } when i run the above C#.net code windows form means the following error is display. "The type or namespace name 'messagebox' could not be found (are you missing a using directive or an assembly reference?)" how to clear this error?
-
private void CodetextBox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if(e.KeyCode.Equals(keys.f2)) { messagebox.show("choose code feature not available"); } } when i run the above C#.net code windows form means the following error is display. "The type or namespace name 'messagebox' could not be found (are you missing a using directive or an assembly reference?)" how to clear this error?
Methods are case sensitive IE foo and Foo are not the same. The correct method is
MessageBox.Show
Please see the following link for further details: http://msdn2.microsoft.com/en-us/library/system.windows.forms.messagebox.show(VS.71).aspx Hope this helpsRegards Wayne Phipps ____________ Time is the greatest teacher... unfortunately, it kills all of its students View my Blog
-
private void CodetextBox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if(e.KeyCode.Equals(keys.f2)) { messagebox.show("choose code feature not available"); } } when i run the above C#.net code windows form means the following error is display. "The type or namespace name 'messagebox' could not be found (are you missing a using directive or an assembly reference?)" how to clear this error?
try using MessageBox.Show. Be very careful of the uppercase/lowercase combination.
Keshav Kamat :) India