Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to correct this code of C#.net windows form?

how to correct this code of C#.net windows form?

Scheduled Pinned Locked Moved C#
csharphelptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sathyan_8294
    wrote on last edited by
    #1

    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?

    W K 2 Replies Last reply
    0
    • S sathyan_8294

      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?

      W Offline
      W Offline
      Wayne Phipps
      wrote on last edited by
      #2

      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 helps

      Regards Wayne Phipps ____________ Time is the greatest teacher... unfortunately, it kills all of its students View my Blog

      1 Reply Last reply
      0
      • S sathyan_8294

        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?

        K Offline
        K Offline
        Keshav V Kamat 0
        wrote on last edited by
        #3

        try using MessageBox.Show. Be very careful of the uppercase/lowercase combination.

        Keshav Kamat :) India

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups