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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Set Focus In MessageBox Popup

Set Focus In MessageBox Popup

Scheduled Pinned Locked Moved C#
question
4 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.
  • Y Offline
    Y Offline
    ytubis
    wrote on last edited by
    #1

    Hi All! if my Program is running, and i create a messageBox that apears if there is a change in the prohramm, to get the first Focus of all the tasks, i mean if i run an application and then i open a web page and then there is the messageBox creation, how can i do that it will pop up in front of the web page or visualy, or any other application that is running in the background. Thanks. Do i need to activate the Focus function on the Form(My programm) and then create the messageBox?

    J 1 Reply Last reply
    0
    • Y ytubis

      Hi All! if my Program is running, and i create a messageBox that apears if there is a change in the prohramm, to get the first Focus of all the tasks, i mean if i run an application and then i open a web page and then there is the messageBox creation, how can i do that it will pop up in front of the web page or visualy, or any other application that is running in the background. Thanks. Do i need to activate the Focus function on the Form(My programm) and then create the messageBox?

      J Offline
      J Offline
      Jonathan van de Veen
      wrote on last edited by
      #2

      I guess this is really more of a JavaScript question then a C# question, but you could try to call Window.focus(); in Javascript.

      Y 1 Reply Last reply
      0
      • J Jonathan van de Veen

        I guess this is really more of a JavaScript question then a C# question, but you could try to call Window.focus(); in Javascript.

        Y Offline
        Y Offline
        ytubis
        wrote on last edited by
        #3

        I am sorry, you got it all wrong, when i gave the web application i ment a task that is running in the forground and that my Form is running in the background or minimized. So i mean in a Winapplication not javascript :)

        S 1 Reply Last reply
        0
        • Y ytubis

          I am sorry, you got it all wrong, when i gave the web application i ment a task that is running in the forground and that my Form is running in the background or minimized. So i mean in a Winapplication not javascript :)

          S Offline
          S Offline
          S Senthil Kumar
          wrote on last edited by
          #4

          Did you try System.Windows.Forms.Form.TopMost[^] ?

          Regards Senthil _____________________________ My Blog | My Articles | WinMacro

          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