Control size/location of external app?

  • Thread starter Thread starter johnb41
  • Start date Start date
J

johnb41

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 programmatically possible w/ vb.net?

Thanks!

John
 
johnb41 said:
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.

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.asp>
 
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
 
Back
Top