MSDN上有这么一段:
ProgressBar1.Minimum = AvailableDiskSpace()
请问 AvailableDiskSpace() 如何引用进来
我using System.Resources 不行  是不是要调用.dll ?如果是 因该是什么?

解决方案 »

  1.   

    楼上的朋友 请问 怎么引用进来?
    using System.XX ? 
      

  2.   

     AvailableDiskSpace();
    TotalDiskSpace()因该怎么调用?
      

  3.   

    AvailableDiskSpace() 
    因该是有返回值的事件吧  
      

  4.   


    搜索 microsoft.windowsmediaservices.dll
    然后,添加引用时通过浏览把 dll加到引用.
    添加命名空间:
    using Microsoft.WindowsMediaServices.Interop;
      

  5.   

    MSDN原版  也没见如何引用AvailableDiskSpace()
    没定义AvailableDiskSpace()方法啊 public void readFiles()
    {
       // Sets the progress bar's minimum value to a number 
       // representing the hard disk space before the files are read in.
       // You will most likely have to set this using a system call.
       // NOTE: The code below is meant to be an example and 
       // will not compile.
       progressBar1.Minimum = AvailableDiskSpace();
       // Sets the progress bar's maximum value to a number 
       // representing the total hard disk space.
       // You will most likely have to set this using a system call.
       // NOTE: The code below is meant to be an example 
       // and will not compile.
       progressBar1.Maximum = TotalDiskSpace();   // Uses a for loop to iterate through the operations to be
       // completed. In this case, five files are to be written
       // to the disk, so it will execute the loop 5 times.
       for (int i = 1; i<= 5; i++)
       {
          // Insert code to read a file into memory and update file size.
          // Increases the progress bar's value based on the size of 
          // the file currently being written.
          progressBar1.Increment(FileSize);
          // Updates the label to show available drive space.
          label1.Text = "Current Disk Space Used = " + progressBar1.Value.ToString();
       }
    }
      

  6.   


    搜过了 没有这个dll 
      

  7.   

    去下载个WMSServerTypeLib.dll
    或者看看有没有
    "%windir%\system32\windows media\server\wmsservertypelib.dll"
    把这个引用了试下。
      

  8.   

    AvailableDiskSpace(); 
    TotalDiskSpace() ;
    只是个例子,具体代码要自己写,英文注释里已经写的很明白了。