Hack Forums
[.NET] HTML Viewer [Source] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] HTML Viewer [Source] (/showthread.php?tid=4993394)



HTML Viewer [Source] - Uploader.sx - Sep 19, 2015

Simple Tutorial Today.

I am going to show you how you make a HTML viewer application with save button to save what you typed.


  1. Add a rich textbox

  2. Add a Webviewer

  3. add 2 buttons



Step 1:
Click on your textbox then double click on TextChanged

Spoiler (Click to View)

and add this code


Code
WebBrowser1.DocumentText = RichTextBox1.Text

Step 2:
Double click on your save button and add this code


Code
Dim Save As New SaveFileDialog()
      Dim myStreamWriter As System.IO.StreamWriter
      Save.Filter = "Text [*.txt*]|*.txt|All Files [*.*]|*.*"
      Save.CheckPathExists = True
      Save.Title = "Save File"
      Save.ShowDialog(Me)
      Try
      myStreamWriter = System.IO.File.AppendText(Save.FileName)
      myStreamWriter.Write(RichTextBox1.Text)
      myStreamWriter.Flush()
      Catch ex As Exception
      End Try

      MsgBox("File Saved!")

Step 3:
Double click on your exit button and add this code


Code
End

Enjoy !

Source Download1 : http://rghost.net/84vYJgSYM
Source Download2 : https://mega.nz/#!7RBG3L4a!7kslxKPiWXSKnklG2eBq4-83_OyKd-txvlBGWnTrhl8

Best Regards,
RealMafia


Edit: Other tutorial https://hackforums.net/showthread.php?tid=4988870


* - Frankey - Sep 19, 2015

Nice tutorial! But the source download doesn't work here? It gives me a HTML parse error.


* - Uploader.sx - Sep 19, 2015

(Sep 19, 2015 01:58 PM)Frankey Wrote:  Nice tutorial! But the source download doesn't work here? It gives me a HTML parse error.
Thanks ! added another download link


* - geraldososa - Sep 19, 2015

Interesting. but this tool was released 100 times already.


* - Hawk HF - Sep 19, 2015

A nearly identical thread was posted last month. Your version has just added a SaveFileDialog.

(Aug 11, 2015 02:38 PM)nathan72389 Wrote:  [Image: jws23wa.png]



* - Uploader.sx - Sep 19, 2015

(Sep 19, 2015 02:16 PM)Hawk HF Wrote:  A nearly identical thread was posted last month. Your version has just added a SaveFileDialog.
Yeah I saw this, then I was trying it myself and thought about adding a Save button, anw Thanks for posting !