473,883 Members | 2,621 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 8147
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
2244
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
7282
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
16936
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
1997
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
1692
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
2314
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
1283
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
9933
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
9786
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
11125
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
10734
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
10407
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
9568
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...
1
7962
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5982
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3230
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.