neu
This commit is contained in:
@@ -882,6 +882,23 @@ Public Class frmMain
|
||||
If formTmp IsNot Nothing Then formTmp.Focus()
|
||||
End Sub
|
||||
|
||||
Dim secondmonitorSelected = False
|
||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
Dim secondaryMonitor = Screen.AllScreens.FirstOrDefault(Function(x) Not x.Primary)
|
||||
If secondmonitorSelected Then
|
||||
secondaryMonitor = Screen.AllScreens.FirstOrDefault(Function(x) x.Primary) 'Hauptbildschirm
|
||||
End If
|
||||
If secondaryMonitor IsNot Nothing Then
|
||||
Me.WindowState = FormWindowState.Normal
|
||||
Dim newLocation = secondaryMonitor.Bounds.Location
|
||||
newLocation.Offset(0, 0) ' adjust as needed
|
||||
Me.Location = newLocation
|
||||
Me.Refresh()
|
||||
Me.WindowState = FormWindowState.Maximized
|
||||
' Also see Me.Size and Me.Bounds
|
||||
End If
|
||||
secondmonitorSelected = Not secondmonitorSelected
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class MyRenderer
|
||||
|
||||
Reference in New Issue
Block a user