Clipboard

  • Thread starter Thread starter user
  • Start date Start date
U

user

For some reason this is not copying to the clipboard, can someone tell
be why?

Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem2.Click


Clipboard.SetDataObject(Net.Dns.GetHostByName(Net.Dns.GetHostByName("localhost").HostName).AddressList(0),
True)
End Sub
 
Hello (e-mail address removed) :-D

Does a simpler version of it run fine. Like passing a hard-coded string in
it ?
If yes then try saving ur data temporarily in a string and then save it.
Otherwise u might wanna rethink the ClipBoard Saving Code.
Please also make sure that the expression holds some valid value - quick
watch might prove useful here.

Thank you,
rawCoder
 
Hi,

Try this instead.

Dim s As String
s =
Net.Dns.GetHostByName(Net.Dns.GetHostByName("localhost").HostName).AddressList(0).ToString
Clipboard.SetDataObject(s, True)

Ken
-----------------
 
Back
Top