"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ON**************@TK2MSFTNGP05.phx.gbl...
"Paul Remblance" <pa**@remblance.co.uk> schrieb:I have just converted a project from VB 2003 to VB 2005 and the
LockWindowUpdate no longer works!
Friend Declare Function LockWindowUpdate Lib "user32.dll" (ByVal
hWndLock As Long) As Boolean
LockWindowUpdate(Me.Handle.ToInt32)
LockWindowUpdate(0)
Any other ideas how to lock the window in VB 2005?
\\\
Private Declare Function LockWindowUpdate Lib "user32.dll" ( _
ByVal hWndLock As IntPtr _
) As Boolean
...
LockWindowUpdate(Me.Handle)
///
Note that 'Long' is a 64-bit type in VB.NET opposed to VB6 where it was a
32-bit type.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Many thanks, reached the same conclusion (but a bit slower!)
Friend Declare Function LockWindowUpdate Lib "user32.dll" (ByVal
Friend Declare Function LockWindowUpdate Lib "user32.dll" (ByVal
hWndLock As IntPtr) As Boolean
LockWindowUpdate(Me.Handle.ToInt64)
LockWindowUpdate(0)
hWndLock As Long to hWndLock As IntPtr
Me.Handle.ToInt32 to Me.Handle.ToInt64
Also tried your LockWindowUpdate(Me.Handle) which also worked.