-
June 13th, 2013, 08:50 PM
#1
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?
-
June 14th, 2013, 12:40 AM
#2
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..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
June 14th, 2013, 11:29 AM
#3
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
-
June 16th, 2013, 03:49 PM
#4
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?
-
June 22nd, 2013, 09:06 PM
#5
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|