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. Short cut icons on a windows form

Short cut icons on a windows form

Scheduled Pinned Locked Moved C#
csharphelp
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.
  • R Offline
    R Offline
    Rinventive
    wrote on last edited by
    #1

    I am making a windows form and I would like to place buttons or icons that will start other applications from the form. I am programming this is c#. I would like to know what I need to do to get the button to start other programs .exe Thanks for any help

    C 1 Reply Last reply
    0
    • R Rinventive

      I am making a windows form and I would like to place buttons or icons that will start other applications from the form. I am programming this is c#. I would like to know what I need to do to get the button to start other programs .exe Thanks for any help

      C Offline
      C Offline
      Carsten Zeumer
      wrote on last edited by
      #2

      Use the System.Diagnostics.Process newProcess = System.Diagnostics.Process.Start(exe, params) method in the buttons OnClick handler. If you need more control over the appearance of the new application you shoud first fill a ProcessStartInfo and then call the System.Diagnostics.Process newProcess = System.Diagnostics.Process.Start(startupInfo). To wait for the process to finish use the following code: System.Diagnostics.Process newProcess = System.Diagnostics.Process.Start(@"c:\windows\notepad.exe"); System.Threading.WaitHandle processHandle = new System.Threading.AutoResetEvent(false); processHandle.Handle = newProcess.Handle; processHandle.WaitOne(); /cadi 24 hours is not enough

      A 1 Reply Last reply
      0
      • C Carsten Zeumer

        Use the System.Diagnostics.Process newProcess = System.Diagnostics.Process.Start(exe, params) method in the buttons OnClick handler. If you need more control over the appearance of the new application you shoud first fill a ProcessStartInfo and then call the System.Diagnostics.Process newProcess = System.Diagnostics.Process.Start(startupInfo). To wait for the process to finish use the following code: System.Diagnostics.Process newProcess = System.Diagnostics.Process.Start(@"c:\windows\notepad.exe"); System.Threading.WaitHandle processHandle = new System.Threading.AutoResetEvent(false); processHandle.Handle = newProcess.Handle; processHandle.WaitOne(); /cadi 24 hours is not enough

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thank you very much

        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