Docking a form on the desktop

VB , VB.NET , .NET , Docking , Code , Programming , Visual Studio Belgium
  • 5 years ago

    How can I dock my form on my desktop? I want it to dock automatically to the sides of the screen, but I should be able to move it around (keeping it docked offcourse) When I set topmost, the other windows still maximize underneath.

  • 5 years ago

    So I can dock it now using

    Dim desktoparea As Rectangle = Screen.PrimaryScreen.WorkingArea
                Location = New Point(desktoparea.Width - Me.Width, 1)

    But how do I stop programs from maximizing behind my program? I want it to collide against it when i click maximize. Plus I can simply move it away from the side, how can I stop this?

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook