Marquee in c#.net windows Application
Note:
Make Use of timer control and write this below function in Timer control Ticker Events and also Set timer Enabled = true
private void TmrPPT_Tick(object sender, EventArgs e)
{
string strScrollText= " Welcome to .Netbasic";
if (!(intPosition <= strScrollText.Length))
{
intPosition = 0;
}
LblScrollingText.Text = strScrollText.Substring(intPosition);
intPosition = intPosition + 1;
}
2 Comments:
POOR CODING.. NO DEPTH
Thanks Mr.Mohan
int intPosition = 0;
private void timer1_Tick(object sender, EventArgs e)
{
string strScrollText = "^ Welcome to Scrolling Text Process ^";
string strScroll2 = "^ Welcome to Scrolling Text Process ^";
if (!(intPosition <= strScrollText.Length))
{
intPosition = 0;
}
label1.Text = strScrollText.Substring(intPosition) + strScroll2.Substring(0, intPosition);
intPosition = intPosition + 1;
}
Post a Comment
Subscribe to Post Comments [Atom]
<< Home