Protected Overrides Sub Dispose(ByVal disposing As Boolean) M.Result = (Me.windowProcHandle, m.HWnd, CUInt(m.Msg), m.WParam, m.LParam) M.Result = (m.HWnd, CUInt(m.Msg), m.WParam, m.LParam) If (Me.windowProcHandle = IntPtr.Zero) Then Private Function Callback(ByVal hWnd As IntPtr, ByVal msg As UInteger, ByVal wparam As IntPtr, ByVal lparam As IntPtr) As IntPtrĭim m As = .Create(hWnd, CInt(msg), wparam, lparam) Public ReadOnly Property IsHandleCreated() As Boolean Public ReadOnly Property IsDisposed() As Boolean Return (((Not Me.Site Is Nothing) AndAlso Me.Site.DesignMode) OrElse StaticMethods.IsDesignMode(MyBase.Parent)) Public ReadOnly Property DesignMode() As Boolean Public Property BorderStyle() As BorderStyle Return coredll.GetWindowLong(hWnd, nIndex)įriend Const DLLNAME As String = "coredll.dll"įriend Const DLLNAME As String = "user32.dll"īoth IsDesignTime and IsRunTime returns correct values.Ĭustom control Public Class SystemControl Return user32.GetWindowLong(hWnd, nIndex) (Example only) Friend Class NativeMethodsįriend Shared ReadOnly Property IsDesignTime() As Booleanįriend Shared ReadOnly Property IsRunTime() As Booleanįriend Shared Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As Integer If I drop the control to a form Visual Studio (2008) crashes. But my problem occurs when trying to implement this at design-time. I've successfully changed the wndproc address in a custom control at run-time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |