Automate open dialog in C#? (From COM OCX)
Posted
by JL
on Stack Overflow
See other posts from Stack Overflow
or by JL
Published on 2010-04-09T10:23:26Z
Indexed on
2010/04/09
10:43 UTC
Read the original article
Hit count: 305
c#
|fileopendialog
I have a COM OCX control that I need to automate. It has a method called Open() this method is called without parameters, and always displays an open file dialog (standard one with windows).
Is there a way for me to somehow get the file open dialog to open a file I specify , then close the dialog?
I would also not like to use sendkeys or any other variants, because I require the solution to be reliable. So ideally would like to grab a handle on that window, and set the file name programatically, and then execute the open method programatically.
Thanks in advance.
© Stack Overflow or respective owner