Autor Beitrag
FURIOS
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 42

Windoof 7
~~~>* C# *<~~~
BeitragVerfasst: Di 08.03.11 13:12 
Hallo, alle miteinander ;)

Ich habe einen Spamtext programmiert:

Zitat:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HT
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
timer1.Start();
}

private void button2_Click(object sender, EventArgs e)
{
timer1.Stop();
}

private void timer1_Tick(object sender, EventArgs e)
{

SendKeys.Send(textBox1.Text);
SendKeys.Send("{ENTER}");

}

private void trackBar1_Scroll(object sender, EventArgs e)
{




label2.Text = trackBar1.Value + "ms";
timer1.Interval = trackBar1.Value;



}
}
}


und es funktioniert auch alles einwandrei....
nur hätte da eine Frage
Wie kann ich die Farbe z.b vom jeden 2. Satz ändern
Also ich will das z.b so haben
Das der erste Satz: Ich liebe Pizza ( in schwarz ist )
und der nächste kommende Satz: Ich liebe Pizza ( In rot ist )
könnt ihr mir weiterhelfen?

LG -> FURIOS ;)
Einloggen, um Attachments anzusehen!
3marci
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 61
Erhaltene Danke: 5

Windows 7 / Kubuntu 11.04
C# / vb.net / php / progress (VS 2010 Express / SharpDevelop / NetBeans / proAlpha)
BeitragVerfasst: Di 08.03.11 21:57 
Das kommt darauf an in welchem Chat oder Forum das später stehen soll...
Mit BB Codes könnte man das z.B. so lösen:

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
int i = 0;

private void timer1_Tick(object sender, EventArgs e)
{
  if(i == 0)
  {
    SendKeys.Send("<span style="color: black">" + textBox1.Text + "</span>");
    i = 1;
  }
  else if(i == 1)
  {
    SendKeys.Send("<span style="color: red">" + textBox1.Text + "</span>");
    i = 2;
  }
  else if(i == 2)
  {
    SendKeys.Send("<span style="color: yellow">" + textBox1.Text + "</span>");
    i = 0;
  }

  SendKeys.Send("{ENTER}");
}


Aber das würde nur in einem Forum funktionieren.

Für diesen Beitrag haben gedankt: FURIOS
FURIOS Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 42

Windoof 7
~~~>* C# *<~~~
BeitragVerfasst: Di 15.03.11 09:30 
user profile icon3marci hat folgendes geschrieben Zum zitierten Posting springen:
Das kommt darauf an in welchem Chat oder Forum das später stehen soll...
Mit BB Codes könnte man das z.B. so lösen:

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
int i = 0;

private void timer1_Tick(object sender, EventArgs e)
{
  if(i == 0)
  {
    SendKeys.Send("<span style="color: black">" + textBox1.Text + "</span>");
    i = 1;
  }
  else if(i == 1)
  {
    SendKeys.Send("<span style="color: red">" + textBox1.Text + "</span>");
    i = 2;
  }
  else if(i == 2)
  {
    SendKeys.Send("<span style="color: yellow">" + textBox1.Text + "</span>");
    i = 0;
  }

  SendKeys.Send("{ENTER}");
}


Aber das würde nur in einem Forum funktionieren.



Im ICQ ...
Danke für deine Antwort...