|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Calling PaintBox Paint eventHai,
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 Sam wrote:
> Hai, Why do you need to draw on a box when it is minimized? When the picture > 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 > 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 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/microsoft.public.dotnet.framework.drawing/browse_frm/thread/b68ed77933e59bb0/08572291311d2ab4?lnk=st&q=ByVal+e+As+System.Windows.Forms.PaintEventArgs&rnum=1&hl=en Sam wrote:
> Thanks for your reply. Can you show some code. Separating out the drawing and the storing into > 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/microsoft.public.dotnet.framework.drawing/browse_frm/thread/b68ed77933e59bb0/08572291311d2ab4?lnk=st&q=ByVal+e+As+System.Windows.Forms.PaintEventArgs&rnum=1&hl=en > two different areas should not effect the speed of the system. Drawing only when needed should actually speed up the system. Chris 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.
At a loss figuring out if an IP is on LAN or INET
update form background color DWORDS ? LONG? - I need to create constants for the following Function call problem How to Obsolete two related classes? Invalid Cast Errors Datagrid, binded columns and unbinded columns Can't open a project by iteself? Solution opens every time! Stepping between .Net IDE into a VB6 dll call Invoking apps within VB |
|||||||||||||||||||||||