Friends, I hope everyone is well by the grace of God. Today we will discuss a new program. We often see some software auto-typing something on the right or left side. Today we are going to write a program in which some of the text will be auto typed then let's get started.
1. Launch Visual Studio 2008 or 2010.
2. Create a new project and give it a name
3. Now if you want you can change your form properties such as form text, form icon etc.
4. Now let's add the following controls to the form from the tool box on the left side.
- I will take a Label1 and from its properties I will False Auto Size, Redize ForeColor, Black BackColor.
- Let's add a Button1 and change its text to Start Typing.
- Let's add a timer1 and make Interval 100 from its properties.
5. Now sort the tools added to the form like the picture below.
৬। public Form1()
{
InitializeComponent();
} This code is just below
public string str_;
public int count_; I write this code.
. Now double-click Timer1 and type the following code into the Timer1_Tick event of the Timer1 control.
if (Label1.Text.Length == str_.Length)
{
Timer1.Enabled = false;
return;
}
Label1.Text = str_.Substring(0, count_);
count_++;
. Now double click on the button and type the following code in the Button1_Click event
Label1.Text = "";
count_ = 1;
str_ = "Md. Aminul Islam (IT Student).\nIf you have some queries, feel free to contact the number or e-mail below."+
"\nMobile: 01788-7161 or 01856-2546.\nE-mail: tech2timebd@gmail.com.\nfacebook : https://www.facebook.com/Tech2Time/";
Timer1.Enabled = true;
9. Now run the program by pressing F5 key and click on Start Typing button to see the auto typing.
Download the source code .
إرسال تعليق