Click here to Skip to main content
12,622,741 members (27,806 online)

Visual Basic

 
GeneralRe: Getting Image coordinates when image is zoomed Pin
Jarno Burger27-May-09 7:53
memberJarno Burger27-May-09 7:53 
GeneralRe: Getting Image coordinates when image is zoomed Pin
Alan Streisel29-May-09 3:58
memberAlan Streisel29-May-09 3:58 
GeneralRe: Getting Image coordinates when image is zoomed Pin
DidiKunz29-May-09 5:17
memberDidiKunz29-May-09 5:17 
GeneralRe: Getting Image coordinates when image is zoomed Pin
Alan Streisel29-May-09 6:01
memberAlan Streisel29-May-09 6:01 
GeneralRe: Getting Image coordinates when image is zoomed Pin
DidiKunz29-May-09 7:49
memberDidiKunz29-May-09 7:49 
QuestionPlease help a newbie that is totally confused.... Pin
ymilan26-May-09 7:27
memberymilan26-May-09 7:27 
GeneralRe: Please help a newbie that is totally confused.... Pin
Kschuler26-May-09 8:30
memberKschuler26-May-09 8:30 
AnswerRe: Please help a newbie that is totally confused.... Pin
Guffa26-May-09 12:20
mvpGuffa26-May-09 12:20 
Here is one problem:
Card1 = Int(51 * Rnd)
This will give you a random number with 51 possible values, i.e. from 0 to 50. That means that you are never touching the last card in the deck.

You are doing 100 times as much work as you need to in order to shuffle the deck. You don't have to make more than 51 swaps to completely shuffle the deck, you just have to make sure that each card has an equal chance to be swapped into each position in the deck:
For card1 = 0 To 50
   card2 = card1 + Int((52 - card1) * Rnd)
   If card1 <> card2 Then
      Temp = Image1(card1).Picture
      Image1(card1).Picture = Image1(card2).Picture
      Image1(card2).Picture = Temp
   End If
Next Index


Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: Please help a newbie that is totally confused.... Pin
ymilan27-May-09 13:59
memberymilan27-May-09 13:59 
AnswerRe: Please help a newbie that is totally confused.... Pin
Jarno Burger28-May-09 2:16
memberJarno Burger28-May-09 2:16 
GeneralRe: Please help a newbie that is totally confused.... Pin
ymilan28-May-09 3:29
memberymilan28-May-09 3:29 
GeneralRe: Please help a newbie that is totally confused.... Pin
ymilan28-May-09 3:58
memberymilan28-May-09 3:58 
GeneralRe: Please help a newbie that is totally confused.... Pin
Jarno Burger28-May-09 4:55
memberJarno Burger28-May-09 4:55 
GeneralRe: Please help a newbie that is totally confused.... Pin
ymilan28-May-09 12:57
memberymilan28-May-09 12:57 
GeneralRe: Please help a newbie that is totally confused.... Pin
Jarno Burger29-May-09 0:23
memberJarno Burger29-May-09 0:23 
QuestionGet the last line from a constantly updating textbox Pin
The Mighty Atom26-May-09 6:21
memberThe Mighty Atom26-May-09 6:21 
AnswerRe: Get the last line from a constantly updating textbox Pin
Luc Pattyn26-May-09 6:45
mvpLuc Pattyn26-May-09 6:45 
GeneralRe: Get the last line from a constantly updating textbox Pin
The Mighty Atom26-May-09 7:59
memberThe Mighty Atom26-May-09 7:59 
GeneralRe: Get the last line from a constantly updating textbox Pin
Luc Pattyn26-May-09 8:14
mvpLuc Pattyn26-May-09 8:14 
AnswerRe: Get the last line from a constantly updating textbox Pin
Jarno Burger28-May-09 5:10
memberJarno Burger28-May-09 5:10 
GeneralRe: Get the last line from a constantly updating textbox [modified] Pin
The Mighty Atom28-May-09 7:36
memberThe Mighty Atom28-May-09 7:36 
GeneralRe: Get the last line from a constantly updating textbox Pin
DidiKunz29-May-09 5:22
memberDidiKunz29-May-09 5:22 
GeneralRe: Get the last line from a constantly updating textbox Pin
The Mighty Atom1-Jun-09 4:22
memberThe Mighty Atom1-Jun-09 4:22 
GeneralRe: Get the last line from a constantly updating textbox Pin
DidiKunz1-Jun-09 9:01
memberDidiKunz1-Jun-09 9:01 
GeneralRe: Get the last line from a constantly updating textbox Pin
The Mighty Atom1-Jun-09 9:20
memberThe Mighty Atom1-Jun-09 9:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 3 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid