|
I try port 25 465 and 587 with and with out ssl and it still dod not work
i dont think the size of the file is a problem it is only 1k
|
|
|
|
|
i got it working now
i have inported this
Imports System.Net.Mail
and then i found on google a guy hade it like this
Imports System.Net.Mail
Imports System.Net.Mime
Imports System.ComponentModel
and it worked
Thanks for you help man
|
|
|
|
|
Hello, I'm wandering is it possible to read file bit by bit in visual basic ? I know how to ready byte by byte
If it is, please tell me how, or give me link to the page to read something
Thanks
|
|
|
|
|
|
Thank you very much !! Great link
|
|
|
|
|
Hi all,
I have two queries, which I have solved halfway.
First Query:
I want to find the Username who has logged on to a Computer, the computers IP address and Hostname.
I have written the code to find the Hostname and IP address but not the Username.
I would like all these information on a file, which I have already done except for the Username.
Code sofar:
Private Sub LogOutput_IP(ByVal logFile As String, ByVal msg As String)
Using sw As StreamWriter = New StreamWriter(logFile, True)
Dim theDate As Date = Now()
Dim strHostName As String
Dim strIPAddress As String
strHostName = System.Net.Dns.GetHostName()
strIPAddress = System.Net.Dns.GetHostEntry(strHostName).AddressList(0).ToString()
Dim sb As StringBuilder = New StringBuilder(theDate.ToString)
sb.Append(vbTab & msg)
sb.Append(vbTab & "Host Name: " & strHostName)
sb.Append(vbTab & " IP Address: " & strIPAddress)
sw.WriteLine(sb.ToString)
End Using
End Sub
I call this sub in a button click event and works fine.
Output obtained:
I want help to write the Username who is currently using the Computer.
Second Query:
As of now The LP.txt file is created in a folder in C drive.
I wish to create this file in a server or another PC(say admins computer), how to achieve this?
Any help will be helpful.
Thanks in Advance.
modified on Tuesday, September 15, 2009 7:54 AM
modified 28-Nov-12 8:01am.
|
|
|
|
|
|
Thanks for you reply.
I had a search on the internet and found a solution to get the username of the logged on user.
GetUserName
I would be happy if I get a solution to solve the second query.
|
|
|
|
|
vijay2482 wrote: Second Query:
As of now The Log_IP.txt file is created in a folder in C drive.
I wish to create this file in a server or another PC(say admins computer), how to achieve this?
First you can create the file on your machine and after that you can upload this file to server or another PC. This can be done by using My.Computer.Network.UploadFile Method[^].
Here[^] are some examples and you can find many more using google.
Regards
Nuri Ismail
|
|
|
|
|
Thanks again.
I want this file to be created only once, say the file is created in the server or admins system.
each time a user logs on, the logging needs to be appended on to that file.
I will check the link that you have provided.
|
|
|
|
|
vijay2482 wrote: I want this file to be created only once, say the file is created in the server or admins system.
each time a user logs on, the logging needs to be appended on to that file.
In this case you can use the File.AppendText Method[^]. It will create a StreamWriter object for you. If the file specified by the path parameter does not exist, it will be created. If the file does exist, write operations to the StreamWriter will append text to the existing file. According to MSDN the path parameter of the File.AppendText method can be the path to the file on your server:
'From MSDN
In members that accept a path, the path can refer to a file or just a directory.
The specified path can also refer to a relative path or a Universal Naming Convention (UNC)
path for a server and share name. For example, all the following are acceptable paths:
* "c:\\MyDir\\MyFile.txt" in C#, or "c:\MyDir\MyFile.txt" in Visual Basic.
* "c:\\MyDir" in C#, or "c:\MyDir" in Visual Basic.
* "MyDir\\MySubdir" in C#, or "MyDir\MySubDir" in Visual Basic.
* "\\\\MyServer\\MyShare" in C#, or "\\MyServer\MyShare" in Visual Basic.
The above quote can be found here[^] and it applies to all of the members of File class.
I hope this helps you!
Best wishes,
Nuri Ismail
|
|
|
|
|
Thanks for the link.
I will checkout.
|
|
|
|
|
Hi All,
I'm beginner in visual baics PLS assist me hw to approach
|
|
|
|
|
|
first learn to spell basic.
I would suggest working through a book like Visual Basic .NET in 24 hours or equivent dummy's guide book.
This should give you a foundation to start with.
Then pick yourself a simple project to hone your newly acquired skills.
If possible, attend evening classes at a local college. It usually helps if you learn with a group, because you can bounce ideas off each other.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
I hate those 'learn x in y hours' books, they rarely do any good or explain concepts that are paramount for successful projects, even the smallest of such.
|
|
|
|
|
Yes, but they're a good starting point for the absolute beginner as they will cover some of the basic features of the IDE as well as the basics of the language in question.
I should have also said, move for the VB in 24 hours books to something like "Professional VB.NET" and don't rule out books on programming concepts including OOP and database design.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Thanks all for valuable suggestions
I'll keep working and post queries
|
|
|
|
|
hi all.
am using vb.net 2.0 with sql2000, i need some help how to create pie chatrs
Regards
Vidhish
|
|
|
|
|
If you have literally no idea, a forum reply is not going to fix it for you. Your best bet is to search for a library, or buy one.
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.
|
|
|
|
|
Anything you use is quite likely to use the Graphics.DrawPie method. It's quite simple when you break it down.
|
|
|
|
|
i've tables on which i keep monthly information... table name from jan to december... now i want to make one yearly table n keep d information based on my monthly tables... m confused how to combine that monthly tables...
anybody can help me for that... plzzzzzzzzzzzz
|
|
|
|
|
Look up the use of a Union Query to help you achieve this...
eg:
select 'January' as MonthName, MonthData from JanuaryTable
union
select 'February' as MonthName, MonthData from FebruaryTable
|
|
|
|
|
no this is not exactly what i want....
in d annual table it should have col name jan, feb, march.... dec, which store d sum( --) from each tables...
if u can give me ur email id i can send u d table.. i've those in excel format.. n output is also in excel format...
|
|
|
|
|
roopali gupta wrote: if u can give me ur email id i can send u d table..
Surprisingly, he has a life and is not offering to accept your piecemeal work, to do for free.
Perhaps if you don't understand how to write basic SQL, you should buy a book on it ?
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.
|
|
|
|