473,850 Members | 2,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

LockWindowUpdat e VB 2005

I have just converted a project from VB 2003 to VB 2005 and the
LockWindowUpdat e no longer works!

Friend Declare Function LockWindowUpdat e Lib "user32.dll " (ByVal
hWndLock As Long) As Boolean
LockWindowUpdat e(Me.Handle.ToI nt32)
LockWindowUpdat e(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.
May 26 '06 #1
3 9804
"Paul Remblance" <pa**@remblance .co.uk> schrieb:
I have just converted a project from VB 2003 to VB 2005 and the
LockWindowUpda te no longer works!

Friend Declare Function LockWindowUpdat e Lib "user32.dll " (ByVal
hWndLock As Long) As Boolean
LockWindowUpdat e(Me.Handle.ToI nt32)
LockWindowUpdat e(0)

Any other ideas how to lock the window in VB 2005?


\\\
Private Declare Function LockWindowUpdat e Lib "user32.dll " ( _
ByVal hWndLock As IntPtr _
) As Boolean
....
LockWindowUpdat e(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/>

May 26 '06 #2

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:ON******** ******@TK2MSFTN GP05.phx.gbl...
"Paul Remblance" <pa**@remblance .co.uk> schrieb:
I have just converted a project from VB 2003 to VB 2005 and the
LockWindowUpd ate no longer works!

Friend Declare Function LockWindowUpdat e Lib "user32.dll " (ByVal
hWndLock As Long) As Boolean
LockWindowUpdat e(Me.Handle.ToI nt32)
LockWindowUpdat e(0)

Any other ideas how to lock the window in VB 2005?


\\\
Private Declare Function LockWindowUpdat e Lib "user32.dll " ( _
ByVal hWndLock As IntPtr _
) As Boolean
...
LockWindowUpdat e(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 LockWindowUpdat e Lib "user32.dll " (ByVal
Friend Declare Function LockWindowUpdat e Lib "user32.dll " (ByVal
hWndLock As IntPtr) As Boolean
LockWindowUpdat e(Me.Handle.ToI nt64)
LockWindowUpdat e(0)

hWndLock As Long to hWndLock As IntPtr
Me.Handle.ToInt 32 to Me.Handle.ToInt 64

Also tried your LockWindowUpdat e(Me.Handle) which also worked.
May 26 '06 #3
"Paul Remblance" <pa**@remblance .co.uk> schrieb:
Many thanks, reached the same conclusion (but a bit slower!)

Friend Declare Function LockWindowUpdat e Lib "user32.dll " (ByVal
Friend Declare Function LockWindowUpdat e Lib "user32.dll " (ByVal
hWndLock As IntPtr) As Boolean
LockWindowUpdat e(Me.Handle.ToI nt64)
LockWindowUpdat e(0)

hWndLock As Long to hWndLock As IntPtr
Me.Handle.ToInt 32 to Me.Handle.ToInt 64


You do not need 'Me.Handle.ToIn t62'. Handles are 32-bit on 32-bit systems
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/>

May 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
12890
by: Dan H. | last post by:
Hello, I've been having a pickle of time trying to find any information about the following. The Win32 API has a function called 'LockWindowUpdate' which, if I'm not mistaken, prohibits all painting of the window including children controls until unlocked. The only thing that I can find that even seems close in .NET is SuspendLayout and ResumeLayout, but these don't really effect painting - just sizing, moving, docking, and anchoring. ...
2
6945
by: Richard Thornley | last post by:
Hello, I have used the API Function "LockWindowUpdate" in my VB 6 applications and was curious if this API function still exists in VB.Net. I have spent 4 hours surfing the 'net for an example but found nothing that seems to work. If "LockWindowUpdate" is still valid in VB.Net could some provide a sample where a form is locked? Cheers, Richard
2
3024
by: Gene Vital | last post by:
I am using the LockWindowUpdate API to lock my form while updating and then Unlock when I am done. It was pretty simple to make the call to lock the form with the form handle but how do I Unlock it? I can't seem to get it. Thanks.
0
9895
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9741
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10666
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9503
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7071
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5735
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5929
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4546
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4140
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.