Control size/location of external app?

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
 
H

Herfried K. Wagner [MVP]

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>
 
J

johnb41

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top