Click here to Skip to main content
15,890,897 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: TabControl VB Pin
_anil_20-Feb-08 20:44
_anil_20-Feb-08 20:44 
GeneralRe: TabControl VB Pin
darkelv20-Feb-08 21:07
darkelv20-Feb-08 21:07 
GeneralRe: TabControl VB Pin
_anil_20-Feb-08 22:27
_anil_20-Feb-08 22:27 
GeneralRandom Number Generator Pin
RambleWoods20-Feb-08 14:52
RambleWoods20-Feb-08 14:52 
GeneralRe: Random Number Generator Pin
Luc Pattyn20-Feb-08 16:07
sitebuilderLuc Pattyn20-Feb-08 16:07 
GeneralRe: Random Number Generator Pin
Christian Graus20-Feb-08 20:24
protectorChristian Graus20-Feb-08 20:24 
GeneralRe: Random Number Generator Pin
RambleWoods1-Mar-08 16:03
RambleWoods1-Mar-08 16:03 
GeneralDelete, Create, Code doesn't do what its supposed to. Pin
Karma3125120-Feb-08 9:49
Karma3125120-Feb-08 9:49 
Public Sub AppendTrackNumLog(ByVal LogText As String)

Dim LogInfo As System.IO.FileInfo
Dim createDate As DateTime
LogInfo = My.Computer.FileSystem.GetFileInfo("t:\PowderedLogs\TrackNumLogPowdered.txt")
createDate = LogInfo.CreationTime
If Date.Now >= createDate.AddDays(7) Then
My.Computer.FileSystem.DeleteFile("t:\PowderedLogs\TrackNumLogPowdered.txt")
End If
Try
Dim TimeStamp As String
TimeStamp = Date.Now()
If My.Computer.FileSystem.FileExists("t:\PowderedLogs\TrackNumLogPowdered.txt") = False Then
My.Computer.FileSystem.WriteAllText("t:\PowderedLogs\TrackNumLogPowdered.txt", String.Empty, False)
My.Computer.FileSystem.WriteAllText("t:\PowderedLogs\TrackNumLogPowdered.txt", Environment.NewLine + LogText + " - " + TimeStamp, True)
Else
My.Computer.FileSystem.WriteAllText("t:\PowderedLogs\TrackNumLogPowdered.txt", Environment.NewLine + LogText + " - " + TimeStamp, True)
End If
Catch ex As Exception
MsgBox("Error: Writing to TrackNumLog")
End Try
End Sub

Now this code is supposed to simply delete and re-create a Log file. It works in the sense that it doesn't create an error. It also will delete and re-create the file but it doesn't change the Create Date. It wipes the file and puts the just the new info, but because it doesn't change the create date, every time the code runs it deletes the files, now if i step through the code and stop right after the delete line of code runs and go and physically check the folder, the file isn't there, then i continue to run the code, and when the code is done, i got back and check the file is there now, AND has a new creation date, now why would it not change the creation date unless i physically go to the folder and look for the file???? Its like the because the file is deleted and created so fast in the code that it doesn't register that its a new file.
AnswerRe: Delete, Create, Code doesn't do what its supposed to. Pin
Guffa20-Feb-08 11:55
Guffa20-Feb-08 11:55 
GeneralRe: Delete, Create, Code doesn't do what its supposed to. Pin
Christian Graus20-Feb-08 12:03
protectorChristian Graus20-Feb-08 12:03 
GeneralMonth Calendar linked to a database [modified] Pin
KrisnNala20-Feb-08 8:30
KrisnNala20-Feb-08 8:30 
QuestionHow to kick Microsoft SAM's a$%? Pin
qrosity20-Feb-08 7:44
qrosity20-Feb-08 7:44 
AnswerRe: How to kick Microsoft SAM's a$%? Pin
qrosity21-Feb-08 21:22
qrosity21-Feb-08 21:22 
GeneralRe: How to kick Microsoft SAM's a$%? Pin
Johan Hakkesteegt24-Feb-08 10:24
Johan Hakkesteegt24-Feb-08 10:24 
GeneralRe: How to kick Microsoft SAM's a$%? Pin
qrosity24-Feb-08 11:55
qrosity24-Feb-08 11:55 
GeneralCant find database column that exists [modified] Pin
AAGTHosting20-Feb-08 6:20
AAGTHosting20-Feb-08 6:20 
GeneralRe: Cant find database column that exists Pin
Dave Kreskowiak20-Feb-08 7:02
mveDave Kreskowiak20-Feb-08 7:02 
GeneralUsing Option Strict On Pin
AAGTHosting20-Feb-08 5:09
AAGTHosting20-Feb-08 5:09 
GeneralRe: Using Option Strict On Pin
Dave Kreskowiak20-Feb-08 5:40
mveDave Kreskowiak20-Feb-08 5:40 
GeneralRe: Using Option Strict On Pin
AAGTHosting20-Feb-08 6:43
AAGTHosting20-Feb-08 6:43 
GeneralRe: Using Option Strict On Pin
Dave Kreskowiak20-Feb-08 6:57
mveDave Kreskowiak20-Feb-08 6:57 
GeneralRe: Using Option Strict On Pin
AAGTHosting20-Feb-08 7:02
AAGTHosting20-Feb-08 7:02 
GeneralRe: Using Option Strict On Pin
Dave Kreskowiak20-Feb-08 7:12
mveDave Kreskowiak20-Feb-08 7:12 
AnswerRe: Using Option Strict On Pin
Guffa20-Feb-08 8:41
Guffa20-Feb-08 8:41 
GeneralVB.NET VS C# Pin
Vimalsoft(Pty) Ltd20-Feb-08 4:16
professionalVimalsoft(Pty) Ltd20-Feb-08 4:16 

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.