Docking a form on the desktop

VB , VB.NET , .NET , Docking , Code , Programming , Visual Studio Belgium
  • 9 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.

  • 9 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).

Contribute

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.

“In theory, theory and practice are the same. In practice, they're not.”