How To Move a Border-less Dialog
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: How To Move a Border-less Dialog

Threaded View

  1. #1
    Join Date
    Oct 2009

    How To Move a Border-less Dialog

    Hi all,

    As the title sugest, it is -standard- not possible to move a boderless dialog
    (Keep mouse button depressed and move the cursor)
    You have to make it.
    So I came up with:

    private void Dialog1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
           while (Mouse.LeftButton == MouseButtonState.Pressed)
               this.Location = new Point(MousePosition.X, MousePosition.Y);
    but it does not work, however if I change pressed to depressed it works partly.


    Last edited by TBBW; December 11th, 2012 at 01:06 PM. Reason: code correction

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)