Projektdateien hinzufügen.
This commit is contained in:
28
Pilz.UI/Utilities/DrawingControl.vb
Normal file
28
Pilz.UI/Utilities/DrawingControl.vb
Normal file
@@ -0,0 +1,28 @@
|
||||
Imports System.Runtime.CompilerServices
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace Utils
|
||||
|
||||
Public Module DrawingControl
|
||||
|
||||
Private Const WM_SETREDRAW = 11
|
||||
|
||||
<Extension>
|
||||
Public Sub SuspendDrawing(control As Control)
|
||||
SendMessage(control.Handle, WM_SETREDRAW, False, 0)
|
||||
End Sub
|
||||
|
||||
<Extension>
|
||||
Public Sub ResumeDrawing(control As Control)
|
||||
ResumeDrawing(control, True)
|
||||
End Sub
|
||||
|
||||
<Extension>
|
||||
Public Sub ResumeDrawing(control As Control, redraw As Boolean)
|
||||
SendMessage(control.Handle, WM_SETREDRAW, True, 0)
|
||||
If redraw Then control.Refresh()
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
End Namespace
|
||||
5
Pilz.UI/Utilities/User32Bridge.vb
Normal file
5
Pilz.UI/Utilities/User32Bridge.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
Public Module User32Bridge
|
||||
|
||||
Friend Declare Auto Function SendMessage Lib "user32.dll" (hWnd As IntPtr, Msg As Integer, wParam As Boolean, lParam As Integer) As Integer
|
||||
|
||||
End Module
|
||||
Reference in New Issue
Block a user