Focus on Flash in WebBrowser

brand

New member
Joined
Dec 22, 2006
Messages
1
Programming Experience
1-3
Hello,


I'm having quite an odd problem attempting to focus on a embedded Flash (Adobe Flash that is) in a WebBrowser control.

I have the following code in a function, which is called on button_click. The issue is that I have to click to button twice in order to get it to work.

VB.NET:
frmMain.WebBrowser1.Focus()
frmMain.WebBrowser1.Navigate("javascript:window.document.embedobjectname.focus()")
SendKeys.Send({keykeykey})
The browser is getting focus.

I guess my question now is how can I...
check to see if the javascript:window.document.embedobjectname.focus() command is successful (is there another javascript command to check if .focus = true? is there a way to then read this output into a variable for a do...loop?)


Thanks,

Matt
 
Back
Top