本文介绍了如何将VB.NET降级为VB6或将VB.NET更改为VB6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了一个编码,用于将文件从桌面复制到可移动设备。但它在VB.net和Windows 7中运行。我们的大多数PC都是Windows XP。你能否告诉我如何将编码降级到能够在Windows XP上运行的VB6。



我尝试了什么:



I got an coding like which is used to copy files from desktop to Removable device. But it is working in VB.net and windows 7. Most of our PCs are windows XP. Can you please tell me how to downgrade the coding to VB6 which is able to run on windows XP also.

What I have tried:

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim Gig As Long = 1073741824L
        Dim FolderToCopy As String = My.Computer.FileSystem.SpecialDirectories.Desktop

        Try
            For Each Drive As IO.DriveInfo In IO.DriveInfo.GetDrives
                Select Case True
                    Case Not Drive.DriveType = IO.DriveType.Removable
                    Case Not Drive.IsReady
                    Case Not Drive.AvailableFreeSpace >= 2 * Gig
                    Case Else
                        Debug.Print("Copying {0} to {1}", FolderToCopy, Drive.RootDirectory.FullName)
                        My.Computer.FileSystem.CopyDirectory(FolderToCopy, Drive.RootDirectory.FullName, True)

                        ' Only do the copy once to first appropriate drive
                        Exit For
                End Select
            Next
        Catch ex As Exception
            Debug.Print(ex.ToString)
        End Try

    End Sub
End  class 

推荐答案


这篇关于如何将VB.NET降级为VB6或将VB.NET更改为VB6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 20:57
查看更多