I apologize in advance for the long question...
I have a really large project written in VB6 that I need to use on some Windows 7 PCs. There are many forms with datagrids on them. Three of these datagrids are buggy in the sense that they (a) have remnants of what was on the screen before the datagrids are shown (portions of the desktop, or other parts of the application underneath the datagrid) and (b) clicking, highlighting, and scrolling doesn't work properly (selection of one row doesn't de-select another row, scrolling one way doesn't let you scroll back, among other bugginess).
Additional Info:
- on WindowsXP and Win7 32-bit, the problem does not appear; it only appears on Win7 64-bit
- If vb6 is installed (yes, with the numerous errors along the way) on the Win7 64-bit machine, the problem disappears
- There are some issues with one other grid's rows being blacked out and many of the textboxes in the app being very dark and hard to read (on both Win7 32 and 64-bit), but this is corrected in both cases by switching to the Windows 7 classic theme (aero off)
What I have tried:
- Manipulated the
MsDatGrd.ocx
many times. I copied it from the working WinXP, from the Win7 32-bit, and even from the original vb6 SP6 installation disk. I tried each replacement of the ocx file in thesyswow64
andsystem32
folders, unregistering and re-registering in each place. I should note that when I unregistered the file (regsvr32.exe
from both thesystem32
andsyswow64
folders) and received the success notice, I still found it in the registry (regedit). - I tried creating a new form and copied the controls and code over to the new form.
- I tried removing the reference to the ocx at the top of the form in Notepad (where it says
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDatGrd.ocx"
). I didn't even get an error in this case, but the grid still worked as expected. The only time I was able to get any response from manipulating the ocx file was when I deleted it from syswow64; at that point, the app just wouldn't open.
The reason I thought the form itself might be an issue was because I came across log files from the two forms with the broken datagrids (note: 1 datagrid on each form). I guess the log files were generated a while back during one compilation. They both say the following:
Could not create reference: '{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0'.
Could not create reference: '{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0'.
Note: the first reference in each file is the msdatgrd.ocx
, the 2nd is the mscomctl.ocx
(which doesn't seem to have any problem).
So...is there anything else anyone can think of to help me solve this issue? I would prefer to fix the problem instead of using another method like using the mshflexgrid or a 3rd party grid, etc.