Click here to Skip to main content
16,004,944 members
Home / Discussions / C#
   

C#

 
QuestionRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani26-May-06 20:34
Nafiseh Salmani26-May-06 20:34 
AnswerRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Farrukh_526-May-06 20:55
Farrukh_526-May-06 20:55 
QuestionRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani26-May-06 21:17
Nafiseh Salmani26-May-06 21:17 
AnswerRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
emran83426-May-06 21:52
emran83426-May-06 21:52 
GeneralRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani26-May-06 22:08
Nafiseh Salmani26-May-06 22:08 
GeneralRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Farrukh_527-May-06 0:21
Farrukh_527-May-06 0:21 
GeneralRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani27-May-06 0:26
Nafiseh Salmani27-May-06 0:26 
AnswerRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
ahmad2x427-May-06 1:44
ahmad2x427-May-06 1:44 
Hi
I please follow thease steps, I think it'll help you to solve the problem

first of all create a Windows application
drop a WebBrowser on form1 (leave the name webBrowser1)
change the Url property to about:blank
drop a button
double click on the button1 and paste this code for event handler
<code>
        private void button1_Click(object sender, EventArgs e)
        {
            System.IO.MemoryStream st = new System.IO.MemoryStream ();
            string sampleHtml = "<html><body>Hello world! </body></html>";
            UTF8Encoding uniEncoding = new UTF8Encoding();

            // Create the data to write to the stream.
            byte[] firstString = uniEncoding.GetBytes(
                sampleHtml);

            webBrowser1.DocumentStream = st;
            st.Write(firstString, 0, firstString.Length);
            st.Flush();
            st.Position = 0;
            webBrowser1.DocumentStream = st;
        }

</code>


Ahmadreza Atighechi
AnswerRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
ahmad2x427-May-06 1:54
ahmad2x427-May-06 1:54 
GeneralRe: How I can open HTML page with html source code in Winapplication,without Create a file? [modified] Pin
ahmad2x427-May-06 2:30
ahmad2x427-May-06 2:30 
QuestionRe: How I can open HTML page with html source code in Winapplication,without Create a file? [modified] Pin
Nafiseh Salmani29-May-06 23:06
Nafiseh Salmani29-May-06 23:06 
AnswerRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani29-May-06 21:19
Nafiseh Salmani29-May-06 21:19 
QuestionRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani29-May-06 23:04
Nafiseh Salmani29-May-06 23:04 
Questionif else for forms displayed [modified] Pin
IMC200626-May-06 19:07
IMC200626-May-06 19:07 
AnswerRe: if else for forms displayed [modified] Pin
Stefan Troschuetz26-May-06 23:06
Stefan Troschuetz26-May-06 23:06 
GeneralRe: if else for forms displayed [modified] Pin
IMC200627-May-06 6:28
IMC200627-May-06 6:28 
AnswerRe: if else for forms displayed [modified] Pin
Colin Angus Mackay26-May-06 23:08
Colin Angus Mackay26-May-06 23:08 
AnswerRe: if else for forms displayed [modified] Pin
stancrm28-May-06 21:26
stancrm28-May-06 21:26 
Questionupdate Pin
kjosh26-May-06 16:30
kjosh26-May-06 16:30 
AnswerRe: update Pin
maryamf26-May-06 21:03
maryamf26-May-06 21:03 
GeneralRe: update Pin
kjosh26-May-06 22:17
kjosh26-May-06 22:17 
QuestionImage manipulation and transformation Pin
Talal Sultan26-May-06 12:22
Talal Sultan26-May-06 12:22 
AnswerRe: Image manipulation and transformation Pin
Christian Graus26-May-06 12:37
protectorChristian Graus26-May-06 12:37 
GeneralRe: Image manipulation and transformation Pin
Talal Sultan26-May-06 12:55
Talal Sultan26-May-06 12:55 
QuestionResize image (Icon or Bitmap) [modified] Pin
Dima Filipiuk26-May-06 12:16
Dima Filipiuk26-May-06 12:16 

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.