Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: OuTLawZGoSu on April 21, 2004, 10:10 PM

Title: Whats the copy/paste code.
Post by: OuTLawZGoSu on April 21, 2004, 10:10 PM
Same as Subject.
Title: Re:Whats the copy/paste code.
Post by: Grok on April 21, 2004, 10:43 PM
Quote from: OuTLawZGoSu on April 21, 2004, 10:10 PM
Same as Subject.

For what?

Private Sub cmdPaste_Click()
   Text1.Text = Clipboard.GetText(vbCFText)
End Sub

Private Sub cmdCopy_Click()
   Clipboard.SetText Text1.Text, vbCFText
End Sub
Title: Re:Whats the copy/paste code.
Post by: FuzZ on April 22, 2004, 01:39 AM
nifty, i was gonna use the copy code for somethin but i forget now lol
Title: Re:Whats the copy/paste code.
Post by: OuTLawZGoSu on April 22, 2004, 05:15 PM
Quote from: Grok on April 21, 2004, 10:43 PM

For what?

Private Sub cmdPaste_Click()
   Text1.Text = Clipboard.GetText(vbCFText)
End Sub

Private Sub cmdCopy_Click()
   Clipboard.SetText Text1.Text, vbCFText
End Sub


Hmmm, Can't get it to work. I need to make it so when I click on a listbox, it will copy the selected text.

I got this:


Private Sub List1_Click()
Text1.Text = (List1)
Clipboard.SetText Text1.Text, vbCFText
End Sub


Doesn't seem to copy. At All.
Title: Re:Whats the copy/paste code.
Post by: OuTLawZGoSu on April 22, 2004, 08:44 PM
Looks like I left out a lot of info.

I got a text box, and a listbox. Since " Clipboard.SetText (List1), vbCFText " didnt work,  I tryed to send the text from the listbox to text1. Then copy everything form text1.

@ Gork: I'm not a programmer? Who made OuTLawZ BoT again?
Oh ok then.
Title: Re:Whats the copy/paste code.
Post by: Eli_1 on April 22, 2004, 09:38 PM
Hint: List1.ListIndex will display the currently selected index.  :o

Hint2: -1 <= List1.ListIndex <= List1.Listcount
Title: Re:Whats the copy/paste code.
Post by: Grok on April 22, 2004, 10:29 PM
Quote from: OuTLawZGoSu on April 22, 2004, 08:44 PM
Looks like I left out a lot of info.

I got a text box, and a listbox. Since " Clipboard.SetText (List1), vbCFText " didnt work,  I tryed to send the text from the listbox to text1. Then copy everything form text1.

@ Gork: I'm not a programmer? Who made OuTLawZ BoT again?
Oh ok then.

If you're a programmer, program.  I showed you how the Clipboard object works, in both directions.  When setting, it takes a parameter of the text to copy.  When retrieving, you set your own string variable to receive it.  There's nothing harder to it than that.
Title: Re:Whats the copy/paste code.
Post by: Eli_1 on April 23, 2004, 01:27 PM
The second hint I gave you was to be read like math.
1 < x < 4 -- Read: x is greater than one and less than 4.

[Edit]
Quote from: Eli_1 on April 22, 2004, 09:38 PM
Hint: List1.ListIndex will display the currently selected index.  :o

Hint2: -1 <= List1.ListIndex <= List1.Listcount
List1.List(n), will display the text at index n. If you can't figure it out now, there is no hope
Title: Re:Whats the copy/paste code.
Post by: Fr0z3N on April 23, 2004, 02:24 PM
List1.List(List1.ListIndex)
Title: Re:Whats the copy/paste code.
Post by: Dyndrilliac on April 23, 2004, 02:52 PM
Quote from: OuTLawZGoSu on April 22, 2004, 11:06 PM
wow, thx for all your help.

Madz Botz forums it is.

I detest flaming, but you sir, are a dumbass.

Private Sub Command1_Click()
Clipboard.SetText Me.List.ListItems(Me.List.ListItems.Count), vbCFText
End Sub

Private Sub Command2_Click()
Me.Text.Text = Clipboard.GetText(vbCFText)
End Sub

Private Sub Form_Load()
Me.List.ListItems.Add , , "Text"
End Sub


That took 3 minutes tops.

It has been handed to you several times on a silver platter throughout the thread. By the way, I used a Listview, instead of Listboxes(They are in my opinion bad practice), but it should convert fine,
Title: Re:Whats the copy/paste code.
Post by: GoSuGaMING on April 28, 2004, 02:11 PM
Quote from: OuTLawZGoSu
Quote
@ Gork: I'm not a programmer? Who made OuTLawZ BoT again?
Oh ok then.
Quote

u didnt make outlawz bot remember your friend made it and "told" you that u could edit it... notice how you use hives 0x50 login? did u make that? dont think so... i have all ur source codes i added client icons, lag bars, everything you havnt done hardly shit 2 it
Title: Re:Whats the copy/paste code.
Post by: CodeMaster on May 01, 2004, 02:27 PM
Quote from: OuTLawZGoSu on April 22, 2004, 08:44 PM
Looks like I left out a lot of info.

I got a text box, and a listbox. Since " Clipboard.SetText (List1), vbCFText " didnt work,  I tryed to send the text from the listbox to text1. Then copy everything form text1.

@ Gork: I'm not a programmer? Who made OuTLawZ BoT again?
Oh ok then.

Also notice he referred to Grok as "Gork"
Title: Re:Whats the copy/paste code.
Post by: Grok on May 01, 2004, 03:27 PM
Maybe 3 or 4 more people should point out his typo.  I don't think the point was driven home.
Title: Re:Whats the copy/paste code.
Post by: iago on May 01, 2004, 04:13 PM
Holy crap, he said Gork! ahaha!
Title: Re:Whats the copy/paste code.
Post by: OuTLawZGoSu on May 02, 2004, 01:43 PM
Quote from: iago on May 01, 2004, 04:13 PM
Holy crap, he said Gork! ahaha!


Haha, you people find the most stupidest shit and make fun of it.
Who cares if it's grok or gork.

Title: Re:Whats the copy/paste code.
Post by: FuzZ on May 02, 2004, 02:12 PM
Quote from: OuTLawZGoSu on May 02, 2004, 01:43 PM
Quote from: iago on May 01, 2004, 04:13 PM
Holy crap, he said Gork! ahaha!


Haha, you people find the most stupidest shit and make fun of it.
Who cares if it's grok or gork.


uh, Grok perhaps?

I also don't think calling someone a drok instead of a dork would work very well.
Title: Re:Whats the copy/paste code.
Post by: OuTLawZGoSu on May 02, 2004, 02:29 PM
Quote
uh, Grok perhaps?

I also don't think calling someone a drok instead of a dork would work very well.

Dont be a smartass.
Title: Re:Whats the copy/paste code.
Post by: hismajesty on May 02, 2004, 02:38 PM
Quote from: OuTLawZGoSu on May 02, 2004, 01:43 PM
Quote from: iago on May 01, 2004, 04:13 PM
Holy crap, he said Gork! ahaha!


Haha, you people find the most stupidest shit and make fun of it.
Who cares if it's grok or gork.

Obviously not you, OulTaWSGsoU
Title: Re:Whats the copy/paste code.
Post by: OuTLawZGoSu on May 02, 2004, 02:46 PM
Ok then, case closed?
Title: Re:Whats the copy/paste code.
Post by: SPY-3 on August 27, 2004, 08:32 AM
donno if this is solved yet but under the listbox click add this
clipboard.settext list1.text

then if u were loading it
list1.AddItem clipboard.gettext