473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hide and then show changes to a form?

In past languages (I'm thinking of FoxPro here and possibly VB 2.0 or
so), you could "freeze" the visual display of a form while you update
it in code, then "reveal" the updated form. This kept the display
from flashing or bogging down while it drew every individual thing one
at a time and made it look neat and clean to the user.

Is there a similar function in VB.NET, without actually hiding the
form?
Nov 21 '05 #1
4 3216
Hi,

SuspendLayout and ResumeLayout

http://msdn.microsoft.com/library/de...ayouttopic.asp

Ken
----------------------------
"Brian Newman" <b2******@or.blm.gov> wrote in message
news:3a*************************@posting.google.co m...
In past languages (I'm thinking of FoxPro here and possibly VB 2.0 or
so), you could "freeze" the visual display of a form while you update
it in code, then "reveal" the updated form. This kept the display
from flashing or bogging down while it drew every individual thing one
at a time and made it look neat and clean to the user.

Is there a similar function in VB.NET, without actually hiding the
form?
Nov 21 '05 #2
Brian,

Do you mean this?

Suspendlayout
http://msdn.microsoft.com/library/de...ayouttopic.asp

Cor
"Brian Newman" <b2******@or.blm.gov>
In past languages (I'm thinking of FoxPro here and possibly VB 2.0 or
so), you could "freeze" the visual display of a form while you update
it in code, then "reveal" the updated form. This kept the display
from flashing or bogging down while it drew every individual thing one
at a time and made it look neat and clean to the user.

Is there a similar function in VB.NET, without actually hiding the
form?

Nov 21 '05 #3
"Brian Newman" <b2******@or.blm.gov> schrieb:
In past languages (I'm thinking of FoxPro here and possibly VB 2.0 or
so), you could "freeze" the visual display of a form while you update
it in code, then "reveal" the updated form. This kept the display
from flashing or bogging down while it drew every individual thing one
at a time and made it look neat and clean to the user.


On the one hand, you can prevent .NET's /layouting/ engine from working by
calling the form's 'SuspendLayout' and 'ResumeLayout' methods.

On the other hand, you can prevent /drawing/ of a specific window using
p/invoke:

Preventing controls from redrawing
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=disableredrawing>

Some controls, like listboxes and comboboxes provide 'BeginUpdate' and
'EndUpdate' methods to prevent the control from updating its UI while items
are added/removed/changed.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #4
Thanks to all for the suggestions, though neither of those techniques
seems to be working in my particular situation. I can still see each
control being painted on, whether I put Suspend/ResumeLayout or
SendMessage False/True for the form or for the panels that hold the
text boxes. I'll keep fiddling with it.
Nov 21 '05 #5

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

Similar topics

13
by: genetic.error | last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up before... The VS.Net MSDN file seems to state that the following should work: Form1.Show Form1.Visible = True Form1.Hide...
2
by: Ajai Kumar .R | last post by:
Hai all, I've two or more forms on my app. My requirement is, Have to show the first form asa the user press a button have to hide the first form and show the second form. If the user press the...
5
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
2
by: MOHSEN KASHANI | last post by:
Hi, I am trying to hide some form elements in a form by default and show/hide depending on which radio button is clicked. This is what I have but it is not working: <head> <style> ..noshow {...
4
by: jerryyang_la1 | last post by:
I've found this script that allows be to hide/show form elements.. <script language="JavaScript"><!-- var toggle = true; function show(object) { if (document.layers && document.layers)...
4
by: BrianDH | last post by:
Hi I have an application with 3 windows forms. One of which I load at startup but hide, then show/hide based on users click. How can I test to see if the windows is hidden, or is at the moment...
1
by: asilverpeach | last post by:
Hey Guys! Found some great scripts here on this topic but have to make to changes to the code that I can't seem to figure out. First, In the following code clicking on the headers shows the...
13
by: jeff | last post by:
I am attempting to be able to show and hide a form called viewAllForm. I declared an instance of the form in a module. Public viewAllForm As New frmViewAll However I keep getting runtime errors...
10
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.