Sign in to follow this  
Marz

VB6 update delay BUG

Recommended Posts

I have created a game using Visual basic 6. The game has a Stock Market. If you have landed on the stock market game space a Boolean called MarketAccess becomes false. If you are not on the stock market it is false. When MarketAccess = true it enables a command button (View Market) on the players Portfolio form that gives access to the stock market. So if MarketAccess = false the command button will be disabled. The problem is this. When a player lands on the market and he checks his portfolio, the command button is enabled as it should be. However when you move off of the stock Market and then check your Portfolio the view the button is still enabled (even though the Boolean = false) but If you close it and open it up again it is disabled as it should be. I have tried everything I can think of but no go. Any input would be greatly appreciated. Please use laymean's terms Thanks

Share this post


Link to post
Share on other sites
After you move off the of the stock market, are you updating the View Market button to be the same as MarketAccess? It just seems like you forget to update a value in one place.

It is hard to give more advise without seeing code though.

Share this post


Link to post
Share on other sites
Yes I have the same code line in both places. I also understand that without seeing the entire code it would be hard to find the bug. I apprecaite your reply. I was hoping someone had a similiar problem and could say " Click this on or type this here" but oh well I'll just keep going over it and I'm sure I'll eventually find it.

Thanks

Share this post


Link to post
Share on other sites
Well, you can always run it through the interpretter and set a breakpoint, so you can make sure the value is false, and make sure the .Enabled of the button is also false.
VB6 doesn't have any problems updating the state after you tell it to (unlike MFC where you have to tell it to update).

Share this post


Link to post
Share on other sites
I know the values are all correct using the immdiate. I don't know what the interpretter is or what it does but it sounds plenty usful.

It must be a code bug somewhere. I'll keep combing through. thanks once again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this