School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
Welcome to Dream.In.Code
Become an Expert!

Join 340,049 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 4,528 people online right now. Registration is fast and FREE... Join Now!



RichTextbox Problem

RichTextbox Problem After I find... Rate Topic: -----

#1 k.johnny  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: New Members
  • Posts: 1
  • Joined: 27-February 09


Dream Kudos: 0

Posted 27 February 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:

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 February 2009 - 02:08 PM

Was This Post Helpful? 0
  • +
  • -


#2 PsychoCoder  Icon User is offline

  • apt-get install DIC.bin
  • Icon
  • View blog
  • Group: Admins
  • Posts: 16,211
  • Joined: 26-July 07


Dream Kudos: 12400

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

Posted 27 February 2009 - 02:01 PM

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.
Was This Post Helpful? 0
  • +
  • -

#3 thava  Icon User is offline

  • D.I.C Addict
  • Icon
  • Group: Expert
  • Posts: 990
  • Joined: 17-April 07


Dream Kudos: 75

Posted 27 February 2009 - 09:59 PM

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.dreaminco...snippet2644.htm

when you found it and just use this thing
Was This Post Helpful? 0
  • +
  • -

#4 chetan_hemant  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: New Members
  • Posts: 1
  • Joined: 27-February 09


Dream Kudos: 0

Posted 27 February 2009 - 11:50 PM

View Postk.johnny, on 27 Feb, 2009 - 03:50 AM, said:

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:

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: 10

Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Live Help!

Be Social

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

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month