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. Text Won't Show in MessageBox

Text Won't Show in MessageBox

Scheduled Pinned Locked Moved C#
helpcsharpdotnetdesign
12 Posts 7 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.
  • J Jun Du

    Try this:

    string message = "MyStorage (C) 2006 IT Academy";
    string caption = "About MyStorage";
    MessageBoxButtons buttons = MessageBoxButtons.OK;

    MessageBox.Show(this, message, caption, bttons);

    Best, Jun

    M Offline
    M Offline
    MartyExodus
    wrote on last edited by
    #3

    Hmm..... The title shows up now, but there is still no text for the message, and there is no text on the button... Thanks, though. I'll keep trying. using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003");

    1 Reply Last reply
    0
    • M MartyExodus

      I'm trying to write a program (C# .NET 2003) for use in my school, and so far it works pretty good. The biggest problem I am having is that when I call MessageBox.Show(), no text shows up anywhere in the textbox, ncluding the title and OK button. This didn't use to occur, and then only on some computers, and now on every computer it is used on (including the design computer) My computers have all of the Microsoft Updates, so I figured uninstalling .NET Framework 2.0 might help, but it was no good. Here's my code if that helps: MessageBox.Show(this, "MyStorage (C) 2006 IT Academy", "About MyStorage", System.Windows.Forms.MessageBoxButtons.OK); MessageBox.Show("This should show something"); Neither of those work. The message box shows, and is perfectly functional, there is just no text. If anyone can help, I would greatly appreciate it. I have to have this project finished by the end of this month, and this is my only real issue. Thanks a lot using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003");

      B Offline
      B Offline
      BoneSoft
      wrote on last edited by
      #4

      I'd buy a new computer, with a new copy of Windows, and a new copy of Visual Studio. You got something funky happening and it ain't code.


      Try code model generation tools at BoneSoft.com.

      1 Reply Last reply
      0
      • M MartyExodus

        I'm trying to write a program (C# .NET 2003) for use in my school, and so far it works pretty good. The biggest problem I am having is that when I call MessageBox.Show(), no text shows up anywhere in the textbox, ncluding the title and OK button. This didn't use to occur, and then only on some computers, and now on every computer it is used on (including the design computer) My computers have all of the Microsoft Updates, so I figured uninstalling .NET Framework 2.0 might help, but it was no good. Here's my code if that helps: MessageBox.Show(this, "MyStorage (C) 2006 IT Academy", "About MyStorage", System.Windows.Forms.MessageBoxButtons.OK); MessageBox.Show("This should show something"); Neither of those work. The message box shows, and is perfectly functional, there is just no text. If anyone can help, I would greatly appreciate it. I have to have this project finished by the end of this month, and this is my only real issue. Thanks a lot using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003");

        J Offline
        J Offline
        Josh Smith
        wrote on last edited by
        #5

        It sounds like you might have a virus or something really evil in your machines (perhaps Satan has inhabited your hard disk). Reformat the machine, if you have the time. :josh: My WPF Blog[^]

        1 Reply Last reply
        0
        • M MartyExodus

          I'm trying to write a program (C# .NET 2003) for use in my school, and so far it works pretty good. The biggest problem I am having is that when I call MessageBox.Show(), no text shows up anywhere in the textbox, ncluding the title and OK button. This didn't use to occur, and then only on some computers, and now on every computer it is used on (including the design computer) My computers have all of the Microsoft Updates, so I figured uninstalling .NET Framework 2.0 might help, but it was no good. Here's my code if that helps: MessageBox.Show(this, "MyStorage (C) 2006 IT Academy", "About MyStorage", System.Windows.Forms.MessageBoxButtons.OK); MessageBox.Show("This should show something"); Neither of those work. The message box shows, and is perfectly functional, there is just no text. If anyone can help, I would greatly appreciate it. I have to have this project finished by the end of this month, and this is my only real issue. Thanks a lot using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003");

          M Offline
          M Offline
          MartyExodus
          wrote on last edited by
          #6

          I have a feeling that there is no virus or anything like that. We've tried running it on some brand new computers, and it still doesn't work. I have a feeling that there's something wrong with my project settings or something. I'll keep looking. If anyone has any additional info, I'd really appreciate it. Thanks. using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003"); -- modified at 15:16 Friday 7th July, 2006

          R 1 Reply Last reply
          0
          • M MartyExodus

            I have a feeling that there is no virus or anything like that. We've tried running it on some brand new computers, and it still doesn't work. I have a feeling that there's something wrong with my project settings or something. I'll keep looking. If anyone has any additional info, I'd really appreciate it. Thanks. using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003"); -- modified at 15:16 Friday 7th July, 2006

            R Offline
            R Offline
            Rogenator
            wrote on last edited by
            #7

            Greetings: This happen`s on all your project`s or only on this one?. Try creating another project and try on that one MessageBox.Show("test"), just to know if it`s something in your code or whith visual studio. "Failure is the best reason to start all over again with more knowledge" -Henry Ford

            M 1 Reply Last reply
            0
            • R Rogenator

              Greetings: This happen`s on all your project`s or only on this one?. Try creating another project and try on that one MessageBox.Show("test"), just to know if it`s something in your code or whith visual studio. "Failure is the best reason to start all over again with more knowledge" -Henry Ford

              M Offline
              M Offline
              MartyExodus
              wrote on last edited by
              #8

              This happens on all projects, and on all machines with Visual Studio. Due to the previous "random" nature of whether or not it worked on seperate machines, I believe it has something to do with a Windows Update, because we push out updates here through WSUS. That would explain why some computer showed the text, and some didn't; and now none work. Soo.... anyone have any idea of any Windows or Microsoft Updates that would cause such a problem? using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003");

              R 1 Reply Last reply
              0
              • M MartyExodus

                This happens on all projects, and on all machines with Visual Studio. Due to the previous "random" nature of whether or not it worked on seperate machines, I believe it has something to do with a Windows Update, because we push out updates here through WSUS. That would explain why some computer showed the text, and some didn't; and now none work. Soo.... anyone have any idea of any Windows or Microsoft Updates that would cause such a problem? using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003");

                R Offline
                R Offline
                Rogenator
                wrote on last edited by
                #9

                Greetings: That`s really strange, i have all of the windows updates, and never had this problem, i really dont know what could be the problem, one workaround could be to create another form in the application that serves as the message box, then you could just pass the text to display to it and show it, something like this:

                //Assuming youre MessageBox form is called FormM
                FormM temp=new FormM();
                temp.setText("blabla","blabla");//A method you define for setting the text
                temp.ShowDialog();

                //The method for defining the text. This method is inside FormM
                public void setText(string x1,string x2)
                {
                this.Text=x2;
                label1.Text=x1;//Assuming you´re using a label for the text
                }

                hope that helps until you fix the problem:) "Failure is the best reason to start all over agin with more knowledge" -Henry Ford. -- modified at 17:16 Friday 7th July, 2006

                1 Reply Last reply
                0
                • M MartyExodus

                  I'm trying to write a program (C# .NET 2003) for use in my school, and so far it works pretty good. The biggest problem I am having is that when I call MessageBox.Show(), no text shows up anywhere in the textbox, ncluding the title and OK button. This didn't use to occur, and then only on some computers, and now on every computer it is used on (including the design computer) My computers have all of the Microsoft Updates, so I figured uninstalling .NET Framework 2.0 might help, but it was no good. Here's my code if that helps: MessageBox.Show(this, "MyStorage (C) 2006 IT Academy", "About MyStorage", System.Windows.Forms.MessageBoxButtons.OK); MessageBox.Show("This should show something"); Neither of those work. The message box shows, and is perfectly functional, there is just no text. If anyone can help, I would greatly appreciate it. I have to have this project finished by the end of this month, and this is my only real issue. Thanks a lot using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003");

                  C Offline
                  C Offline
                  cje
                  wrote on last edited by
                  #10

                  I actually had this happen to me as well - are you by any chance runnin McAfee? If so this could be the problem...McAfee has a patch. Check out McAfee web site item http://forums.mcafeehelp.com/viewtopic.php?t=32979[^] If you are not running McAfee then obviously this isn't this issue but I thought it was worth mentioning cje

                  M 1 Reply Last reply
                  0
                  • C cje

                    I actually had this happen to me as well - are you by any chance runnin McAfee? If so this could be the problem...McAfee has a patch. Check out McAfee web site item http://forums.mcafeehelp.com/viewtopic.php?t=32979[^] If you are not running McAfee then obviously this isn't this issue but I thought it was worth mentioning cje

                    M Offline
                    M Offline
                    MartyExodus
                    wrote on last edited by
                    #11

                    Thanks a lot! That actually worked. It took us a whil;e to find the patch, but we managed to download and install Patch 11. We were only at patch level 1. O_o Thanks. using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003");

                    D 1 Reply Last reply
                    0
                    • M MartyExodus

                      Thanks a lot! That actually worked. It took us a whil;e to find the patch, but we managed to download and install Patch 11. We were only at patch level 1. O_o Thanks. using System.People; Person me = new Person(); me.Certifications = null; me.Experience = little; me.WantsToLearn = true; me.InSchool = true; me.AskQuestions("C# .NET 2003");

                      D Offline
                      D Offline
                      Dustin Metzgar
                      wrote on last edited by
                      #12

                      X| Wow, that's pretty sickening. No wonder I don't use that McAfee crap.


                      Logifusion[^]

                      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