Page 4 of 10 FirstFirst 1234567 ... LastLast
Results 121 to 160 of 366

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

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

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

    Quote Originally Posted by JonSea31 View Post
    I discovered another problem with regards to the transitioning from the end of the Question to the Card Playing (BlueHigher/LowerRight, etc., to RevealFirstCard)...

    Immediately after the RevealFirstCard sub is set off, the first card is revealed, and the background image along with any images and sounds that come from the BlueHigher/LowerRight Sub is played an additional time - one more than it should. The BlueHigher/LowerRight Sub, in other words, is activated twice instead of just once.

    I will send you the updated files momentarily and see what can be done to fix this problem.
    You should be able to put a breakpoint at the start of those subs and when the code gets there look at the call stack to see why.

  2. #122

    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?

    The call stack shows:

    CSEE.Form1.BlueHigherRight
    CSEE.Form1.WaitForResult
    CSEE.Form1.btnHigherAPQ_Click

    When I activate the breakpoint, the redundant duplication is gone, but when I remove the breakpoint, the duplication prevails.

    Is it possible that the error may prevail within the WaitForResult or btnHigherAPQ_Click subs?

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

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

    Okay here is the culprit.

    Code:
    If (Val(txtGuess.Text) < ans(CurrentQ)) And PlayerAnswer = Higher Then
        If WhosTurn = BluePlayer Then
            BlueHigherRight
        Else
            RedHigherRight
        End If
        If WhosTurn = RedPlayer Then
            RedHigherRight
        Else
            BlueHigherRight
        End If
    When that If is True you know that when it comes to who has guessed right it's a one-or-the-other situation. However (and I know you didn't intend to do this) you don't treat it that way. Let's say it's the blue player's turn. What happens in your code is that If WhosTurn = BluePlayer Then is true so BlueHigherRight is executed. In the next If however If WhosTurn = RedPlayer Then is false so BlueHigherRight is executed again! The following will fix that.

    Code:
    If (Val(txtGuess.Text) < ans(CurrentQ)) And PlayerAnswer = Higher Then
        If WhosTurn = BluePlayer Then
            BlueHigherRight
        Else
            RedHigherRight
        End If
    Note that since it's a one-or-the-other situation so if it's Blue it's Blue and if not it's Red, so you don't need to check twice.

  4. #124

    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?

    Works perfectly now. Thanks!

    Now, it's on to Phase 2 of the form, the card playing. I'll return to this thread if I need any further assistance.

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

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

    Some other things.

    Your form needs to be at least as wide as Picture1, so you should change the form's Width to 14895, otherwise the right side of the image is cut off.

    Let me ask again; why do you need both lblDialog(0) and lblDialog(1)? Why not just lblDialog?

    I'm not asking you to change this now but normal control naming conventions use the prefix of the control's name to indicate what type of control it is, so rather than name an image btnHigherAPQ which someone might think was an actual command button, I would name it imgHigherAPQ. However, did you know that you could replace that image with an actual command button (that you might call cmdHigherAPQ ), set the buttons Style to Graphical, blank out its Caption and set its Picture to the proper bitmap and you have an actual button that can be clicked?

  6. #126

    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
    Let me ask again; why do you need both lblDialog(0) and lblDialog(1)? Why not just lblDialog?
    To allow for a shadow effect.

    As for changing the button style to graphical, I will give that a try.

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

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

    Quote Originally Posted by JonSea31 View Post
    To allow for a shadow effect....
    I never noticed that Here is something that you might want to do. Add the following sub

    Code:
    Public Sub SetDialog(strCaption)
    
    lblDialog(0).Caption = strCaption
    lblDialog(1).Caption = strCaption
    
    End Sub
    which can be used like this.

    Code:
    SetDialog "The cards are being dealt out for Round One, and the red player will be playing the top row while the blue player will be playing the bottom row."

  8. #128

    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?

    Just tried it, and it works perfectly. Thanks!

    Now, I asked a while back about why the wrong audio clip plays and sometimes when I call a card higher, and the next card was higher, but it registered the "HigherWrongCards" sub instead of the "HigherRightCards" sub (see this post for reference).

    Although the caption picks up the recorded base card back to where that player started, the next card predicted would work from the most recent card revealed (maybe it's a CurImage issue?) instead of from the base card. I discovered that, when a contestant makes a mistake, all the cards (except for the base card or the card where the contestant froze on) are expected to be cleared (as with the RemoveCards sub), but the cards are not cleared for some strange reason. Here is a piece of code I have:

    Code:
    Private Sub RemoveCards()
    Dim i As Integer
    
    contBkgd(1).AutoRedraw = True
    For i = CurrentSlot To (FreezeCard(WhosTurn) + 1) Step -1
        CurrentSlot = i
        contBkgd(1).PaintPicture LoadPicture(App.Path & "\Card Sharks Images\high-lowboard.jpg") _
            , CurImage.Left, CurImage.Top, CurImage.Width, CurImage.Height _
            , CurImage.Left, CurImage.Top, CurImage.Width, CurImage.Height, vbSrcCopy
            
    Next
    contBkgd(1).AutoRedraw = False
    contBkgd(1).Refresh
    
    WhosTurn = WhosTurn Xor 1
    End Sub
    Is there a better way for me to clear the cards without having to use AutoRedraw or PaintPicture?

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

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

    Please send me a new set of files. I don't know what I did but the set I have goes off into never-never land after I make my highr/lower choice. BTW I just noticed that the last two sets of files you sent didn't include the Card Sharks Images folder.

  10. #130

    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
    BTW I just noticed that the last two sets of files you sent didn't include the Card Sharks Images folder.
    That's because there is a new folder to replace the "Card Sharks Images" folder - it's in a folder named "cards". I'm sorry I forgot to edit the code to reflect the newer folder replacing the "Card Sharks Images" folder.

    New folder is being uploaded now and will be delivered momentarily.

    And what do you mean by "never-never land"?

  11. #131

  12. #132

    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 sent you the latest update.

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

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

    Before I get to the problem I'd like to mention a few things I noticed.

    You can safely remove the Debug.Print "Procedure... line in Form_Load.

    You can change

    Code:
    If oldCardValue < i Then
        oldCardValue = i
        HigherRightCards
    ElseIf oldCardValue > i Then
        HigherWrongCards
    ElseIf oldCardValue = i Then
        HigherWrongCards
    End If
    to

    Code:
    If oldCardValue < i Then
        oldCardValue = i
        HigherRightCards
    Else
        HigherWrongCards
    End If
    and similarly in other places in your code.

    The "You can change it if you want to" sound clip seems to have an extra sylable at the end. It sounds like "You can change it if you want to it"

    When I select the "CHANGE" 'button' nothing happens.

    Form1d should have a non-default caption.

    The positioning of controls like RDNumber are misplaced.

    Okay now about the problem...

    The 1st card that was dealt in my test was the 5c. I guessed higher and the 9h was the next card. The AnswerHigherCards sub was of course then executed but when it got there I find that I don't understand your code. You first set i to CurrentSlot which gives it a value of 1. (You also give j a value but you don't seem to use it.) You then however change i via the DealCard function to 7. Why is 9h = 7? When the sub is entered oldCardValue = 3. Why is that?

  14. #134

    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
    You can safely remove the Debug.Print "Procedure... line in Form_Load.
    Done.

    Quote Originally Posted by MartinLiss
    You can change

    Code:
    If oldCardValue < i Then
        oldCardValue = i
        HigherRightCards
    ElseIf oldCardValue > i Then
        HigherWrongCards
    ElseIf oldCardValue = i Then
        HigherWrongCards
    End If
    to

    Code:
    If oldCardValue < i Then
        oldCardValue = i
        HigherRightCards
    Else
        HigherWrongCards
    End If
    and similarly in other places in your code.
    Done.

    Quote Originally Posted by MartinLiss
    The "You can change it if you want to" sound clip seems to have an extra sylable at the end. It sounds like "You can change it if you want to it"
    Will be fixed.

    Quote Originally Posted by MartinLiss
    When I select the "CHANGE" 'button' nothing happens.
    That's because I am doing the coding step-by-step. The change button code will be added soon.

    Quote Originally Posted by MartinLiss
    Form1d should have a non-default caption.
    Fixed.

    Quote Originally Posted by MartinLiss
    The positioning of controls like RDNumber are misplaced.
    Actually, the first question is supposed to be answered by the red player (RDNumber displayed), and the second question is supposed to be answered by the blue player (BLNumber displayed), and the 3rd question answered by the red player, and so forth. At least for Round One.

    Quote Originally Posted by MartinLiss
    The 1st card that was dealt in my test was the 5c. I guessed higher and the 9h was the next card. The AnswerHigherCards sub was of course then executed but when it got there I find that I don't understand your code. You first set i to CurrentSlot which gives it a value of 1. (You also give j a value but you don't seem to use it.) You then however change i via the DealCard function to 7. Why is 9h = 7? When the sub is entered oldCardValue = 3. Why is that?
    I am so sorry, but I did a last minute stab at editing one of the subs. You can delete that sub that contains the error for now.

    That problem was made today, but I was trying to fix the problem myself, but to no avail. In the remove cards sub, you can replace the code on the form I sent you with the one I supplied in Post #128 and see what happens.

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

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

    When I said that "The positioning of controls like RDNumber are misplaced", what I meant was that when the numbers show up on the form parts of them are cut off.

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

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

    Quote Originally Posted by JonSea31 View Post
    ...I am so sorry, but I did a last minute stab at editing one of the subs. You can delete that sub that contains the error for now.

    That problem was made today, but I was trying to fix the problem myself, but to no avail. In the remove cards sub, you can replace the code on the form I sent you with the one I supplied in Post #128 and see what happens.
    I'm confused so why not make some of the changes I suggested and send me a new set of files.

  17. #137

    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 added the ChangeCard sub and activated the btnChangeCd to allow for the card to be changed when prompted.

    As for the audio clip with an unnecessary "it" at the end, it hasn't been clipped out as yet, but will be soon. The other tasks you suggested are now done.

    I am uploading the current folder and will be on the way.
    Last edited by JonSea31; Jan 3rd, 2010 at 01:51 PM.

  18. #138

    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 I said that "The positioning of controls like RDNumber are misplaced", what I meant was that when the numbers show up on the form parts of them are cut off.
    You mean the tops of the numbers?

    If so, that's the way the font came originally when I downloaded it. It's called SportsType, and was used in many game shows (currently only featured on certain games on The Price is Right - like Dice Game and Contestant's Row, to name two - only difference is, they appeared slightly tilted on certain game shows).

    BTW, are there any sites where I could download free programs that I can create fonts?
    Last edited by JonSea31; Jan 3rd, 2010 at 02:00 PM.

  19. #139

  20. #140

    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?

    Oh, thanks for clarifying! I apparently used SportsType font on my side, but you probably use Arial on your side.

    And I learned from user Technorobbo about the AddFontResource in the code for the Blockbusters game I was working on last year. I didn't get the opportunity to add this to my code, so I shall try the same for the Card Sharks game.

    An updated folder will be delivered later on.

  21. #141

  22. #142

    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?

    Did you receive the latest delivery?

  23. #143

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

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

    I've looked at the code and I have to ask, is the code you sent the most current? I ask because while the font has been changed you said you changed the form's caption but it's still the default. Also code like the following that you have in 3 places is still unchanged. I also still have the same questions that I asked previously about the AnswerHigherCards sub and in order for me to help you I need to understand what's going on there and if it's correct.

    Code:
    If oldCardValue < i Then
        oldCardValue = i
        HigherRightCards
    ElseIf oldCardValue > i Then
        HigherWrongCards
    ElseIf oldCardValue = i Then
        HigherWrongCards
    End If

  25. #145

    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
    The 1st card that was dealt in my test was the 5c. I guessed higher and the 9h was the next card. The AnswerHigherCards sub was of course then executed but when it got there I find that I don't understand your code. You first set i to CurrentSlot which gives it a value of 1. (You also give j a value but you don't seem to use it.) You then however change i via the DealCard function to 7. Why is 9h = 7? When the sub is entered oldCardValue = 3. Why is that?
    How did CurrentSlot get a value of 1? Isn't it supposed to get a value of 0?

    And this changing of i via DealCard function to 7 and the oldCardValue = 3 as a result of entering the sub was a mistake on my part. I admit I was randomly manipulating the code a bit to see if I could figure out the problem. Guess I should leave it to you to help me out, as I don't even have a full year's experience with Visual Basic. I learn a lot from you.

    And I thought the code I sent you was updated, but I guess where the tweaking occurred in subs I didn't save each change each time it was done. The code is now edited and a new one will be sent.
    Last edited by JonSea31; Jan 4th, 2010 at 06:20 AM.

  26. #146

    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, after taking a few days break, I decided to continue with the project since I have nothing better to do.

    I actually found something when I hovered over this line of code:

    Code:
    i = DealCard(CurImage, 0)
    The red bolded items indicates the OldSlot integer. If the players next card result is recorded from the result of the old slot of the last card revealed on that row, when it should start from the first card and not the last card revealed on the row (the card that is revealed when a player makes a mistake on the row).

    Maybe you should look into possibly finding the error on the DealCard Private Function area:

    Code:
    Private Function DealCard(Ctrl As Control, OldSlot As Integer) As Integer
        Dim i As Integer, X As Integer
        i = CurrentSlot
        Do While rand(currentCard) > 51
            currentCard = currentCard + 1
            If currentCard > 53 Then Shuffle
        Loop
        
        Ctrl.Picture = cards(rand(currentCard))
        Picture1.AutoRedraw = True
        Picture1.PaintPicture Ctrl.Picture, Ctrl.Left, Ctrl.Top
        Picture1.AutoRedraw = False
        Ctrl.Tag = rand(currentCard)
        currentCard = currentCard + 1
        If currentCard > 51 Then Shuffle
        Me.Refresh
       
        DealCard = Ctrl.Tag Mod 13
       
    End Function
    I will clarify that all I wanted to have done was to clear not just the cards but also their corresponding card values as well (except for the first card on the row, or whatever card he/she froze on). There is a way to do it.

    In the meantime, I will be adding the FreezePlay code very soon and I will send an updated copy to Martin at some point later today.

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

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

    "If the players next card result is recorded from the result of the old slot of the last card revealed on that row, when it should start from the first card and not the last card revealed on the row (the card that is revealed when a player makes a mistake on the row)."


    Could you reword that please? As it is I don't understand it. Perhaps an example would also help.

  28. #148

    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?

    Just to refresh:

    1. The red player guesses a number on the question

    2. The blue player guesses higher

    3. The blue player wins the question, and has first play of the cards

    4. The blue player starts with a 3.

    5. The blue player calls that next card lower (intentionally, due to testing).

    6. The next card is a Jack and a buzzer sounds.

    7. The second question is in play.

    8. After the second question is done, the blue player has a turn at the cards.

    9. The blue player is supposed to start with the card value of a 3.

    10. The blue player calls the next card higher than the 3.

    11. Although the 3 is the base card value, and the Jack is the most recently revealed card on the blue row, the next card works from the Jack (which should be removed) instead of the 3.

    12. Although the blue player called the card higher than the 3, the next card appears to be higher (it would be a 9, for example).

    13. But since the last recorded reveal card value (the Jack) was not cleared, the Jack stayed in place since before the second question, and the HigherWrongCards sub was set off since the last card result that shouldn't exist, the next card result was recorded as lower than the Jack instead of higher than the 3.


    And the problem may lie in the code I provided in Post #146. I know it seems hard to understand, but I'm sure it will be figured out sooner or later.

  29. #149

  30. #150

    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 am in the process of cleaning up the code, and it will take a little while (though not as long as we think). I printed off the code by copying/pasting it onto a Word Document and using a printer, and I examined the code for possible redundancies. Some redundancies are eliminated, and some are moved into an Overflow.frm file (which will not be included in the next delivery, as it's a temporary storage form). It may be late tomorrow afternoon or early Tuesday morning before an updated "clean" version will be delivered, as I have to go through the code little by little a few times over.

    But it was great for me to learn how to randomize audio files today.

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

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

    I know what I said in my PM and you really should compile the code but I went ahead and looked at the card-skipping problem. I think it's actually working correctly.

    Let's talk about your Shuffle sub. You have two of them and you should replace the one in GameEssentials with the one that is now in the form. Also, and this is important to understand why I don't think you have a problem, change the Debug.Print part of that sub to this

    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
    
    For i = 0 To 51
        Debug.Print NameCard(rand(i))
    Next
    
    End Sub
    That will show you the names of the cards in the "deck". I looked at the names and when a player makes a mistake it seems to me that the cards for the other player start in the right place and show up in the proper order. If not then could you make another video and explain again what is wrong?

  32. #152

    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, something came to my mind when I was figuring out why a mistake would be made with the cards by the player, and goes back to the base card value (or whatever value of the card he/she froze from), and then the card result would be recorded from the last card revealed when it should be from the base card value or frozen card value.

    It may have to do with the SeqControl. You see, on the bottom of the VB screen, there should be an area that shows a string of numbers listed out of sequence (hence why the cards are shuffled). If you move the scroll bar in that bottom window up to the top, you will see the first shuffle results (or the only shuffle result).

    In order to have the right card in the sequence and to allow the card to record from the current base card value, there would have to be some skipping of numeric card labels (ranging from 0 to 51).

    Say, if the following sequence:

    Code:
    34            14            33            17            32            0             46            29            17            32            37            29            2             42            18            14            44            36            44            27            24            13            22            47            17            44            2             19            7             39            47            48            22            0             45            47            8             28            4             30            33            1             7             46            37            35            47            15            33            16            32            51
    This is probably for two decks of cards, if I remember correctly (seeing that every second card is for the . There could be skipping involved, but now I realize that there needs to be two decks of cards (one for the red player and one for the blue player).

    I noticed that the "34" (the first card on the blue row, since the blue player won the question) denotes a certain card value. It is possible that the numbers on the sequence line alternate between the red player and the blue player. But then again, some numbers duplicate, but you might want to look into this SeqControl and see what happens.

    If skipping is needed, there may have to be a skippage (in other words, leeway) of 5 cards in the sequence after the second question, and a skippage of 10 cards after the third question, and a skippage of 15 cards after the fourth question (a.k.a. the "sudden death" question, which will be worked on after this problem is fixed). But if a player makes a mistake, the current card value will have to be reset to whatever card value was at the beginning of the row or whatever card the player froze on.

    I will try a test run with the code you supplied, and I'll see what results I get. But as for the sequence control, it was just an idea.

    Oh, and btw, the Shuffle sub in the GameEssentials module shows cards listed from 0 to 53. That is because it may be required for when the Money Cards end game will be added to the form. There will be Jokers in that deck for the add-on 1986 version of the Car Game (which is already developed, but will also be consolidated to the same form as will the Money Cards). It's just that the Shuffle may have to be renamed "MCShuffle" when this task comes around.
    Last edited by JonSea31; Jan 15th, 2010 at 06:09 PM.

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

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

    That display is in the "Immediate Window". It actually has very little meaning. Change the Shuffle sub to the way I suggested and you'll see that the cards display in the right order

  34. #154

    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?

    ^ Just did. And I will remember to compile from now on before I send the project and corresponding forms.

  35. #155

  36. #156

    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 think the problem may be because I have two sources of Shuffle - one in the GameEssentials module, and the other within the form - and such redundancy may have thrown off the code a bit.

    Is this the case? If so, I can understand why the code that user technorobbo did for me originally worked well, but my version (which was worked off technorobbo's version) may have been thrown off a bit.

    And if this is true, I will definitely try eliminating the Shuffle sub from the GameEssentials module, and see if I get optimum results. I'll return to this thread tomorrow morning and give my feedback on this matter - I have some stuff to take care of away from my PC tonight before I head off to bed.

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

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

    Remember when we talked about scope? If you put a breakpoint in the GameEssentials Shuffle you'll find it never gets executed because when you call Shuffle, VB will call the local one (the one in the form where you call it).

  38. #158

    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 still have a hard time understanding scope, but I see what you mean. The problem may have been it retrieved from the Shuffle subs of both the local form and the module. I can see why some numbers in the display window were repeated.

    Also, I discovered that "LoadCards" was duplicated in both the local form and the GameEssentials module. I deleted the one in the module as well.

    Six weeks of figuring out a big problem, and it may have been all due to duplicated coding.

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

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

    Quote Originally Posted by JonSea31 View Post
    I still have a hard time understanding scope, but I see what you mean. The problem may have been it retrieved from the Shuffle subs of both the local form and the module. I can see why some numbers in the display window were repeated....
    No, sorry, code is never "retreived" from a sub unless it is executed and the Shuffle sub in the module is never executed.

  40. #160

    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
    No, sorry, code is never "retreived" from a sub unless it is executed and the Shuffle sub in the module is never executed.
    Sorry. I just couldn't think of another word to use instead of "retrieved."

Page 4 of 10 FirstFirst 1234567 ... 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