Q:

Strange WndProc bug in .Net. VB.Net more specifically

ETA: I use visual studio 2008 express edition.
If I override WndProc and mess up somehow, I'll usually backtrack by commenting out code until it works again.
The strange thing with WndProc though is you can strip it down to:
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
    MyBase.WndProc((m))
End Sub

and it still throws the error.
I have to remove the code and retype it in to reset the error.
Anyone else experienced this?
ETA:
Answered below by Chris Haas.
I hadn't realised, but this problem must only have occurred when I'd used code from reflector. Reflector mis-translates to vb.net and inserts extra brackets into the calls to WndProc base.

A:

When you wrap an argument in parenthesis you are overriding the ByRef call and instead calling it ByVal. See Argument Not Being Modified by Procedure Call - Underlying Variable
Just change the code to:
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
    MyBase.WndProc(m)
End Sub

