Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

 

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.

Posted

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?

Amir Syafrudin
Posted

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

 

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...