473,800 Members | 2,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Freeze Screen Painting?

adh
How do you temporarly stop the screen painting in VB.NET (alla "echo off" in
vb6)?
I have a modal form that when closing keeps partial showing.
Thanks
ADH
Nov 21 '05 #1
7 8140
Hi

I think you may try to use the LockWindowUpdat e Win32 API to do that.
You may use it by using P/Invoke.

You may find the signature in the link below.
http://www.pinvoke.net/search.aspx?s...ate&namespace=[All]

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #2
adh
Thanks for the prompt reply.
The link you gave me, I get a
Server Error in '/' Application and can not reach it.
It seems that anyhow it will be a bit complicated?

Thanks, adh

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #3
ADH
OK. I looked at it.
I am not familiar with this kind of stuff and examples are not in VB.
Any other option? (The simple/stupid "echo off" option....)
Thanks

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 21 '05 #4

Declare it on Declarations section of your form:

Public Declare Function LockWindowUpdat e Lib "user32" Alias
"LockWindowUpda te" (ByVal hwndLock As Long) As Long
(...)

Then, when you need lock painting, use:
LockWindowUpdat e(Me.Handle.ToI nt32)

When you need turn on the painting, use:
LockWindowUpdat e(0)
[]s
Cesar
"ADH" <AD*******@devx .com> escreveu na mensagem
news:ew******** ******@TK2MSFTN GP11.phx.gbl...
OK. I looked at it.
I am not familiar with this kind of stuff and examples are not in VB.
Any other option? (The simple/stupid "echo off" option....)
Thanks

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 21 '05 #5
> Public Declare Function LockWindowUpdat e Lib "user32" Alias
"LockWindowUpda te" (ByVal hwndLock As Long) As Long


Bad declaration. You probably try this one:

Friend Declare Function LockWindowUpdat e Lib "user32.dll " ( _
ByVal hWndLock As IntPtr _
) As Boolean

Roman
Nov 21 '05 #6
ADH
Thanks to all.

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 21 '05 #7
Hi

Thanks for your quickly reply!
And thanks for Cesar and Roman's suggestion in the community.

If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #8

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

Similar topics

1
2240
by: Bill K | last post by:
I am developing a winforms project in vb.net. I have several forms that have a number of controls, grids, etc. When I load these as MDI child forms, they load slowly AND they paint/repaint on the screen, and it makes a sloppy presentation. I am unhappy with it, and obviously the client says that it is unacceptable. How can I make a nice, crisp form/screen opening? Thanks so much for you help.
3
7277
by: John Baker | last post by:
Hi: As in the "Wizard of Oz", I want people to "pay no attention to the man behind the curtain", by freezing the screen while a whole lot of things happen. I know about ECHO OFF, but this appears to reset when forms are opened and under other conditions. Are there any commands (Screen Refresh=False?) that will stop screen refreshing until another command is encountered that turns the screen refreshing on again? Thanks in advance.
8
16932
by: benben | last post by:
I created a form and overrided OnPaint, OnClick and OnResize methods. My OnPaint calls base.OnPaint then repaints the whole screen. The screen flickers a lot! It didn't happen when the app was written in C++. What is the general strategy to reduce screen flickering with C# Forms? Perhaps saving the screen as a bitmap and just bitblip when painted, and only change the bitmap when necessary? is it possible? ben
2
1717
by: Wei | last post by:
Hi, I have a .net application serves 150 user simultaneously to answer multiple choice questions on-line. Back end SQL server 2000. After the process started about 45 minutes, most of the user's screen got freeze. It happened three times. If 10 to 15 users work on the system for three hours, the system works fine. Could anyone tell me what can cause the problem and where I should look into? (including code, SQL server IIS server)
2
1995
by: paraidy | last post by:
Hi all, i would to know how is possible to freeze another process from my application and unfreeze it, can someone help me? thx all.
1
1690
by: guy.flowers | last post by:
Hi Have a problem, Ill give some history to the problem and add a little example code to start with to see if anybody can help or if I am correct in what the problem is. I have been looking on the newsgroups and have found lots of stuff on the problem but no solutions as of yet, will keep looking here to see if I can find one that fits.
3
2313
by: coolsolap | last post by:
Hi, :) I have a program which I need to have temporarily freeze user input for about 8 seconds. Is there a method using JavaScript only to freeze the mouse-cursor in a invisible position on the screen for a pre-set duration? Sincerest Regards, AmySol
0
1279
by: Litani | last post by:
Hi everyone, We have a winform application that uses webservices. It has list screens. The user selects a row from the grid and an edit screen is presented to the user with the selected row. Switching from the list screen to edit is slow if I have decent amount of controls. I can see the screen painting. In some cases, I can see the application painting some controls read only or disabled. Any suggestions on how to display the...
1
3880
by: murasame | last post by:
Hi, I have a question regarding windows display things. Using C++, is there any way to freeze the screen and show only one form active (only that form can receive input from user). The example of my description is like when windows user click shutdown from start menu. It shows choices like shutdown, restart, etc and not allow user to do input other than to that form. Any Idea?
0
9691
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
10507
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10279
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
10255
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
10036
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
6815
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
5473
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...
1
4150
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
3765
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.