Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
See more:
VB
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
Posted
Updated 16-Sep-11 12:52pm
v3
Comments
Dr.Walt Fair, PE 17-Sep-11 0:11am    
Please ask a question?

1 solution

No

You asked no question, just dumped some code which is not easy to read and I highly doubt anyone will take the time to go trhough what you're trying to do and what your problems is as that is what you're supposed to tell us.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Sep-11 20:10pm    
Well, an unambiguous answer :-) my 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900