Click here to Skip to main content
15,914,229 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralSave Pictures Pin
RajithCAlwis1-Apr-05 1:36
RajithCAlwis1-Apr-05 1:36 
GeneralRe: Save Pictures Pin
bodespace1-Apr-05 1:51
bodespace1-Apr-05 1:51 
Generallook for dominant color in bitmap Pin
bodespace1-Apr-05 0:59
bodespace1-Apr-05 0:59 
GeneralRe: look for dominant color in bitmap Pin
Dave Kreskowiak1-Apr-05 2:20
mveDave Kreskowiak1-Apr-05 2:20 
GeneralRe: look for dominant color in bitmap Pin
bodespace1-Apr-05 2:39
bodespace1-Apr-05 2:39 
GeneralDynamic Controls Pin
Sumit Domyan1-Apr-05 0:54
Sumit Domyan1-Apr-05 0:54 
GeneralRe: Dynamic Controls Pin
Dave Kreskowiak1-Apr-05 2:19
mveDave Kreskowiak1-Apr-05 2:19 
Generalbug(or my problem) in File.Open using FileShare.Write Pin
carlos_rocha1-Apr-05 0:41
carlos_rocha1-Apr-05 0:41 
Hi!

I have an app that writes to a log file all the app's steps. I have several threads writing several times per second to the log file. The thing is that i have detected an exception with one of those writings, when i try to OPEN the log file. I use FileShare.Write so that there's no problem with writes form several threads at the same time(i thought).Did anybody experienced such a problem or is it my bug? I only write to the log in one function and i close the filestrems an the end.The code is:

Try
fs = File.Open(logPath & Format(Now(), "yyyyMMdd") & ".txt", FileMode.Append, FileAccess.Write, FileShare.Write)
fsWriter = New StreamWriter(fs)
fsWriter.WriteLine(Now & vbTab & entryString)
Catch ex As Exception
writeToErrorLog(ex.ToString)
Finally
If Not fsWriter Is Nothing Then
fsWriter.Close()
End If

If Not fs Is Nothing Then
fs.Close()
End If
End Try

Never say never
GeneralRe: bug(or my problem) in File.Open using FileShare.Write Pin
Dave Kreskowiak1-Apr-05 2:17
mveDave Kreskowiak1-Apr-05 2:17 
GeneralRe: bug(or my problem) in File.Open using FileShare.Write Pin
carlos_rocha1-Apr-05 2:20
carlos_rocha1-Apr-05 2:20 
GeneralXML Transform Pin
nitin_ion31-Mar-05 23:12
nitin_ion31-Mar-05 23:12 
Generalcreate new textbox Pin
GaryKoh31-Mar-05 23:02
GaryKoh31-Mar-05 23:02 
GeneralRe: create new textbox Pin
carlos_rocha1-Apr-05 1:05
carlos_rocha1-Apr-05 1:05 
GeneralRe: create new textbox Pin
GaryKoh1-Apr-05 2:21
GaryKoh1-Apr-05 2:21 
GeneralRe: create new textbox Pin
carlos_rocha1-Apr-05 2:30
carlos_rocha1-Apr-05 2:30 
GeneralRe: create new textbox Pin
GaryKoh1-Apr-05 5:24
GaryKoh1-Apr-05 5:24 
GeneralWebbrowser control - opening URL shortcuts Pin
mecracked31-Mar-05 17:34
sussmecracked31-Mar-05 17:34 
GeneralRe: Webbrowser control - opening URL shortcuts Pin
Dave Kreskowiak1-Apr-05 2:12
mveDave Kreskowiak1-Apr-05 2:12 
GeneralRe: Webbrowser control - opening URL shortcuts Pin
mecracked1-Apr-05 14:48
sussmecracked1-Apr-05 14:48 
GeneralRe: Webbrowser control - opening URL shortcuts Pin
Dave Kreskowiak2-Apr-05 3:32
mveDave Kreskowiak2-Apr-05 3:32 
GeneralForum Pin
Berserk5531-Mar-05 14:50
Berserk5531-Mar-05 14:50 
GeneralRe: Forum Pin
Dave Kreskowiak31-Mar-05 14:55
mveDave Kreskowiak31-Mar-05 14:55 
GeneralRe: Forum Pin
Berserk551-Apr-05 12:07
Berserk551-Apr-05 12:07 
Generaldeveloping a estimating program Pin
cds.toecuter31-Mar-05 12:38
cds.toecuter31-Mar-05 12:38 
GeneralPrinting Word Documents Pin
alcitizenp31-Mar-05 11:52
alcitizenp31-Mar-05 11:52 

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.