-1

I have created a windows form in vb.net 2010. I am trying to find out how i dock it to any side of the screen. Basically, the form will docking about 4 pixel of screen.
That possible how do i do it please.
By the way, this question like WinAmp docking system

I hope that make it sense

FunnyMan

Visual Vincent
  • 18,045
  • 5
  • 28
  • 75

1 Answers1

1

maybe you can use this property:

   Me.SetDesktopLocation(4, 4)

this will locate your form 4 pixels from the left of the screen and 4 pixels from the top of your screen.

and if you want to locate it in other place sometimes it better to check the users screen size, in VB its very easy:

 Dim screenWidth As Integer = Screen.PrimaryScreen.Bounds.Width
 Dim screenHeight As Integer = Screen.PrimaryScreen.Bounds.Height

also you can restrict docking using this property and form events

Jonathan Applebaum
  • 5,738
  • 4
  • 33
  • 52
  • I know that code, i am use that for startup form I want code like at winamp docking system –  Mar 20 '16 at 12:39