Click here to Skip to main content
14,843,944 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: VB, Linq, Filter out List(Of with a list(Of string [solved] Pin
jkirkerx16-Feb-21 11:47
professionaljkirkerx16-Feb-21 11:47 
SuggestionRe: VB, Linq, Filter out List(Of with a list(Of string [solved] Pin
Richard Deeming16-Feb-21 22:18
mveRichard Deeming16-Feb-21 22:18 
GeneralRe: VB, Linq, Filter out List(Of with a list(Of string [solved] Pin
jkirkerx17-Feb-21 4:46
professionaljkirkerx17-Feb-21 4:46 
QuestionConvert C to VB Pin
leofoe15-Feb-21 22:52
Memberleofoe15-Feb-21 22:52 
AnswerRe: Convert C to VB Pin
Richard Deeming15-Feb-21 23:38
mveRichard Deeming15-Feb-21 23:38 
GeneralRe: Convert C to VB Pin
leofoe15-Feb-21 23:46
Memberleofoe15-Feb-21 23:46 
GeneralRe: Convert C to VB Pin
Richard Deeming16-Feb-21 1:19
mveRichard Deeming16-Feb-21 1:19 
QuestionDeleting a sent file Pin
Member 1152288212-Feb-21 11:11
MemberMember 1152288212-Feb-21 11:11 
Hello, how do I delete a file from my computer that has already been sent to an email?

Imports System.IO
Imports System.Net.Mail

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim compInfo = "computerInfo.txt"
Try
Dim MailMessage As New MailMessage()
MailMessage.From = New MailAddress("@gmail.com")
MailMessage.To.Add("@gmail.com")
MailMessage.Attachments.Add(New System.Net.Mail.Attachment(compInfo))
Dim SMTPServer As New SmtpClient("smtp.gmail.com")
SMTPServer.Port = 587
SMTPServer.Credentials = New System.Net.NetworkCredential("@gmail.com", "pass")
SMTPServer.EnableSsl = True
Catch
End Try

If System.IO.File.Exists(compInfo) = True Then
System.IO.File.Delete(compInfo)
End If

End Sub


The problem appears in:
System.IO.File.Delete(compInfo)


"The process cannot access the C:\...\...\computerInfo.txt file because it is being used by another process"
AnswerRe: Deleting a sent file Pin
Ralf Meier12-Feb-21 12:26
professionalRalf Meier12-Feb-21 12:26 
AnswerRe: Deleting a sent file Pin
Dave Kreskowiak12-Feb-21 15:51
mveDave Kreskowiak12-Feb-21 15:51 
AnswerRe: Deleting a sent file Pin
Richard Deeming14-Feb-21 21:51
mveRichard Deeming14-Feb-21 21:51 
Questionwkhtmltopdf.exe - Process-Start over COM-Interop - Access denied Pin
VoidFunctionMain10-Feb-21 4:48
MemberVoidFunctionMain10-Feb-21 4:48 
QuestionCode for Saving work Pin
Wamono erick5-Feb-21 7:52
MemberWamono erick5-Feb-21 7:52 
AnswerRe: Code for Saving work Pin
Dave Kreskowiak5-Feb-21 8:28
mveDave Kreskowiak5-Feb-21 8:28 
QuestionProblem when setting the ReadOnly state of a property: CLOSED Pin
mo149231-Jan-21 5:56
Membermo149231-Jan-21 5:56 
QuestionInterfacing with Zlib.dll Pin
albert_redditt28-Jan-21 10:16
Memberalbert_redditt28-Jan-21 10:16 
AnswerRe: Interfacing with Zlib.dll Pin
20212a28-Jan-21 10:30
Member20212a28-Jan-21 10:30 
AnswerRe: Interfacing with Zlib.dll Pin
Richard MacCutchan28-Jan-21 21:14
mveRichard MacCutchan28-Jan-21 21:14 
QuestionUnable to complete the code for Web scrapping Pin
The Mentee27-Jan-21 8:56
MemberThe Mentee27-Jan-21 8:56 
AnswerRe: Unable to complete the code for Web scrapping Pin
Richard Deeming27-Jan-21 21:49
mveRichard Deeming27-Jan-21 21:49 
GeneralRe: Unable to complete the code for Web scrapping Pin
The Mentee28-Jan-21 0:06
MemberThe Mentee28-Jan-21 0:06 
GeneralRe: Unable to complete the code for Web scrapping Pin
DerekT-P28-Jan-21 7:07
professionalDerekT-P28-Jan-21 7:07 
GeneralPersonal Appointment Reminder Code Pin
mike Pant10-Jan-21 2:58
Membermike Pant10-Jan-21 2:58 
GeneralRe: Personal Appointment Reminder Code Pin
Victor Nijegorodov10-Jan-21 3:59
MemberVictor Nijegorodov10-Jan-21 3:59 
GeneralRe: Personal Appointment Reminder Code Pin
Gerry Schmitz10-Jan-21 4:47
mveGerry Schmitz10-Jan-21 4:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.