Page 5 of 10 FirstFirst ... 2345678 ... LastLast
Results 161 to 200 of 366

Thread: Flickering Buttons: How Do I Get Rid Of Them?

  1. #161
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by JonSea31 View Post
    Sorry. I just couldn't think of another word to use instead of "retrieved."
    No other word is required. Code that is not executed is ignored. It's a simple as that.

    BTW I carefully checked the Debug.Print list of cards in the deck and there are no duplicates, so if you still think you have a problem please let me know.

  2. #162

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Bad news...

    I went through my email archives just now, and downloaded just now what technorobbo created last spring, and it turns out he did the same error with regards to having an Ace as a base card, and on the second turn, I called it lower than the Ace, and although the result was a 6, it set off the LowerWrongCards token instead of the LowerRightCards token.

    I think this may be where resetting the base card to where the first card was revealed or where the player froze on, and skipping in the sequence 5 cards ahead for the second play, 10 cards ahead for the third play, and 15 cards ahead for the fourth play of the round is probably a good idea.

    It turns out that the Shuffle sub, although technorobbo's version only has the Shuffle sub in the GameEssentials module and not the form, is not the problem. It may have to do with the sequence of the cards in the display window on the bottom of the screen.

    I'll send you what technorobbo did last spring by PM tomorrow and see what can be done with regards to resetting the CurrentCard to the first slot of the freeze card slot, and skipping ahead 5, 10, and 15 cards in the sequence.
    Last edited by JonSea31; Jan 15th, 2010 at 09:40 PM.

  3. #163

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Duplicate post due to delay in posting. Removed by JonSea31.

  4. #164
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Okay I need some help from you. To debug the "Ace first" error you decribed I did this in shuffle.
    Code:
    Private Sub Shuffle()
    Dim X As Integer, i As Integer, j As Integer
    'load the deck
    For i = 0 To 51
    rand(i) = i
    Next
    Randomize
    'shuffle
    For i = 0 To 51
        X = Int(Rnd() * 51) + 1
        j = rand(i)
        rand(i) = rand(X)
        rand(X) = j
    '    Debug.Print rand(i) & " ";
    Next
    'test
    rand(0) = 12
    
    For i = 0 To 51
        Debug.Print NameCard(rand(i))
    Next
    
    End Sub
    Since card 12 is the Ace of Spades, that line should result in the Ace of Spades being the first card in the deck and it does. Proof of that is if I do MsgBox NameCard(rand(0)) I get "Ace of Spades). However the first card that shows up is the Ace of Clubs and I can't figure out why that is.

    BTW even if the wrong ace shows up, if I choose "Lower" the sub that gets executed is, correctly, LowerRightCards.

  5. #165
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    I see what is wrong with the Ace of Spades. Your sa.bmp which should be a picture of the ace of spades is actually a picture of the ace of clubs. You should check the rest of the pictures to make sure they are right.

    So I say again, I don't see any problem with the dealing of the cards.

  6. #166

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by MartinLiss View Post
    I see what is wrong with the Ace of Spades. Your sa.bmp which should be a picture of the ace of spades is actually a picture of the ace of clubs. You should check the rest of the pictures to make sure they are right.
    Innocent mistake on my part. The spade symbol in the center of the Ace of Spades is traditionally larger in size than in other spade cards. That's probably why I forgot about it. I will fix that tomorrow.

    And btw, when you got the card (the 6) successfully lower than the Ace, was that on your second play of the red or blue turn?

    Maybe you should record the cards revealed on the red or blue row during the first turn on a document and then record the results of the second turn. Try that several times and you may see results.

  7. #167

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    I just did a test run on technorobbo's version - this time with the debug to show the names of the cards in the display window.

    They only reveal the cards in order as they appear in the display window. When a player regains control of the cards, it continues from the last card revealed on the red or blue row and not from the base card.

    I wonder if there is a way to manipulate the card sequence so that there can be a resetting of the base card value (or freeze card value) in the sequence, and skipping of the cards that were already revealed when that player already had a turn at the cards? Like the Private Function SeqControl area can be changed to accommodate such resetting and skipping?

    Here is some of the code I have that may be manipulated to accommodate such resetting and skipping:

    Code:
    Private Function SeqControl(i As Integer) As Control
    If i < 5 Then
    
        Set SeqControl = Image1(i)
    Else
        Set SeqControl = Image2(i - 5)
    End If
        
    End Function
    Image1 in this case would be the RCard, and Image2 would be BCard.

    To allow for resetting to the base card/freeze card value, this is where the "minus" would come into play. And to allow for skipping of cards already used in the deck, this is where an equation with the "+" may come in handy.

    I also noticed in technorobbo's form that there is only one deck of cards being shared between the red and blue players. There should be two separate decks - one for the red player, and one for the blue player. What should I do to allow for two decks - one for each player?

  8. #168
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    You now have a "deck" of cards called rand(). Two have two decks I would
    1. globally change rand (using the Find Whole Word Only option) to something like BlueCards
    2. create a second array called RedCards()
    3. rename Shuffle to ShuffleBlueCards
    4. create a ShuffleRedCards sub
    5. you would also need to duplicate and use whatever pointer(s) you have that tell you where you are in the decks, etc.


    After that if you still have a "base card" problem, could you please send me new files and a link to a video showing what you mean because I don't understand the problem.

  9. #169

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    I wonder if there's a way to zoom the video recording to show a close-up of the display window when needed. I have CamStudio that I use to record such videos.

    I will send you a fresh updated set of files along with a video upload in the coming days.
    Last edited by JonSea31; Jan 16th, 2010 at 01:15 PM.

  10. #170
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by JonSea31 View Post
    I wonder if there's a way to zoom the video recording to show a close-up of the display window when needed. I have CamStudio that I use to record such videos.

    I will send you a fresh updated set of files along with a video upload in the coming days.
    I have no idea but you might try posting a question about zooming the video in the General PC forum.

  11. #171
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    It does sound possible that you could make the Video Control to be zoomable???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  12. #172

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Maybe if I show where the problem exists in a video demonstration, you folks may be able to see what is wrong with the coding.

    And like I said, it is possible it may have to do with the sequence of cards and how there may have to be resetting of the base card or freeze card value, and for second, third, or fourth playings of the cards there may have to be skippings of 5, 10, and 15 cards respectively. It doesn't have to reveal the cards in that exact same order in the sequence as displayed in the display window.

    So, ThEiMp, if you can see the problem in the video, are you willing to return to the project and give this a try again?

  13. #173

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by MartinLiss View Post
    5. you would also need to duplicate and use whatever pointer(s) you have that tell you where you are in the decks, etc.
    So when you say "use whatever pointers I have that tell me where I am in the decks", does that mean use something like CurrentSlot? Or would it be a good idea to change CurrentSlot to CurrentRedSlot and create a new CurrentBlueSlot array?

  14. #174

  15. #175

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    During the past few days, I've been doing a major revamp of the code, and I did add the two decks of cards - one for each coloured player.

    I even added the CurrentBlueSlot and the CurrentRedSlot areas as well.

    I'm also experimenting with developing the Educated Guess questions (they are general knowledge questions that can allow for answers larger than 99). I am hoping to allow for the following to occur during these questions:

    1. To have the digits appear to be typed on the podium (just like on the television screen) digit for digit, from left to right.

    2. Also, I will be developing a green banner that will animate and drop towards the contestant podium (not exactly as it would appear on the show, but close enough as it gets).

    I also discovered that, when decks of cards are being used for a test run, the first test run is okay - it displays two decks of cards in the display window (the first 52 cards are the red player, the latter 52 cards are the blue player). But when I do a second test run, an additional deck is added to the 2 decks, hence displaying 3 decks of cards instead of 2. This should not be.

    Once the revamp is done, I will create a video and upload it to YouTube, and I will provide captions to show what the problem is, and maybe you can determine if it's a sequence issue or not.

  16. #176

  17. #177

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Okay, I did a test run just after opening the project file, and I can see what is going on.

    Doing the first test run after immediately opening the project file means that the cards run more smoothly and the right sub is set off.

    Before I played the cards, I copied/pasted the entire card sequence from the display window. The first 52 card values are for the blue deck, and the second set of 52 are for the red deck. Here is the result from the blue player's first play at the cards.

    BLUE FIRST PLAY:
    Code:
    8 of Hearts = CHANGE TO NEXT CARD
    4 of Hearts = CALL LOWER
    Queen of Diamonds = LAST CARD RECORDED = SHOULD RESET BACK ONE CARD
    8 of Clubs
    Jack of Diamonds
    4 of Clubs
    5 of Spades
    7 of Spades
    9 of Diamonds
    King of Clubs
    Ace of Diamonds
    2 of Clubs
    10 of Clubs
    Ace of Spades
    2 of Spades
    4 of Diamonds
    7 of Clubs
    6 of Clubs
    3 of Diamonds
    9 of Spades
    6 of Spades
    10 of Hearts
    3 of Hearts
    Jack of Clubs
    2 of Diamonds
    5 of Hearts
    10 of Spades
    3 of Spades
    King of Hearts
    9 of Clubs
    Jack of Hearts
    7 of Hearts
    Jack of Spades
    8 of Spades
    4 of Spades
    6 of Diamonds
    8 of Diamonds
    3 of Clubs
    5 of Diamonds
    Ace of Hearts
    Queen of Clubs
    Ace of Clubs
    10 of Diamonds
    6 of Hearts
    5 of Clubs
    King of Diamonds
    9 of Hearts
    7 of Diamonds
    King of Spades
    2 of Hearts
    Queen of Hearts
    Queen of Spades
    Then the result for the red player's free shot at the cards:

    RED FIRST PLAY:
    Code:
    9 of Clubs = CALL HIGHER
    5 of Clubs = HIGHERWRONGCARDS SUB SET OFF, BASE CARD SHOULD RESET BY STEPPING BACK ONE CARD
    2 of Clubs
    10 of Hearts
    6 of Clubs
    3 of Hearts
    10 of Clubs
    King of Diamonds
    4 of Spades
    King of Clubs
    5 of Diamonds
    7 of Clubs
    2 of Diamonds
    King of Hearts
    3 of Spades
    2 of Hearts
    8 of Spades
    2 of Spades
    Queen of Diamonds
    Queen of Spades
    Ace of Diamonds
    Ace of Hearts
    6 of Diamonds
    4 of Hearts
    Jack of Spades
    8 of Clubs
    Jack of Hearts
    4 of Clubs
    Jack of Clubs
    8 of Hearts
    Ace of Clubs
    3 of Clubs
    7 of Spades
    6 of Spades
    10 of Diamonds
    5 of Hearts
    7 of Hearts
    Jack of Diamonds
    9 of Diamonds
    10 of Spades
    7 of Diamonds
    6 of Hearts
    9 of Hearts
    3 of Diamonds
    5 of Spades
    Queen of Clubs
    9 of Spades
    4 of Diamonds
    Ace of Spades
    8 of Diamonds
    Queen of Hearts
    King of Spades
    Continued in next post...
    Last edited by JonSea31; Jan 20th, 2010 at 07:55 PM.

  18. #178

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Now, the red player wins the second question, and the red player has a shot at the cards. Here is the result from the red player's second play of the cards:

    RED SECOND PLAY:
    Code:
    9 of Clubs = CHANGE TO 2 OF CLUBS
    5 of Clubs = LAST CARD RECORDED, SHOULD BE IGNORED
    2 of Clubs = CHANGED FROM THE 9 of CLUBS, CALL LOWER
    10 of Hearts = LOWERWRONGCARDS SUB SET OFF = SHOULD BE RESET BACK TO THE 2 OF CLUBS (Line #1 Card Value)
    6 of Clubs
    3 of Hearts
    10 of Clubs
    King of Diamonds
    4 of Spades
    King of Clubs
    5 of Diamonds
    7 of Clubs
    2 of Diamonds
    King of Hearts
    3 of Spades
    2 of Hearts
    8 of Spades
    2 of Spades
    Queen of Diamonds
    Queen of Spades
    Ace of Diamonds
    Ace of Hearts
    6 of Diamonds
    4 of Hearts
    Jack of Spades
    8 of Clubs
    Jack of Hearts
    4 of Clubs
    Jack of Clubs
    8 of Hearts
    Ace of Clubs
    3 of Clubs
    7 of Spades
    6 of Spades
    10 of Diamonds
    5 of Hearts
    7 of Hearts
    Jack of Diamonds
    9 of Diamonds
    10 of Spades
    7 of Diamonds
    6 of Hearts
    9 of Hearts
    3 of Diamonds
    5 of Spades
    Queen of Clubs
    9 of Spades
    4 of Diamonds
    Ace of Spades
    8 of Diamonds
    Queen of Hearts
    King of Spades
    And now, the blue player has a free shot at the cards:

    BLUE SECOND PLAY:
    Code:
    8 of Hearts = CHANGE
    4 of Hearts = CURRENT CARD VALUE SHOULD BE RESET HERE = CALL HIGHER, SHOULD GO TO LINE #4 IN SEQUENCE
    Queen of Diamonds = LAST CARD RECORDED = SHOULD BE SKIPPED
    8 of Clubs = DING SOUND EFFECT PLAYS, CALL HIGHER
    Jack of Diamonds = DING SOUND EFFECT PLAYS, CALL LOWER
    4 of Clubs
    5 of Spades
    7 of Spades
    9 of Diamonds
    King of Clubs
    Ace of Diamonds
    2 of Clubs
    10 of Clubs
    Ace of Spades
    2 of Spades
    4 of Diamonds
    7 of Clubs
    6 of Clubs
    3 of Diamonds
    9 of Spades
    6 of Spades
    10 of Hearts
    3 of Hearts
    Jack of Clubs
    2 of Diamonds
    5 of Hearts
    10 of Spades
    3 of Spades
    King of Hearts
    9 of Clubs
    Jack of Hearts
    7 of Hearts
    Jack of Spades
    8 of Spades
    4 of Spades
    6 of Diamonds
    8 of Diamonds
    3 of Clubs
    5 of Diamonds
    Ace of Hearts
    Queen of Clubs
    Ace of Clubs
    10 of Diamonds
    6 of Hearts
    5 of Clubs
    King of Diamonds
    9 of Hearts
    7 of Diamonds
    King of Spades
    2 of Hearts
    Queen of Hearts
    Queen of Spades
    Maybe the problem all along is that when I keep the project file open and do more than one test run, unnecessary but additional cards or decks accumulate on top of each other and therefore cause the test runs to go haywire. I even discovered 200 card values in the display window at times, in fact!

    I can see why you haven't had any problems on your side, Marty. And now, I may be starting to see the light. Maybe the sequence should be kept at a maximum of 2 decks of cards per game (total of 104 cards in the display window) for an infinite number of test runs.

    I'll send you the updated files tomorrow, as I have another problem to discuss in the morning with regards to the red player winning the first question and revealing the red player's first card of the round, and getting an "Invalid Picture" error as the card is supposed to be revealed.

  19. #179
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    When you talk about the "display window" do you mean the Immediate Window (the window that pops up if you do ctrl-g)? If so I assume you know that that window does not clear itself and that whatever was generated there by Debug.Print statements or anything else will be appended to. (Anything over 200 lines gets pushed off off the top). You can clear the Immediate window by giving it focus, pressing Ctrl-A, and the delete.

    If you are really getting more than two decks generated then put a breakpoint at the first executable line in the sub(s) that create (not shuffle) the deck and look at the Call Stack to see why it gets there more than you want.

  20. #180

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by MartinLiss View Post
    When you talk about the "display window" do you mean the Immediate Window (the window that pops up if you do ctrl-g)?
    Yes, that would be the one.

    Quote Originally Posted by MartinLiss
    If so I assume you know that that window does not clear itself and that whatever was generated there by Debug.Print statements or anything else will be appended to. (Anything over 200 lines gets pushed off off the top). You can clear the Immediate window by giving it focus, pressing Ctrl-A, and the delete.
    I don't intend to clear the immediate window. Thanks for reminding.

    Quote Originally Posted by MartinLiss
    If you are really getting more than two decks generated then put a breakpoint at the first executable line in the sub(s) that create (not shuffle) the deck and look at the Call Stack to see why it gets there more than you want.
    What sub do I put the breakpoint in? The ShuffleRed(or Blue)Cards sub? The Form_Load sub?

    And what I was wondering, I would like for there to be a total of only 104 lines in the display window and nothing beyond during every test run. That's what I am trying to clarify.

    In the meantime, an updated folder will be delivered later today so that the "Invalid Picture" error would be resolved.

  21. #181

  22. #182

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Now that you mention it, I know they are located in the ShuffleRed(/Blue)Cards subs. After doing a find on the Debug.Print, there are only two such lines and they appear in both ShuffleRedCards and ShuffleBlueCards subs.

    I just put a breakpoint on the line just below the "Dim ___ As Integer, etc." line, and the call stack showed this:

    CSEE.CS1.ShuffleBlueCards
    CSEE.CS1.Form_Load

    I did do a test run last weekend with technorobbo's copy, and there were still 2 decks of cards involved but in one Shuffle sub. So odds are, maybe it's possible that only one Shuffle sub may be needed, but has to be in the same form.

    Although I did try that in the form or the GameEssentials6 module, and all I ended up with in the display window was all the cards being 2 of Spades.

    I can send you both technorobbo's version along with mine later on if you wish, and you can compare both versions to notice the difference.
    Last edited by JonSea31; Jan 21st, 2010 at 09:17 AM.

  23. #183
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Without seeing your current code I'm guessing, but I'm pretty sure that you don't have more than two decks. You may be shuffling more than you think you are and if that's the case then that's why it looks like you have >2 decks.

    And as to one or two shuffle subs, you need two shuffle subs if the red and blue decks can run out of cards at different times and I assume that that is what can happen.

  24. #184

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    I'm only shuffling more than I think because I am using a total of 104 cards (in 2 decks) during the first test run. But all subsequent test runs after that go beyond 104 cards.

    I copied and pasted the sequence from both the first test run and the second test run onto a Microsoft Word document, and numerated them.

    Here is the sequence from the first test run:
    1. 2 of Diamonds
    2. 9 of Hearts
    3. 8 of Spades
    4. 7 of Clubs
    5. 4 of Spades
    6. Ace of Hearts
    7. 5 of Diamonds
    8. 2 of Clubs
    9. Queen of Hearts
    10. 6 of Clubs
    11. Ace of Spades
    12. 10 of Hearts
    13. 5 of Spades
    14. Queen of Clubs
    15. 10 of Clubs
    16. 6 of Diamonds
    17. 7 of Hearts
    18. 8 of Clubs
    19. 3 of Diamonds
    20. 3 of Spades
    21. 2 of Spades
    22. 9 of Diamonds
    23. Jack of Clubs
    24. 10 of Spades
    25. 6 of Hearts
    26. King of Diamonds
    27. Jack of Spades
    28. Queen of Diamonds
    29. King of Spades
    30. Ace of Clubs
    31. 5 of Hearts
    32. 8 of Hearts
    33. 4 of Diamonds
    34. King of Hearts
    35. 7 of Diamonds
    36. 4 of Hearts
    37. Ace of Diamonds
    38. Jack of Hearts
    39. 9 of Clubs
    40. Jack of Diamonds
    41. 6 of Spades
    42. 10 of Diamonds
    43. 5 of Clubs
    44. 3 of Clubs
    45. 7 of Spades
    46. 9 of Spades
    47. King of Clubs
    48. 3 of Hearts
    49. 8 of Diamonds
    50. 4 of Clubs
    51. Queen of Spades
    52. 2 of Hearts
    53. King of Clubs
    54. 6 of Clubs
    55. Jack of Diamonds
    56. 7 of Spades
    57. 3 of Clubs
    58. 10 of Clubs
    59. 4 of Hearts
    60. 3 of Hearts
    61. Jack of Hearts
    62. 9 of Spades
    63. Queen of Clubs
    64. Queen of Hearts
    65. Ace of Hearts
    66. 5 of Hearts
    67. Ace of Spades
    68. 5 of Diamonds
    69. 5 of Clubs
    70. 4 of Diamonds
    71. 8 of Spades
    72. Jack of Clubs
    73. 3 of Diamonds
    74. 4 of Clubs
    75. 3 of Spades
    76. 7 of Clubs
    77. 10 of Spades
    78. 8 of Diamonds
    79. Queen of Diamonds
    80. 8 of Clubs
    81. 8 of Hearts
    82. 6 of Hearts
    83. Ace of Diamonds
    84. 6 of Diamonds
    85. 9 of Clubs
    86. Queen of Spades
    87. King of Diamonds
    88. 10 of Hearts
    89. 5 of Spades
    90. 2 of Hearts
    91. 2 of Clubs
    92. 7 of Diamonds
    93. 6 of Spades
    94. 4 of Spades
    95. 9 of Diamonds
    96. 9 of Hearts
    97. 2 of Spades
    98. 10 of Diamonds
    99. Jack of Spades
    100. King of Hearts
    101. King of Spades
    102. Ace of Clubs
    103. 2 of Diamonds
    104. 7 of Hearts
    And here is the sequence from the second test run:
    1. 2 of Clubs
    2. 6 of Clubs
    3. Jack of Diamonds
    4. Queen of Clubs
    5. 9 of Hearts
    6. 7 of Spades
    7. 6 of Hearts
    8. 7 of Hearts
    9. King of Clubs
    10. 2 of Spades
    11. 2 of Diamonds
    12. 4 of Hearts
    13. Queen of Diamonds
    14. 5 of Spades
    15. Ace of Hearts
    16. 6 of Spades
    17. 5 of Hearts
    18. 10 of Spades
    19. Jack of Hearts
    20. 8 of Hearts
    21. 2 of Hearts
    22. 5 of Clubs
    23. Jack of Clubs
    24. King of Hearts
    25. 7 of Clubs
    26. 6 of Diamonds
    27. 9 of Diamonds
    28. King of Diamonds
    29. 9 of Spades
    30. 3 of Clubs
    31. Ace of Spades
    32. 8 of Diamonds
    33. King of Spades
    34. 3 of Hearts
    35. Jack of Spades
    36. 7 of Diamonds
    37. 8 of Clubs
    38. 10 of Diamonds
    39. 9 of Clubs
    40. 10 of Clubs
    41. Ace of Diamonds
    42. Queen of Spades
    43. 3 of Diamonds
    44. Ace of Hearts
    45. 9 of Hearts
    46. 7 of Spades
    47. 6 of Diamonds
    48. Ace of Spades
    49. Queen of Clubs
    50. 3 of Hearts
    51. Queen of Spades
    52. 10 of Spades
    53. 7 of Diamonds
    54. 8 of Hearts
    55. 5 of Hearts
    56. 2 of Clubs
    57. 8 of Diamonds
    58. 8 of Spades
    59. King of Clubs
    60. Jack of Clubs
    61. 8 of Clubs
    62. 6 of Clubs
    63. 4 of Diamonds
    64. 6 of Hearts
    65. 10 of Clubs
    66. 4 of Clubs
    67. Ace of Clubs
    68. 9 of Clubs
    69. Ace of Diamonds
    70. 10 of Diamonds
    71. Jack of Spades
    72. King of Diamonds
    73. 6 of Spades
    74. 9 of Spades
    75. Jack of Diamonds
    76. 5 of Spades
    77. King of Hearts
    78. 2 of Diamonds
    79. Queen of Diamonds
    80. Queen of Hearts
    81. 3 of Clubs
    82. King of Spades
    83. 7 of Clubs
    84. 4 of Hearts
    85. 5 of Diamonds
    86. Jack of Hearts
    87. 3 of Spades
    88. 5 of Clubs
    89. 9 of Diamonds
    90. 7 of Hearts
    91. 2 of Hearts
    92. 4 of Spades
    93. 10 of Hearts
    94. 3 of Diamonds
    95. 2 of Spades
    96. 2 of Diamonds
    97. 9 of Hearts
    98. 8 of Spades
    99. 7 of Clubs
    100. 4 of Spades
    101. Ace of Hearts
    102. 5 of Diamonds
    103. 2 of Clubs
    104. Queen of Hearts
    105. 6 of Clubs
    106. Ace of Spades
    107. 10 of Hearts
    108. 5 of Spades
    109. Queen of Clubs
    110. 10 of Clubs
    111. 6 of Diamonds
    112. 7 of Hearts
    113. 8 of Clubs
    114. 3 of Diamonds
    115. 3 of Spades
    116. 2 of Spades
    117. 9 of Diamonds
    118. Jack of Clubs
    119. 10 of Spades
    120. 6 of Hearts
    121. King of Diamonds
    122. Jack of Spades
    123. Queen of Diamonds
    124. King of Spades
    125. Ace of Clubs
    126. 5 of Hearts
    127. 8 of Hearts
    128. 4 of Diamonds
    129. King of Hearts
    130. 7 of Diamonds
    131. 4 of Hearts
    132. Ace of Diamonds
    133. Jack of Hearts
    134. 9 of Clubs
    135. Jack of Diamonds
    136. 6 of Spades
    137. 10 of Diamonds
    138. 5 of Clubs
    139. 3 of Clubs
    140. 7 of Spades
    141. 9 of Spades
    142. King of Clubs
    143. 3 of Hearts
    144. 8 of Diamonds
    145. 4 of Clubs
    146. Queen of Spades
    147. 2 of Hearts
    148. King of Clubs
    149. 6 of Clubs
    150. Jack of Diamonds
    151. 7 of Spades
    152. 3 of Clubs
    153. 10 of Clubs
    154. 4 of Hearts
    155. 3 of Hearts
    156. Jack of Hearts
    157. 9 of Spades
    158. Queen of Clubs
    159. Queen of Hearts
    160. Ace of Hearts
    161. 5 of Hearts
    162. Ace of Spades
    163. 5 of Diamonds
    164. 5 of Clubs
    165. 4 of Diamonds
    166. 8 of Spades
    167. Jack of Clubs
    168. 3 of Diamonds
    169. 4 of Clubs
    170. 3 of Spades
    171. 7 of Clubs
    172. 10 of Spades
    173. 8 of Diamonds
    174. Queen of Diamonds
    175. 8 of Clubs
    176. 8 of Hearts
    177. 6 of Hearts
    178. Ace of Diamonds
    179. 6 of Diamonds
    180. 9 of Clubs
    181. Queen of Spades
    182. King of Diamonds
    183. 10 of Hearts
    184. 5 of Spades
    185. 2 of Hearts
    186. 2 of Clubs
    187. 7 of Diamonds
    188. 6 of Spades
    189. 4 of Spades
    190. 9 of Diamonds
    191. 9 of Hearts
    192. 2 of Spades
    193. 10 of Diamonds
    194. Jack of Spades
    195. King of Hearts
    196. King of Spades
    197. Ace of Clubs
    198. 2 of Diamonds
    199. 7 of Hearts


    The first test run shows 104 cards (the equivalent of 2 decks of cards). The first 52 cards in that sequence is designated for the Blue Player and the latter 52 are for the Red Player.

    The second test run shows 199 cards (beyond the maximum that should be used), and as a result it causes the code to go haywire and I get the wrong sub set off when I call a card higher than a 3, and although it is a 9, the HigherWrongCards sub is set off when it should be the HigherRightCards sub.

    I can see why it is important for me to just do one test run, then close the project, then reopen it again, and do another test run. I will do a series of test runs over the coming days (opening the project once, test-running it, and closing the project afterwards) and see what results come out of it.

    I apologize for the really long post, but I was just providing an example.
    Last edited by JonSea31; Jan 21st, 2010 at 10:00 AM.

  25. #185

  26. #186

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Actually, I just realized there are several things that have to be added/changed.

    1. The font used in the first question will involve a different font, and will allow for larger numeric answers (in this case, up to 4 digits). I will be adding the numeric answers for this question type to appear as if it was being typed on the podium. I will need some help for this.

    2. I will also be adding a new font resource to the code so that the exact font will be shown in that particular label.

    3. I will also be adding an animated banner that will drop towards the top of the contestant podium revealing the answer during this question type. It won't be exactly like it appears on the show (where on the show, the banner zooms inward), as it would take a lot more work. I don't have to make this game all exactly like the show, but to make it close enough.

    4. Also, I haven't gotten around to creating the Ace of Spades card that was miscreated (I unintentionally used a duplicate Ace of Clubs instead). I will work on that very soon.

    5. And the problem with regards to the "Invalid Picture" error message, when receiving the new files, have the red player guess the number "1" and the blue player guess lower. The red player will win control at the cards, and just as the card is expected to be revealed, the "Invalid Picture" error message pops up. This error message doesn't prevail when the blue player wins the question and wins first control of the cards.


    The newly updated files will be sent by the weekend.

  27. #187

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Well, there are a couple of things I mentioned in my previous post that I had to do before I send the updated copy that I had just completed:
    • I got #3 completed just now - the animated banner is added to the form and its code for the educated guess questions just now. It was a new thing for me to learn, and I learned it myself! You'll be impressed by the animation I created when you receive the latest update.

    • Also, #4 is scratched off the list, as I created the Ace of Spades (with the traditional "giant" Spade symbol in the center) card that is needed.
    All the work I have to do this time around would be adding the font resource to the code as well as adding the appropriate font to the main folder (as mentioned in #2). The rest of what I mentioned (#1 and #5) I will need some help on.

    It looks like this folder will be sent to you much sooner. Possibly by tomorrow, most likely.

  28. #188

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    I just added the font resource and the new font is now in the folder. Look for an updated folder by PM tomorrow morning!

  29. #189

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Sent the updated form to you, Marty.

    Also, there are significant enhancements to the game that you might want to check out!

  30. #190

  31. #191
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Lets now talk about the subsequent test runs going beyond 104 cards problem.

    The first thing I need to know is what exactly is a "second test run"? That may sound like a silly question but I don't know for sure what you mean by a "test run". What I assume you mean is that a test run starts with you starting the program answering some questions, etc and then closing the program. So a "second test run" would be doing that again. Is that what you mean? Because if it is I'm confused because there is absolutely no way that your app could deal too many decks or cards the second time if it doesn't do it the first time.

  32. #192

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Thanks!

    Now the only problem that remains is the card sequence issue. For that, I will compile the updated code into an EXE, and do some test runs with that EXE file. If no problems prevail, then the problem was already solved.

    As of the most recent testing, the red player had a 3 to start. Called it lower, and (surprisingly) got a 2. Called it lower than a 2 (intentionally), and got a king.

    When that same red player won the next question, he had to start from the 3. He called it higher. The last card recorded was a King, and although the result was a Queen, the right sub was activated (the HigherRightRedCards sub).

    As of right now, it looks promising. It's possible that with more than one test run in the Project file while that project file is still open, the number of cards that are displayed in the display window does happen to exceed the maximum 104 that should prevail.

    A couple of more test runs, and if they pass, I will safely declare the biggest problem with the game solved. Then it is smooth sailing from there on in.
    Last edited by JonSea31; Jan 25th, 2010 at 10:34 AM.

  33. #193
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Could you please explain what you mean when you say "It's possible that with more than one test run in the Project file while that project file is still open, the number of cards that are displayed in the display window does happen to exceed the maximum 104 that should prevail". Because again I'm not sure what "more than one test run in the Project file" means.

  34. #194

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by MartinLiss View Post
    Lets now talk about the subsequent test runs going beyond 104 cards problem.

    The first thing I need to know is what exactly is a "second test run"? That may sound like a silly question but I don't know for sure what you mean by a "test run". What I assume you mean is that a test run starts with you starting the program answering some questions, etc and then closing the program. So a "second test run" would be doing that again. Is that what you mean? Because if it is I'm confused because there is absolutely no way that your app could deal too many decks or cards the second time if it doesn't do it the first time.
    A "test run" is opening the project file, and clicking the "start" button to test the game. The "start" button is the one with the triangle near the top of the screen (it should be near the Pause and the Stop buttons).

    You can also do a test run by going to the "Run" menu, and selecting "Start" or "Start with full compile."

    Quote Originally Posted by MartinLiss
    Could you please explain what you mean when you say "It's possible that with more than one test run in the Project file while that project file is still open, the number of cards that are displayed in the display window does happen to exceed the maximum 104 that should prevail". Because again I'm not sure what "more than one test run in the Project file" means.
    You can "start" the run by clicking the "start" button, and you can stop it at any time by clicking the button with the square on it, as well you can pause the run. After you click "stop", you can "start" the run again by clicking "Start."

    So I guess what I meant by "test run" was probably confusing, and I am sorry for not being clear enough.

  35. #195
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Okay so when you talk about a test run you mean starting the app and in that case as I said previously there is absolutely no way that your app could deal too many decks or cards the second time if it doesn't do it the first time. I believe what you are seeing in the Immediate window is just some values left over from the previous test and they have no effect whatsoever on the current test. To avoid confusion you could (between test runs) set focus to that window, click ctrl-A and then click Delete.

  36. #196
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Some things I've noticed.

    1)
    In your DealBlueCard and DealRedCard subs you don't use i, X or OldSlot you also have code that checks to see if BlueCards(currentCard) > 51 and I don't think that that's ever possible. Also you have code in two places that checks to see if the deck needs to be shuffled so I think DealBlueCard could (and probably should) be changed to
    Code:
    Private Function DealBlueCard(Ctrl As Control) As Integer
    
        Ctrl.Picture = cards(BlueCards(currentCard))
        Picture1.AutoRedraw = True
        Picture1.PaintPicture Ctrl.Picture, Ctrl.Left, Ctrl.Top
        Picture1.AutoRedraw = False
        Ctrl.Tag = BlueCards(currentCard)
        currentCard = currentCard + 1
        If currentCard > 52 Then ShuffleBlueCards 'Note I changed this to 52 (that's correct right?)
        Me.Refresh
    
        DealBlueCard = Ctrl.Tag Mod 13
    
    End Function
    and similar for DealRedCard. You'll also of course have change how those subs are called because there is now just one parameter.

    2) In Form_Load I found
    Code:
    Picture1 = LoadPicture(App.Path & "\cards\bkgd-bothdim.bmp")
    which should be changed to
    Code:
    Set Picture1.Picture = LoadPicture(App.Path & "\cards\bkgd-bothdim.bmp")
    3) In your BlueHigherRight and similar subs you have the following code repeated 13 times.

    Code:
    BlueHigher.Visible = True
    Set Picture1.Picture = BLBkgdFlash
    Wait 200
    BlueHigher.Visible = False
    Set Picture1.Picture = BkgdBothDim
    Wait 200
    and you could just have a Dim lngIndex As Long and then replace those 13 occurrences with this one loop
    Code:
    For lngIndex = 1 to 13
        Set Picture1.Picture = BLBkgdFlash
        Wait 200
        BlueHigher.Visible = False
        Set Picture1.Picture = BkgdBothDim
        Wait 200
    Next
    4) I have a piece of software that let's me analyze the code in a project and when I ran it against yours it told me that you have four command buttons that don't have code in their Click events and they are:
    btnBPlayCds
    cmdBPassCds
    cmdRPassCds
    cmdRPlayCds

    It also pointed out that you have several "dead" procedures (in other words not used) and they are:
    cmdRChangeCd_Click
    cmdBChangeCd_Click
    btnPlayBCds_Click
    btnPlayRCds_Click
    LastCardRedWin
    LastCardBlueWin
    SetRDEGNumber
    SetBLEGNumber
    RedFreezeBar
    BlueFreezBar

    Comparing those two lists points out that in the case of btnBPlayCds in the first list and btnPlayBCds_Click in the second that you have forgotton to complete a name change.

    If the rest of the procudures in the 2nd list aren't needed any longer then you should delete them.

  37. #197
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Another thing. If I answer the first question with a number > 9999 it tells me that the "Answer must be between 0 and 9999" however it lets the game proceed. To prevent that you should add an Exit Sub as shown below.

    Code:
    Private Sub cmdEnterEGR_Click()
    Dim i As Integer
        If Val(txtGuess.Text) < 0 Then
            MsgBox "Answer must be between 0 and 9999."
            cmdEnterRegR.Enabled = True
        ElseIf Val(txtGuess.Text) > 9999 Then
            MsgBox "Answer must be between 0 and 9999."
            cmdEnterRegR.Enabled = True
            Exit Sub
        Else
    '~~~> Your text or question
            strTemp = txtGuess.Text '-- If you don't set it no text can be animated!
            n = 1
            Timer7.Enabled = True
            Timer7.Interval = 200
            cmdEnterRegR.Enabled = False
            cmdEnterRegR.Visible = False
        End If
        Me.Refresh
        WhosTurn = BluePlayer
        AskHigherLowerEGBlue
    End Sub
    You also don't use "i" in that sub so you should delete the Dim for it. You should look at your other similar subs and add Exit Sub statements if needed.

    Another problem with that sub is that a player can answer with, say, "four" instead of "4". When that happens Val(txtGuess.Text) is zero so the guess is treated as if the user entered zero. If you'd like to be able to prevent that (and also prevent a minus sign from being entered) then add this sub

    Code:
    Private Sub txtGuess_KeyPress(KeyAscii As Integer)
    
    If KeyAscii < 48 Or KeyAscii > 57 Then
        KeyAscii = 0
    End If
    
    End Sub
    The user could still paste an invalid value into txtGuess and if you want to prevent that then let me know.

  38. #198

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Actually, 3 of the "dead" procedures (cmdBPassCds, cmdRPassCds, and cmdRPlayCds) are only there because they will be used eventually in other questions.

    Also, a brief explanation on some of the following "dead" code as displayed in green text:
    Quote Originally Posted by MartinLiss
    It also pointed out that you have several "dead" procedures (in other words not used) and they are:
    cmdRChangeCd_Click <=== is used - changes to red card back then moves to ChangeRedCard sub
    cmdBChangeCd_Click <=== is used - changes to blue card back then moves to ChangeBlueCard sub
    btnPlayBCds_Click <== Deleted.
    btnPlayRCds_Click <== Deleted.
    LastCardRedWin <== will be used eventually - just cutting to the chase
    LastCardBlueWin <== will be used eventually - just cutting to the chase
    SetRDEGNumber <== Deleted.
    SetBLEGNumber <== Deleted.
    RedFreezeBar <== Deleted.
    BlueFreezBar <== Deleted.
    Other than that, thanks for the most recent tips!

  39. #199
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Actually cmdRChangeCd_Click and cmdBChangeCd_Click aren't used because you don't have controls with those names. You have instead cmdChangeRCd and cmdChangeBCd.

  40. #200
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Here's a picture of what my software pointed out as dead constants and declarations. They can be deleted.
    Name:  Dead1.jpg
Views: 214
Size:  200.7 KB

    and these are dead variables.

    Name:  Dead2.jpg
Views: 214
Size:  112.1 KB

Page 5 of 10 FirstFirst ... 2345678 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width