SelectAll/Copy Button

What am I missing?

Page 1 of 1

5 Replies - 5829 Views - Last Post: 13 December 2008 - 11:31 AM Rate Topic: -----

#1 Jaalenn  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 105
  • Joined: 17-November 08

SelectAll/Copy Button

Posted 12 December 2008 - 04:24 PM

I have been looking for a way to Select All / Copy using a Button in VB6 all day with no luck. If anyone knows how to solve this I would be extremely thankful.

I have no code to show because I have no clue how to do this.

Private Sub cmaCopy_Click()

End Sub


Is This A Good Question/Topic? 0
  • +

Replies To: SelectAll/Copy Button

#2 reyben_89  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 69
  • Joined: 30-November 08

Re: SelectAll/Copy Button

Posted 13 December 2008 - 02:20 AM

View PostJaalenn, on 12 Dec, 2008 - 03:24 PM, said:

I have been looking for a way to Select All / Copy using a Button in VB6 all day with no luck. If anyone knows how to solve this I would be extremely thankful.

I have no code to show because I have no clue how to do this.

Private Sub cmaCopy_Click()

End Sub



i shame to replay on this post because you are dic++ and i thoght that all dic++ is a really good enough.
Was This Post Helpful? 0
  • +
  • -

#3 Jaalenn  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 105
  • Joined: 17-November 08

Re: SelectAll/Copy Button

Posted 13 December 2008 - 09:42 AM

I believe that dic++ is a designator for those with some type of membership... As an update, I have found the Copy properties to use with my button, but still no idea on how to select the tect to begin with.

Private Sub cmaCopy_Click()
    Clipboard.Clear
    Clipboard.SetText txtResults.SelText
End Sub


Was This Post Helpful? 0
  • +
  • -

#5 kasbaba  Icon User is offline

  • D.I.C Head

Reputation: 28
  • View blog
  • Posts: 133
  • Joined: 03-November 08

Re: SelectAll/Copy Button

Posted 13 December 2008 - 11:17 AM

View PostJaalenn, on 13 Dec, 2008 - 08:42 AM, said:

As an update, I have found the Copy properties to use with my button, but still no idea on how to select the tect to begin with.


Hi,

If you are using a textbox then to Select All use this code:

Private Sub SelectALL()
	'lets assume that you have a text box named textbox1
	textbox1.selstart = 0
	textbox1.sellength = len(textbox1.text)
	'this is how you can Select the whole text
	
	'to copy the selected text
	Clipboard.settext textbox1.seltext
	'This copies the selected text to Clipboard
End Sub


hope this helps

kasbaba

This post has been edited by kasbaba: 13 December 2008 - 11:18 AM

Was This Post Helpful? 1

#6 Jaalenn  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 105
  • Joined: 17-November 08

Re: SelectAll/Copy Button

Posted 13 December 2008 - 11:19 AM

It did! Thank you very much!!
Was This Post Helpful? 0
  • +
  • -

#7 kasbaba  Icon User is offline

  • D.I.C Head

Reputation: 28
  • View blog
  • Posts: 133
  • Joined: 03-November 08

Re: SelectAll/Copy Button

Posted 13 December 2008 - 11:31 AM

View PostJaalenn, on 13 Dec, 2008 - 10:19 AM, said:

It did! Thank you very much!!


Thank you...Glad that I could help.

kasbaba
Was This Post Helpful? 1

Page 1 of 1