VB6 performance with Win7 and SQL Server
I researched repeatedly and I keep finding the suggestion to disable desktop composition in the compatibility tab for properties. That has done nothing for the performance issue. Yesterday I accidentally stumbled on a dramatic change that has nothing to do with VB6 so my conclusion is...there was never a problem with VB6 in the first place and we've been looking in the wrong place. I have my own development environment and a server named (eg) SERVER1
As I can't dictate what my clients should name their servers, I pass the SQL Server name as a parameter in the properties box for the desktop shortcut. I was using the mnemonic name SERVER1 and yesterday found one of the desktops configured with the IP address instead of the mnemonic name. In one of my programs more burdensome functions, it took 22 seconds to paint the screen for a query I fully admit is a heavy query assembling a lot of records. With no code changes, I changed the desktop shortcut to pass the IP address instead of the mnemonic name and the screen painted in under 2 seconds! It's a windows bug and the hundreds of posts I've read on this problem amounts to us all looking in the wrong place. Give this simple change a try.