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. Visual Basic
  4. System.Diagnosis.Process Set Bounds

System.Diagnosis.Process Set Bounds

Scheduled Pinned Locked Moved Visual Basic
csharpvisual-studiocareerworkspace
2 Posts 2 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.
  • _ Offline
    _ Offline
    _mubashir
    wrote on last edited by
    #1

    Hello, I am working in Visual Studio.NET 2003. I just want to ask if there is any way I could tell System.Diagnosis.Process to start a new process/window on my desired location. Actually I am working in a Multiple Monitor environment and want System.Diagnosis.Process to open on the second monitor (by setting up location) Dim p As System.Diagnostics.Process Dim pinfo As New System.Diagnostics.ProcessStartInfo pinfo.Arguments = "C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen c:\Picture 001.jpg" pinfo.FileName = "C:\windows\system32\rundll32.exe" Process.Start(pinfo) Above is a code which i am using to open up Windows Picture and Fax viewer(of which i want to set the location of) Thanks,


    Mubashir Software Architect Storan Technologies Inc, USA Every job is a self portrait of the person who did it.

    D 1 Reply Last reply
    0
    • _ _mubashir

      Hello, I am working in Visual Studio.NET 2003. I just want to ask if there is any way I could tell System.Diagnosis.Process to start a new process/window on my desired location. Actually I am working in a Multiple Monitor environment and want System.Diagnosis.Process to open on the second monitor (by setting up location) Dim p As System.Diagnostics.Process Dim pinfo As New System.Diagnostics.ProcessStartInfo pinfo.Arguments = "C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen c:\Picture 001.jpg" pinfo.FileName = "C:\windows\system32\rundll32.exe" Process.Start(pinfo) Above is a code which i am using to open up Windows Picture and Fax viewer(of which i want to set the location of) Thanks,


      Mubashir Software Architect Storan Technologies Inc, USA Every job is a self portrait of the person who did it.

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

      You can't tell it which monitor to start on. An application will always show up on the primary monitor, then you move it to the monitor you want. The exception to this is if the application was run before and it saved it's last position, before it closed, so that it can recreate it's window in that same position the next time it runs. So, you're only choice is to launch the application, get it's window handle, by calling the Win32 API function FindWindow, then sending the appropriate window messages to that handle to move it to the desktop coordinates on the next monitor.

      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      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