|
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.
|
|
|
|
|
I am having tha same problem working in C#.
I can use 2 of my personal email accounts to send mail but when I try to send email with a company email account I get the the same "The remote certificate is invalid according to the validation procedure.". floowed the link that N a v a n e e t h suggested and I spent the time figuring out how to get the JIT debug log. Maybe the answer is there but I don't recoginze it.
Any words of wisdom would be appreciated!
|
|
|
|
|
Looking at the log file this is where things seem to take a turn for the worse. But I don't understand enough to figure out why?
[Public Key]
Algorithm: RSA
Length: 1024
Key Blob: 30 81 89 02 81 81 00 cb 8a cb fc 94 b8 bd 63 6d 30 b4 45 3f be b8 cc 83 9e 32 3c df eb f3 ba f9 79 4d 7f a5 04 57 cf 36 74 26 f7 3a cb 6d 39 d8 87 e2 70 73 a8 e0 d2 4f e5 8c 27 b3 47 6d a7 ad 7e e2 d5 e6 22 7f 85 d3 4e 2b 66 20 8....
System.Net Information: 0 : [1972] SecureChannel#2389992 - Remote certificate has errors:
System.Net Information: 0 : [1972] SecureChannel#2389992 - Certificate name mismatch.
System.Net Information: 0 : [1972] SecureChannel#2389992 - A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
System.Net Information: 0 : [1972] SecureChannel#2389992 - A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
The other thing I have figured out is that in Outlook account settings - More Settings - Outging server we need to check the My outgoing server (SMTP) requires authenticatin and "Use same settings as my incomming mail server"
This would make me think my program should be able to get the authentication info need from the incoming mail server but how??
Once again - any words of wisdom would be apreciated.
|
|
|
|
|
Hello,
I am programming in vb.net (VS2005).
I am trying to sort date column in datagridview but with no success.
When I am clicking on header of the column to sort, I got sorting only by day:
for example:
01/05/2009
02/03/2009
03/08/2008
...
instead of getting:
03/08/2008
02/03/2009
01/05/2009
I tried to parse the column to DateTime but it dosn't help.
I tried in Cell_Parsing event also to Parse but the evnet didn't fire at all.
Can you please give any idea how to do it.
Thank you for help
Shay Noy
|
|
|
|
|
Try setting the DataGridViewColumn.DefaultCellStyle.Format as "d".
Is the datagridview bound?
It's not necessary to be so stupid, either, but people manage it. - Christian Graus
|
|
|
|
|
It doesn't help too.
The datagridview is Unbound.
I had added the columns in design mode through the "Edit Columns" feature of the datagridview.
The sortMode is set to Automatic and as you said the DataGridViewColumn.DefaultCellStyle.Format is set to d.
Thank you
Shay Noy
|
|
|
|
|
You will need to handle the SortCompare event for the datagridview and sort the data there.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Thank you, I will try this.
Shay Noy
|
|
|
|