473,513 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Paint event problem

Currently, the paint even will only acknowledge painting going on inside of
the ClipRectangle, any of the drawing that is outside of the ClipRectangle
is ignored.

How can I get the paint event to redraw Everything?

I know that I could use the Refresh method or call the Invalidate method
with a parameter that will force a total redraw, but my problem happens when
the paint event is triggered automatically due to things such as the user
moving the form outside the desktop area or moving another form on top of
mine. This will trigger the Paint event and I have no control over the
ClipRectangle!! Please help me!!

Thank you.
Nov 16 '05 #1
2 5969
Rene <no****@nospam.nospam> wrote:
Currently, the paint even will only acknowledge painting going on inside of
the ClipRectangle, any of the drawing that is outside of the ClipRectangle
is ignored.
That's the whole point of the ClipRectangle.
How can I get the paint event to redraw Everything?
Provoke something which calls Paint with a full clip rectangle.
I know that I could use the Refresh method or call the Invalidate method
with a parameter that will force a total redraw
And you could do that from the Paint method, if you're careful to make
sure you don't end up in an infinite painting loop.
but my problem happens when
the paint event is triggered automatically due to things such as the user
moving the form outside the desktop area or moving another form on top of
mine. This will trigger the Paint event and I have no control over the
ClipRectangle!! Please help me!!


The idea is that only the portion of the screen which needs redrawing
gets redrawn. Why do you need to redraw other parts of the screen?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
> The idea is that only the portion of the screen which needs redrawing
gets redrawn. Why do you need to redraw other parts of the screen?


Its amazing how one can come up with a solution to a problem 1 microsecond
after posting the question. The reason why I wanted to have this behavior
was just a hack because of some things that I was doing with the
Control.ReversibleLine function but don't needed anymore.
Boy, I hope the next version of .Net supports XOR drawing, this reversible
line function is just a pain in the neck.

Thanks.
Nov 16 '05 #3

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

Similar topics

5
7040
by: Tamir Khason | last post by:
How I can paint something onClick event? I need PaintEventArgs event in order to paint and raise Graphics, but onClick I have only EventArgs Event... Thanx
0
1889
by: Christian Lipps | last post by:
Hello, I've the following problem: There is a form having a picture box on it. The box's paint event is implementet as follow: <within the paint event> Size drawArea = pictureBox1.Size; ...
0
1891
by: vooose | last post by:
Consider a UserControl to which you do userControl.Paint += new PaintEventHandler(paint_method) If you don't like that way, and prefer to override onPaint( ) then the problem stated below...
6
3133
by: jcrouse | last post by:
I am rotating some text is some label controls. In the one place I use it it works fine. In the other place I use it I can't figure out the syntax. I don't really understand the event. Where it...
4
11664
by: Aaron Smith | last post by:
I have a panel that I have in the paint event to draw a Raised 3d border around it.. The problem is, if a msgbox is popped up or a tooltip is displayed, it leaves lines on the panel. I've tried...
7
1817
by: hamil | last post by:
The following code will display a tif file on a form. When another form is moved over the tif image, the tif image is erased where the form was moved. A paint event occurs when this happens. My...
4
2523
by: Sam | last post by:
Hai, I use a paintbox paint event to draw some images in a paintbox. I call the paint event by refreshing the paintbox using paintboxname.refresh() or paintboxname.update(). Problem with this...
7
2338
by: Rotsey | last post by:
Hi, I have a interface that I use for a form so I can pass the form to another object. How do I add the Paint event to the interface and subsequently handle the paint event in my other...
5
2074
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
Hi, On a usercontrol I've put a set of radiobuttons within a groupbox. These radiobuttons have visual style enables, i.e. they turn orange when hovering over them and green when pushed. ...
0
7260
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
7537
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
7099
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
5685
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,...
1
5086
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...
0
4746
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
3233
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
1594
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 ...
1
799
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.