Text that types itself!
The following code, when running, looks like the text is actually typing itself. This technique uses two main things, char arrays and the Sleep(); function. This technique would be great to use for slash screens, presentations or just impressing your friends! Also, please take the time to vote for my code. Thanks!!
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
Create a form with a Label component and a Timer component.
Create an event handler for the timer(double click the timer) and place the following code in the event handler. When the program is run, the text will appear to be typing...a little trick using char arrays and the Sleep(); function.
The code looks VERY cluttered and so I have included a downloadable version of the following code that is a .txt file that is easier to read.
************************************************************************************************
Sleep(300);
char fifth[30][11] = {"T", "y", "p", "i", "n", "g", " ", "T", "e", "x", "t"};
if (Label1->Caption != "Typing Text")
{
Label1->Caption = Label1->Caption + fifth[i];
i = i + 1;
}
else
{
Label1->Caption = "Typing Text";
Timer1->Enabled = false;
}
************************************************************************************************
Original Comments (3)
Recovered from Wayback Machine