473,399 Members | 4,254 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,399 software developers and data experts.

Calling PaintBox Paint event

Sam
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 kind of paint event is that the event is not raised
when the application is run in a minimized state. So, my question is:
How can you make sure that the paint event is called even when the
application is running in the minimized state.

Thanks
Sam

Apr 28 '06 #1
4 2516
Sam wrote:
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 kind of paint event is that the event is not raised
when the application is run in a minimized state. So, my question is:
How can you make sure that the paint event is called even when the
application is running in the minimized state.

Thanks
Sam


Why do you need to draw on a box when it is minimized? When the picture
box comes into view it is going to have to repaint. Doing it early is
useless unless you are saving it as a bitmap or something and if that is
the case you are going to have to draw to a different object.

Chris
Apr 28 '06 #2
Sam
Thanks for your reply.
I handle some other things within the same event - like storing 10,000
points of a waveform and comparing them for the required result. If I
seperate drawing the image and storing the points into two different
methods, the application gets quite slower which is what is needed.
So, I am still looking on how we can fire the Paint event of the
Picturebox.
Simillar thread:
http://groups.google.com/group/micro...s&rnum=1&hl=en

Apr 28 '06 #3
Sam wrote:
Thanks for your reply.
I handle some other things within the same event - like storing 10,000
points of a waveform and comparing them for the required result. If I
seperate drawing the image and storing the points into two different
methods, the application gets quite slower which is what is needed.
So, I am still looking on how we can fire the Paint event of the
Picturebox.
Simillar thread:
http://groups.google.com/group/micro...s&rnum=1&hl=en


Can you show some code. Separating out the drawing and the storing into
two different areas should not effect the speed of the system. Drawing
only when needed should actually speed up the system.

Chris
Apr 28 '06 #4
Sam
Hello Chris,

I have seperated the drawing routines from storing routines.
Surprisingly there was no penalty in time for doing that.
That could be because the paint event runs as a seperate thread.

Thanks for your suggestions. I appreciate your help.

Apr 30 '06 #5

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

Similar topics

5
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
4
by: Tamir Khason | last post by:
Why when I lost focus (go to back) on form all GDI+ paints disappears..... BUG or I do something wrong???? TNX
1
by: user | last post by:
hello I have: public void MyFunction(PictureBox b, PaintEventArgs e) how can i set from code this function as PaintBox Paint Event handler ? I tried: box.Paint=MyFunction() and similar but...
2
by: Rene | last post by:
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...
7
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
by: Kürşat | last post by:
Hi all, I do some drawing in a form's paint event handler and I have a button on that form. Whenever the mouse enters or leaves the button Form's paint event occurs. Isn't that a strange...
7
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
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. ...
2
by: =?Utf-8?B?UlJK?= | last post by:
Hello, I would like to add the Paint handler to the form. How to do it? Thanks in advance.
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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,...
0
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...
0
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
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...

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.