|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
LockWindowUpdate VB 2005I 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? I have a tab control where I need to 'flick' between tabs in the background. Seeing each page flash as it goes through is annoying. Tried: SuspendLayout() with the form and tab control which didn't work. "Paul Remblance" <p***@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/>
Show quote
Hide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message Many thanks, reached the same conclusion (but a bit slower!)news:ONvz3CMgGHA.4304@TK2MSFTNGP05.phx.gbl... > "Paul Remblance" <p***@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/> 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. "Paul Remblance" <p***@remblance.co.uk> schrieb: You do not need 'Me.Handle.ToInt62'. Handles are 32-bit on 32-bit systems > 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 and 64-bit on 64-bit systems, which is what 'IntPtr' is designed for. So I strongly recommend to use the solution I posted! -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
converting the use of interfaces under vb6 to vb.net
WebBrowser Control Frame Documents Overnight processes Closing another application Text color list box opening a document with system's default app Stupid Question of the day...... sql server 2005 Button Image How To Prevent Multible Users Of Application From Clobbering Each Other |
|||||||||||||||||||||||