Visual Basic

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDesktop ProgrammingVisual Basic

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old September 30th, 2010, 08:57 PM
UNF_Steph UNF_Steph is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Sep 2010
Posts: 4 UNF_Steph User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 5 sec
Reputation Power: 0
Coding for Find and Replace Function.

I am working on a project and have come to a hault. I am not sure how to code the stings for the Find and Replace function of a notepad that I have created. How do I code to have the input on a subform be found and replaced on the mainform. I know how to code to have it find one word but how do I code it find whatever the user is looking for?
I have attached a screen shot to show what the IDE looks like.

Screen Shot

Code:
Public Class Editor 
  
    Private Sub ClearButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearButton.Click 
        RichTextBox1.Clear() 
    End Sub 
  
    Private Sub ExitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitButton.Click 
        Me.Close() 
  
    End Sub 
  
    Private Sub ColorGroupBox_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorGroupBox.Enter 
        BlackRadioButton.Checked = True 
    End Sub 
  
    Private Sub FontGroupBox_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontGroupBox.Enter 
        CourierNewRadioButton.Checked = True 
    End Sub 
  
    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click 
        'Terminate the project. 
        Me.Close() 
  
    End Sub 
  
    Private Sub ClearToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearToolStripMenuItem.Click 
        'Clear the textbox. 
        RichTextBox1.Text = "" 
    End Sub 
  
    Private Sub FindandReplaceButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FindandReplaceButton.Click 
        FindandReplaceForm.ShowDialog() 
  
    End Sub 
  
    Private Sub FindAndReplaceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FindAndReplaceToolStripMenuItem.Click 
        FindandReplaceForm.ShowDialog() 
  
    End Sub 
End Class 


Here is the sub form code:

Code:
Public Class FindandReplaceForm 
  
    Private Sub ReplaceButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReplaceButton.Click 
  
    End Sub 
End Class 

Reply With Quote
Reply

Viewing: Tutorialized ForumsDesktop ProgrammingVisual Basic > Coding for Find and Replace Function.


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap