Webbrowser and Flash..

Illusion

Centurion
Joined
Aug 7, 2003
Messages
105
Location
Uk
Hi,

I wondered if someone could help me out.
I am having a bit of problems with the webbrowser control.
At first I thought it might just be something I am doing, but looking at other peoples browsers and I also just made a very quick browser, it seems to the do the same thing on all of them.
I am trying to make the browser work with flash.. naturally it works.. but will only work with one click and thats it (just now I found out that if you click off of the flash game and click back on it, it works, but you have to do this repeatedly if you want to do anything else.
Anyone have any suggestions??

all I have in my sample code is a textbox and a webbrowser with this code

Code:
Public Class Form1

    Private Sub TextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
        If e.KeyCode = Keys.Enter Then
            Me.WebBrowser1.Navigate(TextBox1.Text, False)
        End If
    End Sub


End Class

Would appreciate any insight anyone has...


Thanks
Dan.
 
Aaah. Another new control in .Net 2.0. I nearly got myself confused there. :D

Have you tried loading your flash in a real web browser? How is it behaving?
 
Hi,

oh it wasn't my flash, it was any flash...
I did find a solution the other day tho ..
a weird one though...

incase anyone else comes across the problem

Code:
Public Class myWebBrowser
        Inherits System.Windows.Forms.WebBrowser

        Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)

        Select Case m.Msg
            Case &H21, &H201, &H204, &H207, &H21 ' WM_LMOUSEBUTTON
                MyBase.DefWndProc(m)
                Return
        End Select

        MyBase.WndProc(m)
        End Sub 'WndProc
End Class

You have to put this in a component and put that on your form, it does fix the flash thing abit .. but you end up having all sorts of other issues with it instead...

Thanks.
 
Back
Top