Visual basic 6 program: Buttons appear blacked out on Windows Vista.
Visual basic 6 was long replaced by visual basic.net and most of vb6 programmers have quietly moved on to vb.net, c# or java. There are lots of vb legacy applications that continue to be used. Windows vista supports vb 6 applications, and microsoft claims the vb 6 applications that run on windows xp should run on windows vista.s Unfortunately this is not always true.
In this post I talk about a problem which haunted one of my legacy vb program and a surprisingly simple solution to the problem. 8085 simulator is one program which I wrote around 4 years back and I still continue to maintain thanks to fairly large number of users who report various bugs and suggest new functionalites. As windows vista became widespread more and more people pointed out the issue, wherin the buttons on the simulator GUI appear blacked out.
Below is the screenshot of the gui before the problem was solved

The button looked perfectly allright on windows xp, 98, 2k etc except on windows vista. I looked at various places on the internet looking for similar compatibility issues on windows vista, however I found no solution to the button black out problem. I tried moving the buttons out of the frame, in a picture box etc, but they still appeared blacked out :( . Fortunately the solution to the problem was much simpler than I imagined, I just changed the "style" attributes of the buttons from "graphical" to "standard" and it worked :-). The screenshot below shows the change that I made in the property window of the button in the vb6 IDE.
I had initially chosen the "graphics" value to change the color of the buttons, however this caused the aforementioned problems on vista and had to change it back to "standard".

Repeat this for all the buttons and recompile the program. Problem solved !! The screenshot below shows the program GUI after we solved the problem.

Vikas
28 dec 2008
I have the same problem in Windows 7 and 10. Can you help me, please? slveiga@yahoo.com.br
ReplyDeletehi
ReplyDeletei am facing same button blackout problem
but not ab;e to resolve it
Can you help