work on result lists for clipboard watcher
This commit is contained in:
@@ -50,10 +50,12 @@
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports System.Text
|
||||
Imports System.Drawing
|
||||
Imports System.Text
|
||||
Imports System.Windows.Forms
|
||||
''' <summary>
|
||||
''' Provides common utility functions that do not require a specific context.
|
||||
''' </summary>
|
||||
@@ -63,4 +65,45 @@ Public Class Utils
|
||||
If oWasHyphen AndAlso oBuilder.Length > 0 Then oBuilder.Length -= 1
|
||||
Return oBuilder.ToString()
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Checks if a point is Visible on any screen
|
||||
''' </summary>
|
||||
Public Shared Function IsVisibleOnAnyScreen(Location As Point) As Boolean
|
||||
Try
|
||||
Dim oRect As New Rectangle(Location, New Size(0, 0))
|
||||
|
||||
For Each oScreen In Screen.AllScreens
|
||||
If oScreen.WorkingArea.IntersectsWith(oRect) Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
|
||||
Return False
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Checks if Size is not negative
|
||||
''' </summary>
|
||||
Public Shared Function SizeIsVisible(Size As Size) As Boolean
|
||||
If Size.Width >= 0 And Size.Height >= 0 Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Checks if Location is not negative
|
||||
''' </summary>
|
||||
Public Shared Function LocationIsVisible(Location As Point) As Boolean
|
||||
If Location.X >= 0 And Location.Y >= 0 Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
Return False
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user