473,434 Members | 1,541 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,434 software developers and data experts.

Refreshing a form whose graphics is corrupted

How do you force a form to refresh itself if the contents of the form become
corrupted? For example, while moving a second form over the first, I want to
force a refresh of the first.
--
Steve
Nov 17 '05 #1
1 1415
Steve,

The form should refresh itself automatically. If it is not, then it
indicates that you are probably performing painting operations on the form
outside of the OnPaint method or the Paint event handler.

If you are going to perform painting operations on a form (and force
your own refreshes), then what you need to do is set the state in your
object to give you the information you need while you paint (so that in your
paint algorithm you have everything you need), and then call the Invalidate
method. This will cause your paint routine to be called, from which you can
gather the information you need to render your form correctly.

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

"Steve Teeples" <St**********@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
How do you force a form to refresh itself if the contents of the form
become
corrupted? For example, while moving a second form over the first, I want
to
force a refresh of the first.
--
Steve

Nov 17 '05 #2

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

Similar topics

1
by: edward hage | last post by:
The following program is an applet that reads a number from a file 10 times per second. It needs to be shown graphically. The file monitors a procesvariable and changes continuously. It is read...
3
by: Paul Eghbal | last post by:
Hi all, I'm trying to use the following script: <script language="javaScript"> function setrepto(){ document.aForm.repno.value = document.aForm.rep.options.value; } </script>
3
by: Colleyville Alan | last post by:
I posted the other day that the Incremental Search box that I had been using was no longer working properly. When I checked the code against an older version that was working properly, the changes...
5
by: VMI | last post by:
I have a BMP image (the form is also in PDF) that contains a scanned copy of a paper form that we need to fill out. Is it possible to use this image in my application so that the application can...
2
by: Jeff | last post by:
raggle fraggle and so on Why does this happen? I had just entered some code and when I saved the form, through the menu option, Access nicely shutdown and lost the changes. I know, I should save...
4
by: tommaso.gastaldi | last post by:
I found useful to use transparent controls like: '---------------------------------------------------------------------------------- Public Class UserControlTransp Inherits...
2
by: Kevin | last post by:
I've created a custom class that inherits from the DataGridViewTextBoxColumn and DataGridViewTextBoxCell. The cell is databound to a text field that contains the path to a JPG image. The JPG image...
0
by: =?Utf-8?B?Um9iT2ZUYWdl?= | last post by:
I am new to vb.net and have been used to using the Autoredraw property in VB6 to refresh the graphics. I've made various attempts to save and restore graphics but so far have had no success. I'm...
6
by: shankari07 | last post by:
hi guys, I have a form in html which has the city drop down. when clicking the drop down a javascript is called and a file(test.txt) is created and the city is written into the file. Through php...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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
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...
1
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
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
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...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.