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 i Can open my c# form only automatically to user when user open windows.

How i Can open my c# form only automatically to user when user open windows.

Scheduled Pinned Locked Moved C#
csharp
12 Posts 8 Posters 2 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.
  • H Honeyboy_20

    Hi , How i Can open my c# form only automatically to user when user open windows.

    N Offline
    N Offline
    Not Active
    wrote on last edited by
    #3

    You can add an entry in the registry, either the Run or RunOnce keys http://msdn.microsoft.com/en-us/library/aa376977(v=vs.85).aspx[^]


    No comment

    1 Reply Last reply
    0
    • H Honeyboy_20

      Hi , How i Can open my c# form only automatically to user when user open windows.

      B Offline
      B Offline
      Bernhard Hiller
      wrote on last edited by
      #4

      Even simpler is adding a link in the startup folder (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup).

      L 1 Reply Last reply
      0
      • H Honeyboy_20

        Hi , How i Can open my c# form only automatically to user when user open windows.

        H Offline
        H Offline
        Honeyboy_20
        wrote on last edited by
        #5

        How i can do this by coding automatically when program setup

        B 1 Reply Last reply
        0
        • H Honeyboy_20

          Hi , How i Can open my c# form only automatically to user when user open windows.

          C Offline
          C Offline
          Clark Kent123
          wrote on last edited by
          #6

          I agree with others with either using the Registry and StartUp folder. However, there is also one more alternative if not more to consider. Why not try creating a Service? Here is an article to get you started. MSDN: Walkthrough: Creating a Windows Service Application Once that is done you can go to the Component Services and set the application to start once the computer has turned on. There is also very cool recovery options. (dcomcnfg) Hope this helps! :)

          M 1 Reply Last reply
          0
          • C Clark Kent123

            I agree with others with either using the Registry and StartUp folder. However, there is also one more alternative if not more to consider. Why not try creating a Service? Here is an article to get you started. MSDN: Walkthrough: Creating a Windows Service Application Once that is done you can go to the Component Services and set the application to start once the computer has turned on. There is also very cool recovery options. (dcomcnfg) Hope this helps! :)

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #7

            Services shouldn't be interacting with the desktop, so not a great idea for a "form" app :)

            Mark Salsbery :java:

            C 1 Reply Last reply
            0
            • M Mark Salsbery

              Services shouldn't be interacting with the desktop, so not a great idea for a "form" app :)

              Mark Salsbery :java:

              C Offline
              C Offline
              Clark Kent123
              wrote on last edited by
              #8

              Depends Mark upon what the developer is trying to achieve. Hence, the reason why I chose the suggestion icon. Just another option to consider that's all I was trying to get at. I don't know the specifics of what the developer is hoping to accomplish with the "form" app. Thanks for the feedback. :)

              D 1 Reply Last reply
              0
              • H Honeyboy_20

                Hi , How i Can open my c# form only automatically to user when user open windows.

                B Offline
                B Offline
                BillWoodruff
                wrote on last edited by
                #9

                The answers here have assumed that you want your application to open automatically when Windows is started. I am wondering if what you are really asking is: how do you open your application when a file with the unique extension you are using for files you save is double-clicked ? Please clarify your question. thanks, Bill

                "... Sturgeon's revelation. It came to him that Science Fiction is indeed ninety-percent crud, but that also—Eureka!—ninety-percent of everything is crud. All things—cars, books, cheeses, hairstyles, people and pins are, to the expert and discerning eye, crud, except for the acceptable tithe which we each happen to like." early 1950's quote from Venture Sci-Fi Magazine on the origin of Sturgeon's Law, by author Theodore Sturgeon: source Oxford English Dictionary on-line "Word-of-the-Day."

                1 Reply Last reply
                0
                • C Clark Kent123

                  Depends Mark upon what the developer is trying to achieve. Hence, the reason why I chose the suggestion icon. Just another option to consider that's all I was trying to get at. I don't know the specifics of what the developer is hoping to accomplish with the "form" app. Thanks for the feedback. :)

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #10

                  Under Windows 7, a service cannot display a Form for security reasons. Well, it could, but at best, it'll show up on a seperate Desktop and the user would be informed that a service is showing something that might need the users attention. If OK'd, it would switch Desktops. This is not something I would use in a production app at all.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak

                  1 Reply Last reply
                  0
                  • B Bernhard Hiller

                    Even simpler is adding a link in the startup folder (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup).

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #11

                    no your screwed, close your computer, take out the hard drive open your hard-drive and throw away the cover( this is what makes computers lag!!) then take out the RAM and place a hot dog in there. Pour water into the cooling fans, turn it on and BAM!!! faster computer along with the use of the program in all users YOUR WELCOME!!!!

                    1 Reply Last reply
                    0
                    • H Honeyboy_20

                      How i can do this by coding automatically when program setup

                      B Offline
                      B Offline
                      Bernhard Hiller
                      wrote on last edited by
                      #12

                      Add a link in the startup folder, you'll find that in the category "file system" in the setup project.

                      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