Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Using the office 2007 Ribbon ( drag-n-drop a window without using the border ) [modified]

Using the office 2007 Ribbon ( drag-n-drop a window without using the border ) [modified]

Scheduled Pinned Locked Moved C#
questiondocker
2 Posts 2 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mahhouraaaaaa
    wrote on last edited by
    #1

    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

    T 1 Reply Last reply
    0
    • M Mahhouraaaaaa

      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

      T Offline
      T Offline
      The Cake of Deceit
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups