SND Atilla EXG

This commit is contained in:
2025-01-22 13:31:21 +01:00
parent 0cf3ccd1fb
commit d94c7676b6
9 changed files with 184 additions and 63 deletions

View File

@@ -1,4 +1,28 @@
Public Class frmNotify
Imports System.Runtime.InteropServices
Public Class frmNotify
' WinAPI-Funktion importieren
<DllImport("user32.dll", SetLastError:=True)>
Private Shared Function SetWindowPos(
ByVal hWnd As IntPtr,
ByVal hWndInsertAfter As IntPtr,
ByVal X As Integer,
ByVal Y As Integer,
ByVal cx As Integer,
ByVal cy As Integer,
ByVal uFlags As UInteger
) As Boolean
End Function
' Konstante für SetWindowPos
Private Const SWP_NOACTIVATE As UInteger = &H10
Private Const SWP_NOMOVE As UInteger = &H2
Private Const SWP_NOSIZE As UInteger = &H1
Private Shared ReadOnly HWND_TOPMOST As New IntPtr(-1)
Public Y As Integer = 0
Public AvisoID As Integer = 0
@@ -69,6 +93,13 @@
Private Sub frmNotify_Load(sender As Object, e As EventArgs) Handles Me.Load
Timer.Interval = TimerInterval
lblText.Cursor = IIf(AvisoID > 0, Cursors.Hand, Cursors.Default)
' Fenster in den Vordergrund bringen, ohne Fokus zu erzwingen
SetWindowPos(Me.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE)
'If Y = 0 Then
'Me.Location = New Point(Me.Owner.Width - Me.Width - 10, Me.Owner.Height - Me.Height - 10)
' Else