473,503 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form update

J L
I am removing and adding picture boxes on a form. I would like to have
the old image form remain until I have completed the changes. Is that
possible? As it is now, the form appears to blink as I remove the old
images and add the new ones. And the set of images displayed is not
the same from one state to the next. So I delete all the old ones
first (effectively clearing the screen) before adding the new ones.

Hope that makes sense,
TIA,
John
Nov 21 '05 #1
5 2211
JL,

You need to set them than first in there own bitmaps.

Now you have probably something as picturecox.imagefromfile

I hope this helps,

Cor
Nov 21 '05 #2
"J L" <jo**@marymonte.com> schrieb:
I am removing and adding picture boxes on a form. I would like to have
the old image form remain until I have completed the changes. Is that
possible? As it is now, the form appears to blink as I remove the old
images and add the new ones. And the set of images displayed is not
the same from one state to the next. So I delete all the old ones
first (effectively clearing the screen) before adding the new ones.

Take a look at 'Control.SuspendLayout' and 'Control.ResumeLayout' for
suspending layouting.

If you want to prevent a control from redrawing, take a look at the article
below:

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

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
J L
Hi Herfried
I thought SuspendLayout and ResumeLayout would be what I need. But it
appears that if you use this on a form, the underlying controls still
draw themselves in sequence once you resume layout.

What I did was wrap my code in me.SuspendLayout and me.ResumeLayout. I
then did a loop and removed all of the picture boxes on the form and
then a second loop and added them back. The screen blinked blank
showing I had removed the picture boxes and then displayed them.

Am I missing something?

TIA,
John

On Thu, 5 May 2005 10:18:31 +0200, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
"J L" <jo**@marymonte.com> schrieb:
I am removing and adding picture boxes on a form. I would like to have
the old image form remain until I have completed the changes. Is that
possible? As it is now, the form appears to blink as I remove the old
images and add the new ones. And the set of images displayed is not
the same from one state to the next. So I delete all the old ones
first (effectively clearing the screen) before adding the new ones.

Take a look at 'Control.SuspendLayout' and 'Control.ResumeLayout' for
suspending layouting.

If you want to prevent a control from redrawing, take a look at the article
below:

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


Nov 21 '05 #4
"J L" <jo**@marymonte.com> schrieb:
I thought SuspendLayout and ResumeLayout would be what I need. But it
appears that if you use this on a form, the underlying controls still
draw themselves in sequence once you resume layout.

What I did was wrap my code in me.SuspendLayout and me.ResumeLayout. I
then did a loop and removed all of the picture boxes on the form and
then a second loop and added them back. The screen blinked blank
showing I had removed the picture boxes and then displayed them.

Am I missing something?


Did you take a look at the 2nd solution I included in my post?

'SuspendLayout' will only disable layout logic, which includes docking and
anchoring for controls. It won't prevent them from being redrawn.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
J L
OMG! That works prefectly. How do you know all this STUFF!! LOL

Thank you very very much. Also one note to those that are interested,
be sure to put the code that redraws and refreshes in a Finally clause
or you can get hosed.

John

On Thu, 5 May 2005 17:16:38 +0200, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
"J L" <jo**@marymonte.com> schrieb:
I thought SuspendLayout and ResumeLayout would be what I need. But it
appears that if you use this on a form, the underlying controls still
draw themselves in sequence once you resume layout.

What I did was wrap my code in me.SuspendLayout and me.ResumeLayout. I
then did a loop and removed all of the picture boxes on the form and
then a second loop and added them back. The screen blinked blank
showing I had removed the picture boxes and then displayed them.

Am I missing something?


Did you take a look at the 2nd solution I included in my post?

'SuspendLayout' will only disable layout logic, which includes docking and
anchoring for controls. It won't prevent them from being redrawn.


Nov 21 '05 #6

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

Similar topics

4
4276
by: Eric | last post by:
Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works fine, however, when the checkbox is only field...
2
3403
by: Bill S. | last post by:
Hi, I am just starting to work with ASP, so bear that in mind... I have an ASP page that displays records from a table, and allows you to add, update and delete. There is a form with one...
9
2358
by: cooldv | last post by:
i know how to replace the sign " when SUBMITTING a form in asp by this code: message = Replace(usermessage, "'", "''"). My problem is DISPLAYING data in an asp FORM, from an an access database,...
2
2226
by: Lyn | last post by:
Hi, I am working on a genealogy project in which I have two tables: Person -- one record for each person in the family. Each record has a unique Autonum field (IDPerson). Partnerships -- one...
16
453
by: Adda | last post by:
If I cycle through the MdiChildActivate event of the parent form I can read text in a textbox on the child mdiform -- console.writeline(Me.ActiveMdiChild.Controls(1).Text) But if I have a sub...
5
3917
by: ortaias | last post by:
I have a form which calls up a second form for purposes of data entry. When closing the data entry form and returning to the main form, things don't work as expected. When I return to the main...
6
8519
by: Henry Stockbridge | last post by:
Hi, I have a popup that is used to update the records on an open form. I cannot get form to refresh with the new values. Any help you can lend would be appreciated. Here is the code for the...
2
2836
by: devine | last post by:
Hi All, I am trying to send an automatic email when an update has been made. My update statement will updates 6 fields, and dependant on one of the fields, I would like to send an email using CDO....
5
10870
by: Miro | last post by:
I will try my best to ask this question correctly. I think in the end the code will make more sence of what I am trying to accomplish. I am just not sure of what to search for on the net. I...
1
3301
by: chromis | last post by:
Hi, I'm having trouble fully implementing the edit section of a contact admin system, so far I have written the following: - Bean (Contact.cfc) - Data Access object (ContactDAO.cfc) - Gateway...
0
7205
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,...
0
7093
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...
0
7349
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...
1
7008
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...
0
7467
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...
0
5594
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,...
0
3177
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...
0
1521
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 ...
0
399
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...

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.