|
-
Oct 30th, 2000, 01:57 AM
#1
Thread Starter
New Member
I really hate to be a pain.
But I am now having another problem with my card game.
I now have it dealing the cards on startup and I can drag the actual card.
But now I have a major problem with the cards re-dealling. When re-dealt the cards are fine. But when I drag one card over another card, that cards current face is wiped off and the original one comes back.
EG. I start the program. I get the Ace and two of spades. Re-deal and these are now the King and Queen of hearts. Lets say I drag the King over the Queen. The Queen picture is removed and the two of spades comes back again.
There is probably an easy way of fixing this problem. But I can't find it. I am hoping someone might be able to shed some light on it.
Thanks
Life Sucks, so let it happen.
-
Oct 30th, 2000, 07:54 AM
#2
transcendental analytic
Probably, but it could be almost anything, where's your code for moving the cards? Do you have positions for all cards?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 31st, 2000, 05:56 PM
#3
Thread Starter
New Member
Here is the code that I am using to move the cards.
Code:
Private Sub picCards_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single Index as Integer)
'Global Variables.
StartX = X
StartY = Y
End Sub
Private Sub picCards_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single Index as Integer)
If Button = 1 Then
picCards(Index).Move picCards(Index).Left + X - StartX, picCards(Index).Top + Y - StartY
End If
End Sub
I hope this helps in solving my problem.
Life Sucks, so let it happen.
-
Oct 31st, 2000, 07:00 PM
#4
transcendental analytic
But when I drag one card over another card, that cards current face is wiped off and the original one comes back.
I mean what has that to do with Current face being wiped off? Sounds like you don't have Autoredraw turned on for the pictureboxes. And what do you mean by the original one comes back? Are you redrawing the pictures, and if so, how? or moving the cards without user input, whereas it could cause a faulty movement
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 31st, 2000, 07:56 PM
#5
Thread Starter
New Member
Thank you so much for trying to help, it is greatlly appricated.
I have since worked out how to and fixed the problem.
Once again Thanks for trying.
Life Sucks, so let it happen.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|