C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Simple Note Pad Like Application


Posted Date: 28 Sep 2008    Resource Type: Code Snippets    Category: VB.NET Syntax

Posted By: Initiotech       Member Level: Gold
Rating:     Points: 7



This is a Simple Note pad like application which allows one to open a textfile on a richtextbox. and save the richtextbox content to a textfile.

Open File Code

Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
OpenFileDialog1.Title = "Open Text File"
Try
If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
RichTextBox1.LoadFile(OpenFileDialog1.FileName, RichTextBoxStreamType.RichText)
End If
Catch ex As Exception
RichTextBox1.LoadFile(OpenFileDialog1.FileName, RichTextBoxStreamType.PlainText)
End Try
End Sub

Save File Code

Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
RichTextBox1.SaveFile(SaveFileDialog1.FileName)
End If
End Sub


Regards Hefin Dsouza

Attachments

  • Download (21515-28446-NotepadSample.rar)



  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Vb.net  .  Notepad  .  Application  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: Using Simple Maths Expressions Like X+100+20
    Previous Resource: FormatDateTime function in VB.NET
    Return to Discussion Resource Index
    Post New Resource
    Category: VB.NET Syntax


    Post resources and earn money!
     
    Related Resources



    dotNet Slackers   BizTalk Adaptors    Web Design

    web conferencing services

    Contact Us    Privacy Policy    Terms Of Use