|
that_dude_tj wrote: txtbox.Text("TCP/IPv4 Statistics:")
Does this work ? What does it do ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
not sure why he wrote that. it does not work. text has an overload but it only extracts the character position at the given number textbox1.text(3)
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
OK, that's interesting. It's a property AND a method ? I didn't know that. Either way, his response looked to me like a further question, but no question was present, so I was trying to guess the problem
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I just tried it. It probably is 2 properties that are overloaded 'a' = text for the example
Public ReadOnly Property a(ByVal idx As Int16) As String
Get
'extracts character at position
End Get
End Property
Public Property a() As String
Get
End Get
Set(ByVal value As String)
End Set
End Property
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I'm not certain, but I think it's just a property. It returns String, and the String object has a built in indexer. Just like you could have a List(Of List(Of Integer)), and use lst(0)(1) and get an Integer back
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
No not working yet it suppose to display Internet Protocol version 4 (TCP/IPv4) statistical data for the local computer to my textbox name txtbox. i used this in the ping and it worked fine
Dim ping As Ping = New Ping()
Dim pingreply As PingReply = ping.Send(txtHost.Text)
txtPing.Text &= "Address: " & pingreply.Address.ToString() & Constants.vbCr
txtPing.Text &= "Roundtrip Time: " & pingreply.RoundtripTime & Constants.vbCr
txtPing.Text &= "TTL (Time to Live): " & pingreply.Options.Ttl & Constants.vbCr
txtPing.Text &= "Buffer Size: " & pingreply.Buffer.Length.ToString() & Constants.vbCr
|
|
|
|
|
So what's this?? You didn't ask a question and I'm not inclined to just start throwing test apps together to guess what you want out of this...
|
|
|
|
|
lol my question is then i would be. that im unable to display the tcp statistics in my text box
|
|
|
|
|
I responded four hours ago to try to keep helping you, but you didn't even reply ?
You need to read a pretty basic VB.NET book. You seem to be making code up instead of knowing what you're doing. The best way to do what you want, is use a StringBuilder to build the message, as it's multiline from what I can tell, and then set that text to the Text property.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks ill get to reading
|
|
|
|
|
Your textbox lines are a bit funny. You seem to think there is a .Text method on it, but .Text is actually a property. Since you keep replacing the .Text property with a new line of text, the last line you supply is blank, so nothing will show up in the textbox.
Serisouly, pickup a beginners book on VB.NET. You're missing some really basic concepts that we really can't describe to you in forum posts.
|
|
|
|
|
Hi,
How to enum each charcter of string.
I am trying but getting error:
For i = 0 To Len(s) - 1
c = c Xor s[i] 'error here
Next i
|
|
|
|
|
What is the error.
If you want people to help you, you must help them!
A lot of CP members would be able to guess the error correctly, but most can't.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You can use for each to more succinctly move through a string. VB does not use [] or <>, it's designed for non programmers and always uses ().
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
( )
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
you cannot use "for each" to go through the content of a string. if it was a string array then yes but not a single string.
"designed for non programmers"
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Really ? I didn't realise VB sucked like that. In C#, we can use foreach to iterate through the chars of a string.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
It doesn't actually suck that much, with VB you can iterate through the characters in a string no problem. I think Larson was just being nit picky. I.e. you would have to convert the string to an array of characters (SomeString.ToCharArray() ) before you can iterate through it.
My advice is free, and you may get what you paid for.
|
|
|
|
|
You can't go through a string like that. You need to "extract" each character by using either substring or mid.
For i = 0 to s.length -1
c = c Xor s.substring(i,1)
Next
try that?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
<br />
Dim s As String = "this is a string"<br />
Dim n As Integer = 0<br />
Dim c As Char<br />
<br />
For Each c In s<br />
<br />
n = n Xor Microsoft.VisualBasic.Val(c)<br />
<br />
Next<br />
VB is as nasty as I remember it, but it can indeed step through the characters of a string.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
ok... i stand corrected. i forgot about the "char".
just curious...if you can't stand vb...why answer questions in the vb forum?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
nlarson11 wrote: just curious...if you can't stand vb...why answer questions in the vb forum?
Because it's all .NET at the end of the day. When it was C++ and VB6, I'd never consider it, b/c I had no idea. Nowadays, I can answer most questions, even if I struggle to get the syntax right.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
ah. your obviously knowledgable...just seem miserable
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Hi All,
I am writing an Email Program ...But for some reason i am getting this Error
"The remote certificate is invalid according to the validation procedure.,"
Here is my Code
Dim smtpServer As New SmtpClient
Dim mailMessage As New MailMessage
smtpServer.Credentials = New Net.NetworkCredential(txt_FromEmail.Text, txt_password.Text)
smtpServer.Port = txt_Port.Text
smtpServer.Host = txt_SmtpSvr.Text
smtpServer.EnableSsl = True
mailMessage.From = New MailAddress(txt_FromEmail.Text)
mailMessage.To.Add(txt_MailTo.Text)
mailMessage.Subject = txt_Subject.Text
mailMessage.Body = txt_msgBody.Text
smtpServer.Send(mailMessage)
MsgBox("mail Send!!", MsgBoxStyle.Information)
Thnks all ..Will Realy Appreciate any help
|
|
|
|
|
See this[^] MSDN discussion.
|
|
|
|