JV color JV color JV color
Wednesday, 23 May 2012

วางระบบร้านเน็ต | คำคม | ร้านเกม | 2poto system | อบรม No HDD

ผสมของdota | สูตรgta | เปิดร้านเน็ต | เกม เลข |skype คือ

Friends

Photos

Videos

Events

Groups

Messages

 

ระบบร้านเกมส์ ร้านเน็ตด้วย ระบบ 2poto system

alt

2poto system คือโซลูชั่น ซอฟต์แวร์ บริหารจัดการร้านอินเทอร์เน็ตคาเฟ่ และ บริหารจัดการเกม

Photo Comments

Video Comments

Home #ชุมชนคนไซเบอร์ Groups visual basic 6 Discussions How To Use FileSystemObject with Visual Basic

How To Use FileSystemObject with Visual Basic

FileSystemObject can be found in  Scrrun.dll. In addition to FileSystemOject, Scrrun.dll includes four other objects available for File I/O and other tasks. These objects include the File object, the TextStreamObject object, the Folder object, and the Drive object. All of these objects have properties and methods that are detailed in the Help files.

You can obtain Scrrun.dll by installing one of the following packages:

Windows Script Host
Windows NT Option Pack
Microsoft Internet Information Server 3.0
Scripting 3.1 upgrade
Visual Studio 6.0
Visual Basic 6.0


FileSystemObject was originally created for the Visual Basic Scripting Edition. FileSystemObject is not included in the object library for Visual Basic or Visual Basic for Applications. To use FileSystemObject, you must select the Microsoft Scripting Run-time in the Project References dialog box for your project.

The following sample illustrates how to implement some of the FileSystemObject functionality. For more information, please see the Visual Basic Help files and the Visual Basic Books Online.

 

 

ex

Option Explicit

      Private Sub Command1_Click()
        'Declare variables.
        Dim fso As New FileSystemObject
        Dim ts As TextStream
        'Open file.
        Set ts = fso.OpenTextFile(Environ("windir") & "\system.ini")
        'Loop while not at the end of the file.
        Do While Not ts.AtEndOfStream
          Debug.Print ts.ReadLine
        Loop
        'Close the file.
        ts.Close
      End Sub

      Private Sub Command2_Click()
         Dim fso As New FileSystemObject
         Dim f As File
         'Get a reference to the File object.
         Set f = fso.GetFile(Environ("windir") & "\system.ini")
         MsgBox f.Size 'displays size of file
      End Sub

      Private Sub Command3_Click()
         Dim fso As New FileSystemObject
         Dim f As Folder, sf As Folder, path As String
         'Initialize path.
         path = Environ("windir")
         'Get a reference to the Folder object.
         Set f = fso.GetFolder(path)
         'Iterate through subfolders.
         For Each sf In f.SubFolders
           Debug.Print sf.Name
         Next
      End Sub

      Private Sub Command4_Click()
         Dim fso As New FileSystemObject
         Dim mydrive As Drive
         Dim path As String
         'Initialize path.
         path = "C:\"
         'Get object.
         Set mydrive = fso.GetDrive(path)
         'Check for success.
         MsgBox mydrive.DriveLetter 'displays "C"
      End Sub
Discussion started by poto , on 675 days ago
You need to be a member of this group before you can participate in this discussion

 

 เสนอบทวิจารณ์กระทงด้วย Facebook

โปรดละเว้นการโพสข้อความหรือภาพอันผิดกฎหมาย หรือลบหลู่สถาบันหลักของชาติ ระบบจะบันทึก IP Address ของท่านตามกฎของกระทรวง​หากเราถูกดำเนินคดี ข้อมูลของท่านจะถูกส่งให้ตำรวจเพื่อดำเนินการต่อไป