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. Please help. MessageBox.Show(this, "hello") pops up behind my mainform

Please help. MessageBox.Show(this, "hello") pops up behind my mainform

Scheduled Pinned Locked Moved C#
helpquestion
5 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.
  • B Offline
    B Offline
    bradsnobar
    wrote on last edited by
    #1

    Has anyone encountered a message box that pops up behind the main form? How do I fix this? private void button13_Click_1(object sender, EventArgs e) {    item i = new item();    Button b = new Button();    b.Text = "hello";    b.Click += new EventHandler(b_Click);    subItem s = new subItem("hello");    s.EmbeddedControl = b;    i.SubItems.Add(s);    this.myListView1.Items.Add(i); //my custom windows control } void b_Click(object sender, EventArgs e) {    MessageBox.Show(this, "hello");    //this is refering to the main form in here... }

    V M 2 Replies Last reply
    0
    • B bradsnobar

      Has anyone encountered a message box that pops up behind the main form? How do I fix this? private void button13_Click_1(object sender, EventArgs e) {    item i = new item();    Button b = new Button();    b.Text = "hello";    b.Click += new EventHandler(b_Click);    subItem s = new subItem("hello");    s.EmbeddedControl = b;    i.SubItems.Add(s);    this.myListView1.Items.Add(i); //my custom windows control } void b_Click(object sender, EventArgs e) {    MessageBox.Show(this, "hello");    //this is refering to the main form in here... }

      V Offline
      V Offline
      V 0
      wrote on last edited by
      #2

      Check the properties of your mainform and make sure that topmost is set to false.

      V.
      Stop smoking so you can: Enjoy longer the money you save. Moviereview Archive

      B 1 Reply Last reply
      0
      • B bradsnobar

        Has anyone encountered a message box that pops up behind the main form? How do I fix this? private void button13_Click_1(object sender, EventArgs e) {    item i = new item();    Button b = new Button();    b.Text = "hello";    b.Click += new EventHandler(b_Click);    subItem s = new subItem("hello");    s.EmbeddedControl = b;    i.SubItems.Add(s);    this.myListView1.Items.Add(i); //my custom windows control } void b_Click(object sender, EventArgs e) {    MessageBox.Show(this, "hello");    //this is refering to the main form in here... }

        M Offline
        M Offline
        Martin 0
        wrote on last edited by
        #3

        Hello, Check if your mainform was set to "TopMost = true" All the best, Martin

        B 1 Reply Last reply
        0
        • M Martin 0

          Hello, Check if your mainform was set to "TopMost = true" All the best, Martin

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

          topmost is false

          1 Reply Last reply
          0
          • V V 0

            Check the properties of your mainform and make sure that topmost is set to false.

            V.
            Stop smoking so you can: Enjoy longer the money you save. Moviereview Archive

            B Offline
            B Offline
            bradsnobar
            wrote on last edited by
            #5

            topmost is false

            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