Converting VB6 to VB2010 using picturebox that is not redrawing
I have a vb6 project that uses a third party DLL that draws to a picturebox. I provide the handle of the Picturebox and it does the drawing, In VB6 I set AutoRedraw to True and the in the paint event I call the DLL's Refresh routine. Using the same code in VB2010 the graphics flicker for just a second and then disappear when I resize the picturebox. Is there a way around this in VB2010?
Re: Converting VB6 to VB2010 using picturebox that is not redrawing
The third party DLL was designed to work with VB6 methods..
Unfortunately in VS 2010, the Picturebox Drawing methods have changed completely, even down to the behind the scenes stuff us VB programmers don't see..
Two Options...
#1) .. Tank the DLL and draw the stuff yourself...
#2) .. Get hold of the Third party and ask for a .NET version (Might even get a discounted price for upgrading)..
For some interesting reading on why it does not work, check this article out..
Re: Converting VB6 to VB2010 using picturebox that is not redrawing
Well I can not tank the DLLso that is not an optinand converting it to .NET may be an option. WHat I do not understand is the fact that I see the geometry and everything works fine. It just seems to me that resizing the form I should be able to refresh the geometry that was already displayed. If it can display it, you would think you would be able to refresh it as well.
I will keep messing with it. There has to be a solution. Thanks for your help
Re: Converting VB6 to VB2010 using picturebox that is not redrawing
Here is some more information that may help someone to help me.
If you resize the form manually the graphics and repaint correctly.
So why would they not repaint on a maximized?
Re: Converting VB6 to VB2010 using picturebox that is not redrawing
Hmmm no more responses. Thanks for the advice Gremlin I will post back if I ever find a solution