Autor Beitrag
Ccenter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 154

Win7
C#
BeitragVerfasst: Di 22.12.09 14:58 
Hi,
hab gerade ein nerviges Problem. Also zuerst zum Programm: Auf meiner Form ist eine große Textbox und ein Webbrowsercontrol. Nun wird der Text von der Textbox in dem Webbrowser als fertige Html angezeigt. So ist es möglich während des schreibens von Html in der Textbox schon gleich den fertige Html-Code zu sehen.


Naja, allerdings ist es so, dass jedesmal wenn ich einen Buchstaben in die textbox schreibe, ein klicken kommt. Ich vermute das es von dem Webbrowser stammt aber ich weiß nicht wie ich es ausschalten kann!

Code:
ausblenden volle Höhe C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
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;
using System.IO;

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

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            this.webBrowser1.DocumentText = textBox1.Text;
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

    }
}
danielf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1012
Erhaltene Danke: 24

Windows XP
C#, Visual Studio
BeitragVerfasst: Di 22.12.09 15:00 
Hallo,

was meinst du mit "ein klicken kommt"? Ton?

Gruß Daniel
Ccenter Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 154

Win7
C#
BeitragVerfasst: Di 22.12.09 15:09 
Richtig. Genau wie wenn man im Internetexplorer eine Internetseite öffnet.
Ich hab mal probiert den Inhalt für den Webbrowser unterschiedlich abzurufen (direkt per Befehl, über Streamwriter + Streamreader etc) aber es scheint so, als ob der Browser jedesmal ein Geräusch macht wenn er einen neuen Inhalt erhält.