VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB Expert!

Join 300,302 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,110 people online right now. Registration is fast and FREE... Join Now!




RichTextbox Problem

 

RichTextbox Problem, After I find...

k.johnny

27 Feb, 2009 - 03:50 AM
Post #1

New D.I.C Head
*

Joined: 27 Feb, 2009
Posts: 1

After finding a certain text in a RichTextBox, I want to move the found text (line of text) to the topmost of the RichTextBox. How can I do? Help me please.

My codes like this:

CODE

Private Sub List1_Click()
    Dim flag, position
    rText.SelStart = 0
    rText.SelLength = 0
    flag = rtfWholeWord
    position = rText.Find(list1.Text, , , flag)
        If position = -1 Then
        'for now do nothing
        Else
        'for now do nothing
        End If
End sub

K.Johnny

This post has been edited by k.johnny: 27 Feb, 2009 - 02:08 PM

User is offlineProfile CardPM
+Quote Post


PsychoCoder

RE: RichTextbox Problem

27 Feb, 2009 - 02:01 PM
Post #2

Dyslexics Untie!
Group Icon

Joined: 26 Jul, 2007
Posts: 14,700



Thanked: 501 times
Dream Kudos: 11450
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
User is offlineProfile CardPM
+Quote Post

thava

RE: RichTextbox Problem

27 Feb, 2009 - 09:59 PM
Post #3

D.I.C Addict
Group Icon

Joined: 17 Apr, 2007
Posts: 894



Thanked: 51 times
Dream Kudos: 75
My Contributions
hi johnny go to vb.net and how to select a whole line in rich textbox is there this sniet is from one of the coders who inspired me more, yeahh it's psycho

here is the link for

http://www.dreamincode.net/code/snippet2644.htm

when you found it and just use this thing
User is offlineProfile CardPM
+Quote Post

chetan_hemant

RE: RichTextbox Problem

27 Feb, 2009 - 11:50 PM
Post #4

New D.I.C Head
*

Joined: 27 Feb, 2009
Posts: 1

QUOTE(k.johnny @ 27 Feb, 2009 - 03:50 AM) *

After finding a certain text in a RichTextBox, I want to move the found text (line of text) to the topmost of the RichTextBox. How can I do? Help me please.

My codes like this:

CODE

Private Sub List1_Click()
    Dim flag, position
    rText.SelStart = 0
    rText.SelLength = 0
    flag = rtfWholeWord
    position = rText.Find(list1.Text, , , flag)
        If position = -1 Then
        'for now do nothing
        Else
        'for now do nothing
        End If
End sub

K.Johnny




Attached File(s)
Attached File  note.txt ( 99bytes ) Number of downloads: 8
Attached File  note.txt ( 99bytes ) Number of downloads: 7
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 01:13PM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month