Using the office 2007 Ribbon ( drag-n-drop a window without using the border ) [modified]
-
Hello ;), i'm using the office 2007 ribbon.. so i deleted the control bar by setting the Form Border Style to None. So i can't drag-n-drop all the window now ... i don't kno how can i tell the control to delegate the drag-n-drop event to the parent container ... ( the window ) i hope that my question is clear .. thank you. ps : sorry for my bad english X|
modified on Sunday, September 14, 2008 7:36 AM
-
Hello ;), i'm using the office 2007 ribbon.. so i deleted the control bar by setting the Form Border Style to None. So i can't drag-n-drop all the window now ... i don't kno how can i tell the control to delegate the drag-n-drop event to the parent container ... ( the window ) i hope that my question is clear .. thank you. ps : sorry for my bad english X|
modified on Sunday, September 14, 2008 7:36 AM
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HTCAPTION = 0x2;[DllImport("User32.dll")]
public static extern bool ReleaseCapture();
[DllImport("User32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);private void Form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) // let anything on MouseDown handle with this
{
if (e.Button == MouseButtons.Left)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
}
}I founder it from Syncfusion. ([^])
Chuck Norris has the greatest Poker-Face of all time. He won the 1983 World Series of Poker, despite holding only a Joker, a Get out of Jail Free Monopoloy card, a 2 of clubs, 7 of spades and a green #4 card from the game UNO.
In the movie "The Matrix", Chuck Norris is the Matrix. If you pay close attention in the green "falling code" scenes, you can make out the faint texture of his beard.
Chuck Norris actually owns IBM. It was an extremely hostile takeover.