M
Matt Brown - identify
Hello,
I'm very new to this level of programming and .net in general. My
background is VB.
I am attempting to use the WebBrowser control to load a flash movie,
and it is a known issue that the WebBrowser control doesn't natively
support mouse clicks (unless the form loses and regains focus).
A workaround has been presented over at CodeProject and it is as
follows:
Imports System
Imports System.Collections.Generic
Imports System.Text
Public Class myWebBrowser
Inherits System.Windows.Forms.WebBrowser
Protected Overrides Sub WndProc(ByRef m As
System.Windows.Forms.Message)
Select Case m.Msg
Case &H201, &H204, &H207, &H21 ' WM_LMOUSEBUTTON
MyBase.DefWndProc(m)
Return
End Select
MyBase.WndProc(m)
End Sub 'WndProc
End Class 'myWebBrowse
My question is, how and where do I implement this? Do I make a new
class and put this there? How do I use the "myWebBrowser" class to
create the component that appears on the form?
If you can point me in the right direction, it'd be appreciated. I've
found plenty of documentation on overriding, and controls, but none on
creating and using a component control.
Thanks very much,
Matt
I'm very new to this level of programming and .net in general. My
background is VB.
I am attempting to use the WebBrowser control to load a flash movie,
and it is a known issue that the WebBrowser control doesn't natively
support mouse clicks (unless the form loses and regains focus).
A workaround has been presented over at CodeProject and it is as
follows:
Imports System
Imports System.Collections.Generic
Imports System.Text
Public Class myWebBrowser
Inherits System.Windows.Forms.WebBrowser
Protected Overrides Sub WndProc(ByRef m As
System.Windows.Forms.Message)
Select Case m.Msg
Case &H201, &H204, &H207, &H21 ' WM_LMOUSEBUTTON
MyBase.DefWndProc(m)
Return
End Select
MyBase.WndProc(m)
End Sub 'WndProc
End Class 'myWebBrowse
My question is, how and where do I implement this? Do I make a new
class and put this there? How do I use the "myWebBrowser" class to
create the component that appears on the form?
If you can point me in the right direction, it'd be appreciated. I've
found plenty of documentation on overriding, and controls, but none on
creating and using a component control.
Thanks very much,
Matt