Click here to Skip to main content
13,046,356 members (84,079 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

3.5K views
Posted 12 Jun 2010

Dragging a Borderless Form

, 12 Jun 2010
Rate this:
Please Sign up or sign in to vote.
The original snippet I made is in VB.NETProtected Overrides Sub WndProc(ByRef e As Message) MyBase.WndProc(e) If e.Msg = &H84 AndAlso e.Result = &H1 Then e.Result = &H2 End SubI used Reflector to translate it to C#protected override void WndProc(ref Message...
The original snippet I made is in VB.NET

Protected Overrides Sub WndProc(ByRef e As Message)
       MyBase.WndProc(e)
       If e.Msg = &H84 AndAlso e.Result = &H1 Then e.Result = &H2
   End Sub



I used Reflector to translate it to C#

protected override void WndProc(ref Message e)
{
    base.WndProc(ref e);
    if ((((e.Msg == 0x84) && (e.Result == ((IntPtr) 1))) ? 1 : 0) != 0)
    {
        e.Result = (IntPtr) 2;
    }
}


Nearly the same code, but the second condition I check for here is different.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Anshul R
Student
India India
No Biography provided

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 13 Jun 2010
Article Copyright 2010 by Anshul R
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid