Click here to Skip to main content
15,894,460 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to stop FLICKERING -> Listview -> OwnderDraw Pin
Thomas Stockwell17-Sep-08 6:02
professionalThomas Stockwell17-Sep-08 6:02 
GeneralRe: How to stop FLICKERING -> Listview -> OwnderDraw Pin
jesus.online17-Sep-08 9:24
jesus.online17-Sep-08 9:24 
GeneralRe: How to stop FLICKERING -> Listview -> OwnderDraw Pin
jesus.online17-Sep-08 9:46
jesus.online17-Sep-08 9:46 
QuestionHow to find creation date of an exe Pin
AR Reddy17-Sep-08 1:57
AR Reddy17-Sep-08 1:57 
AnswerRe: How to find creation date of an exe Pin
Tom Deketelaere17-Sep-08 2:26
professionalTom Deketelaere17-Sep-08 2:26 
AnswerRe: How to find creation date of an exe Pin
Thomas Stockwell17-Sep-08 6:03
professionalThomas Stockwell17-Sep-08 6:03 
AnswerRe: How to find creation date of an exe Pin
User 81152324-Sep-08 19:01
User 81152324-Sep-08 19:01 
QuestionCopying Directory In Faster Way Pin
sumit703417-Sep-08 0:32
sumit703417-Sep-08 0:32 
I am Copying directory from one drive to another using the code below.The Function is working fine but my problem is that Is there any other way that I can reduce time taken to copy the directory.
thanks in advance...

my code is:

Sub CopyDirectory(ByVal SourcePath As String, ByVal DestPath As String, Optional ByVal Overwrite As Boolean = False)
Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath)
Dim DestDir As DirectoryInfo = New DirectoryInfo(DestPath)

' the source directory must exist, otherwise throw an exception
If SourceDir.Exists Then
' if destination SubDir's parent SubDir does not exist throw an exception
If Not DestDir.Parent.Exists Then
Throw New DirectoryNotFoundException _
("Destination directory does not exist: " + DestDir.Parent.FullName)
End If

If Not DestDir.Exists Then
DestDir.Create()
End If

' copy all the files of the current directory
Dim ChildFile As FileInfo
For Each ChildFile In SourceDir.GetFiles()
If Overwrite Then
ChildFile.CopyTo(Path.Combine(DestDir.FullName, ChildFile.Name), True)
Else
' if Overwrite = false, copy the file only if it does not exist
' this is done to avoid an IOException if a file already exists
' this way the other files can be copied anyway...
If Not File.Exists(Path.Combine(DestDir.FullName, ChildFile.Name)) Then
ChildFile.CopyTo(Path.Combine(DestDir.FullName, ChildFile.Name), False)
End If
End If
Next

' copy all the sub-directories by recursively calling this same routine
Dim SubDir As DirectoryInfo
For Each SubDir In SourceDir.GetDirectories()
CopyDirectory(SubDir.FullName, Path.Combine(DestDir.FullName, _
SubDir.Name), Overwrite)
Next
Else
Throw New DirectoryNotFoundException("Source directory does not exist: " + SourceDir.FullName)
End If
End Sub
AnswerRe: Copying Directory In Faster Way Pin
jzonthemtn17-Sep-08 7:09
jzonthemtn17-Sep-08 7:09 
GeneralRe: Copying Directory In Faster Way Pin
sumit703417-Sep-08 20:05
sumit703417-Sep-08 20:05 
QuestionMSFlexgrid (help me on my source code) Pin
barakulyo17-Sep-08 0:13
barakulyo17-Sep-08 0:13 
QuestionHow to show Text File in PrintPreviewDialog in vb.net (WinForm) Pin
kedarrkulkarni16-Sep-08 21:06
kedarrkulkarni16-Sep-08 21:06 
QuestionAnti Spyware Pin
pavanip16-Sep-08 20:46
pavanip16-Sep-08 20:46 
AnswerRe: Anti Spyware Pin
Ashfield16-Sep-08 21:10
Ashfield16-Sep-08 21:10 
AnswerRe: Anti Spyware Pin
Tom Deketelaere16-Sep-08 23:12
professionalTom Deketelaere16-Sep-08 23:12 
QuestionWeird TabControl binding error Pin
Mycroft Holmes16-Sep-08 16:37
professionalMycroft Holmes16-Sep-08 16:37 
QuestionPinvoke DLL Pin
SUperbom16-Sep-08 10:21
SUperbom16-Sep-08 10:21 
AnswerRe: Pinvoke DLL Pin
Ajay.k_Singh16-Sep-08 23:03
Ajay.k_Singh16-Sep-08 23:03 
AnswerRe: Pinvoke DLL Pin
Gideon Engelberth18-Sep-08 5:46
Gideon Engelberth18-Sep-08 5:46 
QuestionAdding Event Handlers At Runtime? Pin
Saul Johnson16-Sep-08 10:12
Saul Johnson16-Sep-08 10:12 
AnswerRe: Adding Event Handlers At Runtime? Pin
Dave Kreskowiak16-Sep-08 11:39
mveDave Kreskowiak16-Sep-08 11:39 
GeneralRe: Adding Event Handlers At Runtime? Pin
Saul Johnson16-Sep-08 20:18
Saul Johnson16-Sep-08 20:18 
QuestionWindows form grid that displays data vertically Pin
Kschuler16-Sep-08 9:35
Kschuler16-Sep-08 9:35 
QuestionCalling a Stored Procedure with Parameter as a FilePath in VB6 Pin
phn11016-Sep-08 9:27
phn11016-Sep-08 9:27 
AnswerRe: Calling a Stored Procedure with Parameter as a FilePath in VB6 Pin
Dave Kreskowiak16-Sep-08 10:09
mveDave Kreskowiak16-Sep-08 10:09 

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.