waty only

Hello waty

I am very interesred in  2 questions you answered here.

1)global right mouse click disable, that can be turned on   and off from my app.
2)"a sample project implementing a task manager"

I am hopeing you will e-mail me both these solutions
My project is being held up, and I think you can
help me. My email is hbdevice@netcom.ca

 
Ive posted the original amount of points for both
questions 150+100.
   

harryqAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
watyConnect With a Mentor Commented:
I have send you the mail.

0
 
kamallCommented:
waty,
I am also interested in the first question (about the right mouse button). I checked your history and couldnt find that qustion.
Can you please refere me to the question number?
0
 
harryqAuthor Commented:
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
harryqAuthor Commented:
kamall
It seems I was thinking of your answer when I composed my question.
http://www.experts-exchange.com/topics/comp/lang/visualbasic/Q.10066315
Can you help me with global right mouse intercept
that can be enabled and disabled from my app?
If so, Ill post you a question for 200 points.


0
 
harryqAuthor Commented:
waty, thanks, Ill leave this open while I play with
the "task manager"
0
 
harryqAuthor Commented:
waty, thanks, Ill leave this open while I play with
the "task manager"
0
 
watyCommented:
Here is some code to disable the right click in the web browser.
I think, with some little modifications, you should be able to do what you want

'****************************************************************
'Windows API/Global Declarations for :Disable Right Mouse click
'****************************************************************

'Declarations for Preventing Right-Click in WebBrowser Contr
'     ol:

Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA"
       (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal
       dwThreadId As Long) As Long

Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long)
       As Long

Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal
       nCode As Long, ByVal wParam As Long, lparam As Any) As Long

Declare Function GetCurrentThreadId Lib "kernel32" () As Long

Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal
       hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As
       Long
       Public Const WM_RBUTTONUP = &H205
       Public Const WH_MOUSE = 7

Type POINTAPI
       x As Long
       y As Long
End Type


Type MOUSEHOOKSTRUCT
       pt As POINTAPI
       hwnd As Long
       wHitTestCode As Long
       dwExtraInfo As Long
End Type

Public l_hMouseHook As Long






'****************************************************************
' Name: Disable Right Mouse click
' Description:Disable Right Mouse click in the web browser c
'     ontrol.
' Inputs:None
' Returns:None
' Assumes:None
' Side Effects:None
'****************************************************************


Public Function MouseHookProc(ByVal nCode As Long, ByVal wParam As Long,

       mhs As MOUSEHOOKSTRUCT) As Long
       '     'Prevent Right-Mouse Clicks in WebBrowser Control:

              If (nCode >= 0 And wParam = WM_RBUTTONUP) Then
                     Dim sClassName As String
                     Dim sTestClass As String
                     sTestClass = "HTML_Internet Explorer"
                     sClassName = String$(256, 0)

                            If GetClassName(mhs.hwnd, sClassName, Len(sClassName)) > 0 Then

                                          If Left$(sClassName, Len(sTestClass)) = sTestClass Then
                                                 MouseHookProc = 1
                                                 Exit Function
                                          End If

                            End If

              End If

       MouseHookProc = CallNextHookEx(l_hMouseHook, nCode, wParam, mhs)
End Function


Public Sub BeginRightMouseTrap()

       '     'Start Trapping Right-Mouse clicks in WebBrowser Control:
       l_hMouseHook = SetWindowsHookEx(WH_MOUSE, AddressOf MouseHookProc,
       App.hInstance, GetCurrentThreadId)
End Sub


Public Sub EndRightMouseTrap()

       '     'End Trapping Right-Mouse clicks in WebBrowser Control:
       UnhookWindowsHookEx l_hMouseHook
End Sub

'///////////////////////////////////////////////////////////
'     ///////////
Then add this code to your form:

Private Sub Form_Load()

       BeginRightMouseTrap      
End Sub


Private Sub Form_Unload(Cancel As Integer)

EndRightMouseTrap

End Sub


Private Function MouseHookProc(ByVal nCode As Long, ByVal wParam As

       Long, mhs As MOUSEHOOKSTRUCT) As Long
       '     'Prevent Right-Click in WebBrowser Control:

              If (nCode >= 0 And wParam = WM_RBUTTONUP) Then
                     Dim sClassName As String
                     Dim sTestClass As String
                     sTestClass = "HTML_Internet Explorer"
                     sClassName = String$(256, 0)

                            If GetClassName(mhs.hwnd, sClassName, Len(sClassName)) > 0 Then

                                          If Left$(sClassName, Len(sTestClass)) = sTestClass Then
                                                 MouseHookProc = 1
                                                 Exit Function
                                          End If

                            End If

              End If

       MouseHookProc = CallNextHookEx(l_hMouseHook, nCode, wParam, mhs)
End Function

0
 
harryqAuthor Commented:
Thanks Waty, I'm still tweaking but Ill close
the question.
 
0
All Courses

From novice to tech pro — start learning today.