Click here to Skip to main content
15,881,172 members
Home / Discussions / C#
   

C#

 
GeneralRe: Why is my bitmap file smaller than it should be ? Pin
Christian Graus14-Jul-09 15:17
protectorChristian Graus14-Jul-09 15:17 
Questionusing statements and IDisposable Pin
saxisa14-Jul-09 11:38
saxisa14-Jul-09 11:38 
AnswerRe: using statements and IDisposable Pin
Christian Graus14-Jul-09 11:59
protectorChristian Graus14-Jul-09 11:59 
AnswerRe: using statements and IDisposable Pin
PIEBALDconsult14-Jul-09 17:09
mvePIEBALDconsult14-Jul-09 17:09 
Questionwork with webBrowser properties? Pin
mr.mohsen14-Jul-09 10:16
mr.mohsen14-Jul-09 10:16 
AnswerRe: work with webBrowser properties? Pin
Adam R Harris14-Jul-09 10:26
Adam R Harris14-Jul-09 10:26 
GeneralRe: work with webBrowser properties? Pin
mr.mohsen14-Jul-09 10:39
mr.mohsen14-Jul-09 10:39 
GeneralRe: work with webBrowser properties? Pin
Adam R Harris14-Jul-09 10:51
Adam R Harris14-Jul-09 10:51 
This is very strange because i just created a new project and am not experiencing your issue.

here is the sample code from my windows forms test.

public class Form1 : Form<br />
    {<br />
<br />
/// <summary><br />
        /// Required designer variable.<br />
        /// </summary><br />
        private System.ComponentModel.IContainer components = null;<br />
<br />
        /// <summary><br />
        /// Clean up any resources being used.<br />
        /// </summary><br />
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param><br />
        protected override void Dispose(bool disposing)<br />
        {<br />
            if (disposing && (components != null))<br />
            {<br />
                components.Dispose();<br />
            }<br />
            base.Dispose(disposing);<br />
        }<br />
<br />
        #region Windows Form Designer generated code<br />
<br />
        /// <summary><br />
        /// Required method for Designer support - do not modify<br />
        /// the contents of this method with the code editor.<br />
        /// </summary><br />
        private void InitializeComponent()<br />
        {<br />
            this.webBrowser1 = new System.Windows.Forms.WebBrowser();<br />
            this.button1 = new System.Windows.Forms.Button();<br />
            this.textBox1 = new System.Windows.Forms.TextBox();<br />
            this.button2 = new System.Windows.Forms.Button();<br />
            this.SuspendLayout();<br />
            // <br />
            // webBrowser1<br />
            // <br />
            this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Bottom;<br />
            this.webBrowser1.Location = new System.Drawing.Point(0, 127);<br />
            this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);<br />
            this.webBrowser1.Name = "webBrowser1";<br />
            this.webBrowser1.Size = new System.Drawing.Size(461, 257);<br />
            this.webBrowser1.TabIndex = 0;<br />
            // <br />
            // button1<br />
            // <br />
            this.button1.Dock = System.Windows.Forms.DockStyle.Top;<br />
            this.button1.Location = new System.Drawing.Point(0, 0);<br />
            this.button1.Name = "button1";<br />
            this.button1.Size = new System.Drawing.Size(461, 23);<br />
            this.button1.TabIndex = 1;<br />
            this.button1.Text = "button1";<br />
            this.button1.UseVisualStyleBackColor = true;<br />
            this.button1.Click += new System.EventHandler(this.button1_Click);<br />
            // <br />
            // textBox1<br />
            // <br />
            this.textBox1.Location = new System.Drawing.Point(22, 30);<br />
            this.textBox1.Name = "textBox1";<br />
            this.textBox1.Size = new System.Drawing.Size(377, 20);<br />
            this.textBox1.TabIndex = 2;<br />
            // <br />
            // button2<br />
            // <br />
            this.button2.Location = new System.Drawing.Point(0, 56);<br />
            this.button2.Name = "button2";<br />
            this.button2.Size = new System.Drawing.Size(461, 23);<br />
            this.button2.TabIndex = 3;<br />
            this.button2.Text = "button2";<br />
            this.button2.UseVisualStyleBackColor = true;<br />
            this.button2.Click += new System.EventHandler(this.button2_Click);<br />
            // <br />
            // Form1<br />
            // <br />
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);<br />
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;<br />
            this.ClientSize = new System.Drawing.Size(461, 384);<br />
            this.Controls.Add(this.button2);<br />
            this.Controls.Add(this.textBox1);<br />
            this.Controls.Add(this.button1);<br />
            this.Controls.Add(this.webBrowser1);<br />
            this.Name = "Form1";<br />
            this.Text = "Form1";<br />
            this.Load += new System.EventHandler(this.Form1_Load);<br />
            this.ResumeLayout(false);<br />
            this.PerformLayout();<br />
<br />
        }<br />
<br />
        #endregion<br />
<br />
        private System.Windows.Forms.WebBrowser webBrowser1;<br />
        private System.Windows.Forms.Button button1;<br />
        private System.Windows.Forms.TextBox textBox1;<br />
        private System.Windows.Forms.Button button2;<br />
<br />
<br />
        public Form1()<br />
        {<br />
            InitializeComponent();<br />
        }<br />
<br />
        private void Form1_Load(object sender, EventArgs e)<br />
        {<br />
            this.webBrowser1.Navigate("about:blank");<br />
        }<br />
<br />
        private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            this.webBrowser1.Document.Body.InnerHtml += "<br />Clicked!";<br />
        }<br />
<br />
        private void button2_Click(object sender, EventArgs e)<br />
        {<br />
            this.webBrowser1.Document.Body.InnerHtml += "<br />" + this.textBox1.Text;<br />
        }<br />
    }


All i did was add the WebBrowser control the form, i then added 2 buttons and a textbox.
when the user clicks the button "Clicked!" is appended to the text when they click the other button the text in the text box is inserted.

If you want to test it just add a new class your existing project and paste all the sample code in there then set it as your startup object.
GeneralRe: work with webBrowser properties? Pin
mr.mohsen14-Jul-09 20:19
mr.mohsen14-Jul-09 20:19 
GeneralRe: work with webBrowser properties? Pin
Adam R Harris14-Jul-09 20:28
Adam R Harris14-Jul-09 20:28 
QuestionRegEx not finding matches ... but it should Pin
Adam R Harris14-Jul-09 9:46
Adam R Harris14-Jul-09 9:46 
AnswerRe: RegEx not finding matches ... but it should Pin
dan!sh 14-Jul-09 19:53
professional dan!sh 14-Jul-09 19:53 
GeneralRe: RegEx not finding matches ... but it should Pin
Adam R Harris14-Jul-09 19:59
Adam R Harris14-Jul-09 19:59 
GeneralRe: RegEx not finding matches ... but it should Pin
dan!sh 14-Jul-09 22:30
professional dan!sh 14-Jul-09 22:30 
GeneralRe: RegEx not finding matches ... but it should Pin
Adam R Harris15-Jul-09 7:36
Adam R Harris15-Jul-09 7:36 
GeneralRe: RegEx not finding matches ... but it should Pin
dan!sh 15-Jul-09 8:25
professional dan!sh 15-Jul-09 8:25 
GeneralRe: RegEx not finding matches ... but it should Pin
Gideon Engelberth16-Jul-09 4:25
Gideon Engelberth16-Jul-09 4:25 
AnswerRe: RegEx not finding matches ... but it should Pin
riced14-Jul-09 21:15
riced14-Jul-09 21:15 
GeneralRe: RegEx not finding matches ... but it should Pin
Adam R Harris14-Jul-09 21:54
Adam R Harris14-Jul-09 21:54 
GeneralRe: RegEx not finding matches ... but it should Pin
riced14-Jul-09 22:10
riced14-Jul-09 22:10 
GeneralRe: RegEx not finding matches ... but it should Pin
Adam R Harris15-Jul-09 7:24
Adam R Harris15-Jul-09 7:24 
Questioni need an editor control for windows application(C#), do u have? or any idea... Pin
mr.mohsen14-Jul-09 9:31
mr.mohsen14-Jul-09 9:31 
AnswerRe: i need an editor control for windows application(C#), do u have? or any idea... Pin
Rajdeep.NET14-Jul-09 9:39
Rajdeep.NET14-Jul-09 9:39 
AnswerRe: i need an editor control for windows application(C#), do u have? or any idea... Pin
Adam R Harris14-Jul-09 9:53
Adam R Harris14-Jul-09 9:53 
GeneralRe: i need an editor control for windows application(C#), do u have? or any idea... Pin
mr.mohsen14-Jul-09 10:02
mr.mohsen14-Jul-09 10:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.