-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHighlight_Overlay.vb
More file actions
28 lines (22 loc) · 961 Bytes
/
Highlight_Overlay.vb
File metadata and controls
28 lines (22 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Public Class Highlight_Overlay
' Ensure Overlay Panel doesn't set to active when it's shown
Protected Overrides ReadOnly Property ShowWithoutActivation As Boolean
Get
Return True
End Get
End Property
Private Sub Highlight_Overlay_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' Initial adjustments of Overlay Panel
AdjustPanelSizeAndLocation()
End Sub
Private Sub Highlight_Overlay_Resize(sender As Object, e As EventArgs) Handles Me.Resize
AdjustPanelSizeAndLocation()
End Sub
Private Sub AdjustPanelSizeAndLocation()
' Ensuring Panel1 is always 5px smaller around the border compared to OverlayForm
With Panel1
.Location = New Point(5, 5) ' 5px offset from the top-left corner
.Size = New Size(Me.ClientSize.Width - 10, Me.ClientSize.Height - 10) ' 5px offset from each side
End With
End Sub
End Class