Sunday, December 28, 2008

Vb 6 program: buttons appear blacked out on vista

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

Photobucket

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".

Photobucket

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

Photobucket


Vikas
28 dec 2008



On the 9044th day of my life :)

     On the 9044th day of my life at this particular second, I'm sitting awkwardly on my sofa punching keys on my HP Pavillion dv5 trying to capture this moment in a small town of a big nation which I didn't even know if it existed just few months back. It just struck my mind, the people with whom I'm sitting right now: one of whom is  on the adjacent couch busy simulating a "tweel" with a "HONEY COMB" structure listening to a old soulful bollywood song , as the other person continues to rip of his hair trying to fix his laptop. I f*****g didn't know them either!!! , and now I happen to spend most of my time with them.    

As I write this, I'm cursing myself for not writing this post 44 days back. Wouldn't the title "On the 9000th day of my life" sound much better? Damn it!! I missed the opportunity :( and now I have to wait for alomost 3 years to come up with an equally effective title on the same lines.  So what did I achieve in these 9000 and odd days I spent on this planet? Well I don't remember anything so great worth mentioning :(. By the way, who the hell cares?? or on second thought lets save it for a future post.    

Well as I start to write this paragraph its already 8:30 pm, and the magical 9044th day is almost coming to an end. So how was the 9044th day of my life ? In one simple sentence, this day was the perfect example of a lazy holiday. I spent the whole day literally doing nothing, woke up at 11:30 am and since then glaring at my laptop screen. The day was mostly dedicated to Orkut, gmail, youtube, imeem and lazywarriors.com.  Perhaps I'll spend the next hour in the kitchen and then I'll be back on my sofa, savouring the 9044th day of my life :).    

Vikas  
28th December 2008

Jig Bhai at his best

This post is dedicated to my friend Jig bhai....

Jig bhai at his best, singing his all time favorite song "ba illi ba illi dilruba ba illi"..
Some history behind the clip:-

Source: My pre-historic Logitech webcam
Location: My Bedroom (bangalore), I miss my room :-(
Singer & Actor: Jig bhai
Host : Me
year: 2002-2003
Song: A bhi ja dilruba aa bhi ja (kannada version)



Hope u guys enjoyed this post ;)