Click here to Skip to main content
15,921,531 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.NET String.Replace Occurance Count Pin
KevinMac5-Jan-07 17:23
KevinMac5-Jan-07 17:23 
QuestionHow to generate dynamic crystal reports - .NET needn't exists a file *.rpt Pin
tinh cau5-Jan-07 16:00
tinh cau5-Jan-07 16:00 
QuestionVB.NET 2005 loop rather than IF's Pin
harveyhanson5-Jan-07 15:36
harveyhanson5-Jan-07 15:36 
AnswerRe: VB.NET 2005 loop rather than IF's Pin
MatrixCoder5-Jan-07 15:49
MatrixCoder5-Jan-07 15:49 
GeneralRe: VB.NET 2005 loop rather than IF's Pin
harveyhanson6-Jan-07 1:12
harveyhanson6-Jan-07 1:12 
GeneralRe: VB.NET 2005 loop rather than IF's Pin
MatrixCoder6-Jan-07 6:24
MatrixCoder6-Jan-07 6:24 
GeneralRe: VB.NET 2005 loop rather than IF's Pin
harveyhanson6-Jan-07 7:40
harveyhanson6-Jan-07 7:40 
GeneralRe: VB.NET 2005 loop rather than IF's Pin
Thomas Stockwell6-Jan-07 8:27
professionalThomas Stockwell6-Jan-07 8:27 
You should be able to put a for loop around the if-endIf statement. I forgot the exact syntax for VB.NET but it looks like this in VC#.NET.

<br />
for(int i=0;i<10;i++)<br />
{<br />
    if(txtInput1.Text==lblLetter1.Text)<br />
    {<br />
        lblLetter1.ForeColor=Color.Green;<br />
        intScoreAll+=1;<br />
    }<br />
    else <br />
    {<br />
        lblLetter1.ForeColor=Color.Red;<br />
    }<br />
}<br />
txtInput1.Enabled=false;<br />
txtInput2.Select();<br />


Well that is how you would use a for-loop but it may be better for you if you just set up a global counter that is incremented by 1 whenever this method is used and when the value reaches 10 then exit. The loop for you in this method would not necessarily work becuase it would do the for loop on the same text that is in the textbox at one time without new text being entered for every of the ten times.

Regards,
Thomas Stockwell

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

Visit my homepage Oracle Studios[^]

QuestionNeed to set up Formula Fileld on JPG File Path in Crystal Reports! Pin
open_web5-Jan-07 12:41
open_web5-Jan-07 12:41 
QuestionSecurely storing information Pin
_Richard Faulkner5-Jan-07 11:26
_Richard Faulkner5-Jan-07 11:26 
AnswerRe: Securely storing information Pin
Colin Angus Mackay5-Jan-07 14:22
Colin Angus Mackay5-Jan-07 14:22 
AnswerRe: Securely storing information Pin
Vasudevan Deepak Kumar5-Jan-07 22:21
Vasudevan Deepak Kumar5-Jan-07 22:21 
AnswerRe: Securely storing information Pin
Duncan Edwards Jones6-Jan-07 0:03
professionalDuncan Edwards Jones6-Jan-07 0:03 
QuestionWriting vb.net "scripts" Pin
_Richard Faulkner5-Jan-07 11:05
_Richard Faulkner5-Jan-07 11:05 
AnswerRe: Writing vb.net "scripts" Pin
Christian Graus5-Jan-07 21:50
protectorChristian Graus5-Jan-07 21:50 
AnswerRe: Writing vb.net "scripts" Pin
WillemM7-Jan-07 7:48
WillemM7-Jan-07 7:48 
QuestionCopyFromScreen Pin
_Richard Faulkner5-Jan-07 10:44
_Richard Faulkner5-Jan-07 10:44 
AnswerRe: CopyFromScreen Pin
Vasudevan Deepak Kumar5-Jan-07 22:22
Vasudevan Deepak Kumar5-Jan-07 22:22 
QuestionInstant Messenger Pin
_Richard Faulkner5-Jan-07 10:34
_Richard Faulkner5-Jan-07 10:34 
AnswerRe: Instant Messenger Pin
tranceunte5-Jan-07 11:07
tranceunte5-Jan-07 11:07 
AnswerRe: Instant Messenger Pin
Vasudevan Deepak Kumar5-Jan-07 22:23
Vasudevan Deepak Kumar5-Jan-07 22:23 
QuestionDatabase issues Pin
Karma312515-Jan-07 10:16
Karma312515-Jan-07 10:16 
AnswerRe: Database issues Pin
Colin Angus Mackay5-Jan-07 14:13
Colin Angus Mackay5-Jan-07 14:13 
GeneralRe: Database issues Pin
kermit885-Jan-07 16:55
kermit885-Jan-07 16:55 
GeneralRe: Database issues Pin
Colin Angus Mackay6-Jan-07 0:08
Colin Angus Mackay6-Jan-07 0:08 

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.