Control size/location of external app?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • johnb41

    Control size/location of external app?

    I am using a "Process" to open a program (Acrobat Reader, for example)
    which will in turn open a PDF file.

    It works fine, but it would really be nice if I could specify Acrobat
    Reader's x,y location and also it's width & height.

    Is this programmaticall y possible w/ vb.net?

    Thanks!

    John

  • Herfried K. Wagner [MVP]

    #2
    Re: Control size/location of external app?

    "johnb41" <jsbuchmann@gma il.com> schrieb:[color=blue]
    >I am using a "Process" to open a program (Acrobat Reader, for example)
    > which will in turn open a PDF file.
    >
    > It works fine, but it would really be nice if I could specify Acrobat
    > Reader's x,y location and also it's width & height.[/color]

    I am afraid you will have to use p/invoke with the 'CreateProcess' function
    to do that. Position and size of the window can be specified in the
    structure referenced by the 'lpStartupInfo' parameter of the function:

    Platform SDK: DLLs, Processes, and Threads -- 'CreateProcess'
    <URL:http://msdn.microsoft. com/library/en-us/dllproc/base/createprocess.a sp>

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • johnb41

      #3
      Re: Control size/location of external app?

      Thanks Herfried,

      I think i'll have to pass on this "feature" of my app. I got totally
      lost reading the link... very complex stuff! This is API programming,
      correct? Probably not worth spending days trying to understand it, for
      such a minor part of my app. I was hoping it was a quick fix.

      Maybe later i'll look into it if lack of size/location really bugs
      me!...

      Thanks again!
      John

      Comment

      Working...