Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2012 Disable clicks on webbrowser control (Converted from C to VB.Net)

$
0
0
If any of you can get your head around this one, or test the code for me on your OS and browser control. Would be a big help. I converted this from C to cb.net.
Code:

    'Disable the clicks on browser control.
    Const FEATURE_DISABLE_NAVIGATION_SOUNDS As Integer = 21
    Const SET_FEATURE_ON_THREAD As Integer = &H1
    Const SET_FEATURE_ON_PROCESS As Integer = &H2
    Const SET_FEATURE_IN_REGISTRY As Integer = &H4
    Const SET_FEATURE_ON_THREAD_LOCALMACHINE As Integer = &H8
    Const SET_FEATURE_ON_THREAD_INTRANET As Integer = &H10
    Const SET_FEATURE_ON_THREAD_TRUSTED As Integer = &H20
    Const SET_FEATURE_ON_THREAD_INTERNET As Integer = &H40
    Const SET_FEATURE_ON_THREAD_RESTRICTED As Integer = &H80

    <DllImport("urlmon.dll")> _
    <PreserveSig> _
    Private Shared Function CoInternetSetFeatureEnabled(FeatureEntry As Integer, <MarshalAs(UnmanagedType.U4)> dwFlags As Integer, fEnable As Boolean) As <MarshalAs(UnmanagedType.[Error])> Integer
    End Function

It's meant to disable the link click sounds generated by IE. Does anyone else know of a way to do this, which works regardless of the OS? I am using Window 7 Ultimate

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>