If Not My.Computer.Screen.Bounds.Right - My.Computer.Screen.WorkingArea.Right = 0 Then End If If Not My.Computer.Screen.Bounds.Bottom - My.Computer.Screen.WorkingArea.Bottom = 0 Then ' I did hlep here If Not My.Computer.Screen.Bounds.Bottom - My.Computer.Screen.WorkingArea.Bottom = 0 Then If MousePosition.X < 20 Then Form2.Show() Form2.Size = New System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width / 2, Screen.PrimaryScreen.WorkingArea.Height) Form2.Location = New Point(0, 0) ElseIf MousePosition.X > Screen.PrimaryScreen.WorkingArea.Width - (My.Computer.Screen.Bounds.Height - My.Computer.Screen.WorkingArea.Height) Then Form2.Show() Form2.Size = New System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width / 2, Screen.PrimaryScreen.WorkingArea.Height) Form2.Location = New Point((Screen.PrimaryScreen.WorkingArea.Width / 2), 0) ElseIf MousePosition.Y < 20 Then Form2.Show() Form2.Size = New System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height / 2) Form2.Location = New Point(0, 0) ElseIf MousePosition.Y > Screen.PrimaryScreen.WorkingArea.Height - (My.Computer.Screen.Bounds.Height - My.Computer.Screen.WorkingArea.Height) Then Form2.Show() Form2.Size = New System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height / 2) Form2.Location = New Point(0, (Screen.PrimaryScreen.WorkingArea.Height / 2) - (My.Computer.Screen.Bounds.Width - My.Computer.Screen.WorkingArea.Width)) Else Form2.Hide() End If End If End If If Not My.Computer.Screen.Bounds.Top - My.Computer.Screen.WorkingArea.Top = 0 Then If MousePosition.X < 20 Then Form2.Show() Form2.Size = New System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width / 2, Screen.PrimaryScreen.WorkingArea.Height) Form2.Location = New Point(0, My.Computer.Screen.Bounds.Height - My.Computer.Screen.WorkingArea.Height) ElseIf MousePosition.X > Screen.PrimaryScreen.WorkingArea.Width - (My.Computer.Screen.Bounds.Height - My.Computer.Screen.WorkingArea.Height) Then Form2.Show() Form2.Size = New System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width / 2, Screen.PrimaryScreen.WorkingArea.Height) Form2.Location = New Point((Screen.PrimaryScreen.WorkingArea.Width / 2), My.Computer.Screen.Bounds.Height - My.Computer.Screen.WorkingArea.Height) ElseIf MousePosition.Y < 20 Then 'top Form2.Show() Form2.Size = New System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height / 2) Form2.Location = New Point(0, (My.Computer.Screen.Bounds.Height - My.Computer.Screen.WorkingArea.Height)) ElseIf MousePosition.Y > Screen.PrimaryScreen.WorkingArea.Height - (My.Computer.Screen.Bounds.Height - My.Computer.Screen.WorkingArea.Height) Then 'button Form2.Show() Form2.Size = New System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height / 2) Form2.Location = New Point(0, (Screen.PrimaryScreen.WorkingArea.Height / 1.82)) Else Form2.Hide() End If End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)