Solved

What is the WPF Equivalent to overriding the WndProc event

Posted on 2008-06-23
2
2,460 Views
Last Modified: 2013-12-16
I am trying to move some custom control library applications over to WPF. In one application in particular it is critical that i can trap for the following events that occur on the control. I am having trouble trapping for the windows messages, because the namespaces do not exist in wpf. What can i do to mimic this functionality in WPF?

Thanks in advance.

   Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        Select Case m.Msg
            Case WM_MOVING
            Case WM_LBUTTONDBLCLK
            Case WM_LBUTTONDOWN    
            Case WM_LBUTTONUP
            Case WM_MOUSEACTIVATE
            Case WM_ACTIVATE
            Case WM_MOUSELEAVE
            Case Else
        End Select
        MyBase.WndProc(m)
    End Sub
0
Comment
Question by:talker2004
2 Comments
 
LVL 16

Accepted Solution

by:
CuteBug earned 500 total points
ID: 21854034
0
 
LVL 7

Author Comment

by:talker2004
ID: 21865699
This is exctly the type of stuff i am looking for.

Thanks

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now