Click here to Skip to main content
15,346,739 members
Home / Discussions / C#
   

C#

 
AnswerRe: newbie using a game to learn c# and object-oriented programming Could I make an abstract factory to merge the other factories in a game? Pin
Gerry Schmitz21-Dec-21 17:56
mveGerry Schmitz21-Dec-21 17:56 
GeneralRe: newbie using a game to learn c# and object-oriented programming Could I make an abstract factory to merge the other factories in a game? Pin
biull smith6-Jan-22 10:18
Memberbiull smith6-Jan-22 10:18 
QuestionTotal Newbie... just installing Visual Studio... Pin
Audio Babble17-Dec-21 6:08
MemberAudio Babble17-Dec-21 6:08 
AnswerRe: Total Newbie... just installing Visual Studio... Pin
OriginalGriff17-Dec-21 6:12
mveOriginalGriff17-Dec-21 6:12 
GeneralRe: Total Newbie... just installing Visual Studio... Pin
Audio Babble17-Dec-21 6:24
MemberAudio Babble17-Dec-21 6:24 
QuestionDisplaying data in a textBox Pin
Luis M. Rojas16-Dec-21 8:50
MemberLuis M. Rojas16-Dec-21 8:50 
AnswerRe: Displaying data in a textBox Pin
trønderen16-Dec-21 9:10
Membertrønderen16-Dec-21 9:10 
AnswerRe: Displaying data in a textBox Pin
OriginalGriff16-Dec-21 9:50
mveOriginalGriff16-Dec-21 9:50 
You can't use a loop for that: when an event is raised your handler is called and nothing else happens until your event handler hits the return statement (or the end of the method) - and that very much include display updates!

So reading the lines in a loop does nothing useful, because the Paint event isn't actioned until after the last line has been displayed - so the only thing your user will ever see is the last line!

If you want to do that, you will need to set up a Timer (with an Interval that says how long you want each line displayed for) and kick it off in your button Click event.
Inside the Timer.Tick handler, copy just one line to the textbox, and set up for the next by moving an index on one. Then exit (remembering to cancel the timer when you run out of lines).
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Displaying data in a textBox Pin
Eddy Vluggen17-Dec-21 1:14
professionalEddy Vluggen17-Dec-21 1:14 
GeneralRe: Displaying data in a textBox Pin
OriginalGriff17-Dec-21 1:42
mveOriginalGriff17-Dec-21 1:42 
GeneralRe: Displaying data in a textBox Pin
Eddy Vluggen17-Dec-21 2:58
professionalEddy Vluggen17-Dec-21 2:58 
QuestionMonthCalendar - Adding a date without having the month or year. Pin
Richard A Knox16-Dec-21 3:06
MemberRichard A Knox16-Dec-21 3:06 
AnswerRe: MonthCalendar - Adding a date without having the month or year. Pin
PIEBALDconsult16-Dec-21 3:07
professionalPIEBALDconsult16-Dec-21 3:07 
AnswerRe: MonthCalendar - Adding a date without having the month or year. Pin
OriginalGriff16-Dec-21 4:09
mveOriginalGriff16-Dec-21 4:09 
AnswerRe: MonthCalendar - Adding a date without having the month or year. Pin
#realJSOP17-Dec-21 2:40
mva#realJSOP17-Dec-21 2:40 
Questionre-create a local database Pin
steven_noppe15-Dec-21 20:04
Membersteven_noppe15-Dec-21 20:04 
AnswerRe: re-create a local database Pin
OriginalGriff15-Dec-21 20:54
mveOriginalGriff15-Dec-21 20:54 
AnswerRe: re-create a local database Pin
#realJSOP16-Dec-21 2:39
mva#realJSOP16-Dec-21 2:39 
GeneralRe: re-create a local database Pin
jschell23-Dec-21 5:50
Memberjschell23-Dec-21 5:50 
QuestionHow do i gate the previous values in Crystal repor Pin
remiki14-Dec-21 7:37
Memberremiki14-Dec-21 7:37 
AnswerRe: How do i gate the previous values in Crystal repor Pin
remiki16-Dec-21 0:56
Memberremiki16-Dec-21 0:56 
QuestionParse from string Pin
Member 1546737514-Dec-21 4:00
MemberMember 1546737514-Dec-21 4:00 
AnswerRe: Parse from string Pin
Pete O'Hanlon14-Dec-21 5:21
mvaPete O'Hanlon14-Dec-21 5:21 
GeneralRe: Parse from string Pin
jsc4214-Dec-21 6:55
professionaljsc4214-Dec-21 6:55 
AnswerRe: Parse from string Pin
#realJSOP15-Dec-21 0:35
mva#realJSOP15-Dec-21 0:35 

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.