473,725 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pinvoke - LockWindowUpdat e

I am using the LockWindowUpdat e 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.

Jan 9 '06 #1
2 3019
Gene,

You would call LockWindowUpdat e and pass IntPtr.Zero as the parameter
(equivalent to null).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Gene Vital" <no********@msn ew.com> wrote in message
news:OO******** ******@TK2MSFTN GP14.phx.gbl...
I am using the LockWindowUpdat e 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.

Jan 9 '06 #2
Nicholas Paldino [.NET/C# MVP] wrote:
Gene,

You would call LockWindowUpdat e and pass IntPtr.Zero as the parameter
(equivalent to null).

Hope this helps.

That did it. Thanks...
Jan 10 '06 #3

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

Similar topics

4
3712
by: Ted | last post by:
Is it possible to use mailslots in .NET using PInvoke? I have a VC++ 6.0 based app that creates and listens to a mailslot. I have a second VC++ 6.0 based app that opens the mailslot and writes to it successfully. So this stuff works. Additionally, I have a VB.NET app that opens the mailslot successfully using CreateFile() (with PInvoke). What looks like a proper handle is returned and there is no error.
1
12882
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. ...
3
3465
by: Brett Robichaud | last post by:
I have created a simple background thread to make one pinvoke call into a DLL I've created. My Winforms app spawns the thread in the form load event then go about it's business. The problem is that my form appears to be blocked while the background thread is running. I am very familir with threads in unmanaged code but am just getting into them in C#. Are there issues I need to be aware of with regards to threading a simple pinvoke...
5
2827
by: vertigo | last post by:
Hello I use some win 32 API function for example: HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile
2
6938
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
5
7881
by: _iycrd | last post by:
After numerous problems, I'm having second thoughts about using C++/CLI to wrap a native DLL. On the other hand, PInvoke seems like it will take a huge amount of work, if it will work at all. The native DLL uses raw data buffers that are normally handed to it (via pointer) from another native function. If I'm piloting this with C#/PInvoke, how could those raw data buffers be created and immobilized? In C++/CLI, there is pin_ptr to...
3
9797
by: Paul Remblance | last post by:
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?
8
6657
by: Rajesh Soni | last post by:
Hi! I'm getting a PInvoke error while trying to execute the following code... declaration: Structure POINTAPI Dim x As IntPtr
14
3787
by: Mohamed Mansour | last post by:
Hey there, this will be somewhat a long post, but any response is appreciated! I have done many PInvoke in the past from C++ to C#, but I did PInvoke within C# not C++/CLI. Can someone explain more why C++/CLI would be better to PInvoke than doing the PInvoke in C#? Because, usually in C# as you already know we use DLLImport and extern
0
8878
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
8749
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
9250
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...
1
9165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9097
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6006
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
4507
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
4776
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2626
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.