position result window below search
This commit is contained in:
@@ -829,15 +829,35 @@ Public Class frmSearchStart
|
||||
|
||||
Dim oForm As New frmDocumentResultList(My.LogConfig, oEnvironment, oParams)
|
||||
oForm.Show()
|
||||
|
||||
' Position Result Window below this window
|
||||
oForm.Location = GetResultFormLocation()
|
||||
oForm.Size = GetResultFormSize()
|
||||
Else
|
||||
Display_InfoItem("No results for this searchcombination!", Color.OrangeRed)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, Text)
|
||||
Finally
|
||||
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function GetResultFormLocation() As Point
|
||||
Dim oX = Location.X
|
||||
Dim oY = Location.Y + Size.Height
|
||||
|
||||
Return New Point(oX, oY)
|
||||
End Function
|
||||
|
||||
Private Function GetResultFormSize() As Size
|
||||
Dim oWidth = Size.Width
|
||||
' TODO: Smarter height calculation, maybe depending on screen height and parent form location
|
||||
Dim oHeight = 400
|
||||
|
||||
Return New Size(oWidth, oHeight)
|
||||
End Function
|
||||
|
||||
Private Sub frmSearchStart_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
|
||||
If e.KeyCode = Keys.F2 Then
|
||||
Start_Search()
|
||||
|
||||
Reference in New Issue
Block a user