How can my VB.net application interact with windows modal dialog boxes?

For example when you click an HTML <input type=file> the dialog that opens is a windows form that isn't in my application, so how can I manipulate it?

Recommended Answers

All 9 Replies

How can my VB.net application interact with windows modal dialog boxes?

For example when you click an HTML <input type=file> the dialog that opens is a windows form that isn't in my application, so how can I manipulate it?

what kind of manipulation you want?

When the dialog opens, I would like to be able to send a filepath as a string to the filebrowser and enter it.

When the dialog opens, I would like to be able to send a filepath as a string to the filebrowser and enter it.

you cant do that in a web application.

It's not a web application. I'm making a desktop app with a webbrowser control.

you still cant do that with webbrowser control.. it works pretty much like a real browser.

This is for File Upload through automation of the html input type = file.

I'm simulating a click with .invokemember(click) on the element, which loads the dialog box. I just need to access that file browser dialog that pops up so I can send a string and press enter.

why dont you provide your source code?

frmMain.wbMain.Navigate(WEBSITE WITH INPUT TYPE=FILE)
frmMain.wbMain.Document.GetElementById("INPUT TYPE = FILE").InvokeMember("click")

that loads the dialog box. But I don't know how to manipulate it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.