This commit is contained in:
JenneJ
2016-06-01 13:09:04 +02:00
parent e74b44e1e9
commit 00c8deb340
3 changed files with 45 additions and 10 deletions

View File

@@ -1,7 +1,22 @@
Imports DevExpress.XtraEditors.Controls
Imports System.Runtime.InteropServices
Public Class ClassControlValues
<DllImport("user32.dll")> _
Public Shared Function SendMessage(hWnd As IntPtr, msg As Int32, wParam As Boolean, lParam As Int32) As Integer
End Function
Private Const WM_SETREDRAW As Int32 = 11
Private Sub SuspendDraw(c As Control)
SendMessage(c.Handle, WM_SETREDRAW, False, 0)
End Sub
Private Sub ResumeDraw(c As Control)
SendMessage(c.Handle, WM_SETREDRAW, True, 0)
c.Refresh()
End Sub
Public Shared Function ControlHasValue(control As Control) As Boolean
Select Case control.GetType()
@@ -332,6 +347,9 @@ Public Class ClassControlValues
For Each Ctrl As Control In controls
Dim controlTagId = DirectCast(Ctrl.Tag, ClassControlMetadata).Id
'If controlTagId = 474 Then
' MsgBox("Thats it")
'End If
@@ -360,12 +378,14 @@ Public Class ClassControlValues
ControlLoader.DataGridViewCheckable.LoadList(grid, FormID, ConnID, sqlcommand)
End Select
Next
SW.Stop()
sw.Stop()
elapsed = sw.Elapsed.TotalSeconds
SW.Stop()
SW.Reset()
sw.Stop()
sw.Reset()
If LogErrorsOnly = False Then ClassLogger.Add(" >> LoadControlValuesList took " & Format(elapsed, "0.000000000") & " seconds", False)
Catch ex As Exception
ClassLogger.Add("Unexpected Error in LoadControlValuesList: " & ex.Message, True)