[Closed] What is a "system.delegate" ?
Hi, I’m trying to manually fire the PaintEventsHandler or any other handler with the controls.invoke methods but I don’t get it … what is a “system.delegate” ? can somebody explain this to me ?
Thank for your help!
Martin Dufour
Hi Martin, could you provide a bit more information on what you are trying to do? usually calling invalidate() or refresh() will trigger the paint handler, forcing a control to redraw it’s surface.
Hi Swami, I doing some node connection editor but I’m geting some flikering when redrawing the connection. I think that if I could manualy call the paint handler I could get rid of it (this work for the currently drawing connection but not the allready connected one since it rely on controls.Invalidate() ; controls.update()). any idea ?
thank !
hey martin,
nice looking interface and an interesting looking project. Control flicker can be caused by a few things. Sometimes overiding the onbackgroundpaint event (essentially to do nothing) can sort flickering issues, as the flicker is the control redrawing the background color before the paint event fires.
Other options are enabling doublebuffering if it is an inherited control, as this draws on a memory graphics object before drawing it. You can in theory perform your own doublebuffering but i haven’t tried it.
Thank, I’m currently looking at the manual doublebuffering but this don’t seam easy to setup.
XGraph = PboxMap.CreateGraphics()
XGraph.CompositingQuality = XGraph.CompositingQuality.HighSpeed
XGraph.InterpolationMode = XGraph.InterpolationMode.Low
XGraph.SmoothingMode = XGraph.SmoothingMode.HighSpeed
--//--
XGraphManager = (dotnetclass "System.Drawing.BufferedGraphicsManager").Current
XGraphManager.MaximumBuffer = (dotnetobject "System.Drawing.Size" (PboxMap.Width+1) (PboxMap.Height+1))
XBuffer = (XGraphManager.Allocate XGraph )--??
--//--
also , how to “overiding the onbackgroundpaint” from inside 3dsmax ?
Thank a lot !
Martin Dufour
well, yes but I wanted to do my own so that I can learn at the same time
my main question remain … what’s a “system.delegate” ?
Take for your time !
Martin Dufour
Everything working fine now, this has been fixed by doing all the drawing from inside the painthandler,
Finally I can sleep a bit
Thank you very mush for your help!
Martin Dufour
hi martin, i thought you were doing this to get your custom controls, but i’m glad you resolved it. Keep us updated with your project!