You're allowing the message to pass through to the normal windows routines which are therefore undoing any changes you make.
vb.net Code:
Protected Overrides Sub WndProc(ByRef m As Message) Dim AllowNormalProcessing As Boolean = True If m.Msg = WM_TABLET_QUERYSYSTEMGESTURESTATUS Then 'Call the GlobalAdd atom Function Dim atom As String = GlobalAddAtom("MICROSOFT_TABLETPENSERVICE_PROPERTY") 'Call the setProc function SetProp(WindowHAndle, atom, TABLET_DISABLE_PRESSANDHOLD) GlobalDeleteAtom(atom) AllowNormalProcessing = False End If If m.Msg = WM_SYSCOMMAND And m.WParam.ToInt32 = SC_RESTORE Then SetWindowPos(taskBar, 0&, 0&, 0&, 0&, 0&, SWP_HIDEWINDOW) AllowNormalProcessing = False End If If AllowNormalProcessing Then MyBase.WndProc(m) End Sub




Reply With Quote