Страница: 1 |
Вопрос: CD | Добавлено: 06.01.03 12:50 |
Автор вопроса: ![]() |
Как определить букву Cdrom'а на данном компьютере. P.s кстати у меня уже 2 день не получается изменить profile. Профиксите плз. |
Ответы | Всего ответов: 1 |
Номер ответа: 1 Автор ответа: ![]() ![]() ![]() ![]() Вопросов: 4 Ответов: 2 |
Профиль | Цитата | #1 | Добавлено: 06.01.03 16:23 | |||||||||||||||||||||||
Таже пока не могу определить именно CD-ROM. Но должно решаться через FileSystemObject. Там можно определить все буквы дисков на компе и есть возможность определения их типа. Но в этом месте у меня возникли сложности. Вот фрагмент из хелпа. The File System Object (FSO) model provides an object-based tool for working with folders and files. It allows you to use the familiar object.method syntax with a rich set of properties, methods, and events to process folders and files. You can also employ the traditional Visual Basic statements and commands. The FSO model gives your application the ability to create, alter, move, and delete folders, or to determine if and where particular folders exist. It also enables you to get information about folders, such as their names and the date they were created or last modified. The FSO model makes processing files much easier as well. When processing files, your primary goal is to store data in an efficient, easy-to-access format. You need to be able to create files, insert and change the data, and output (read) the data. Although you can store data in a database, doing so adds a significant amount of overhead to your application. You may not want to have such overhead, or your data access requirements may not call for the extra functionality associated with a full-featured database. In this case, storing your data in a text file or binary file is the most efficient solution. The FSO model, contained in the Scripting type library (Scrrun.dll), supports the creation and manipulation of text files through the TextStream object; however, the FSO model does not support binary files. To manipulate binary files, use the The following objects make up the FSO model:
For information about the various properties, methods, and events in the FSO model, use the Object Browser in Visual Basic by pressing CTRL+ALT+J and looking at the Scripting type library. If the Scripting type library does not appear in the list, create a reference to it as shown in the next section. Programming in the FSO ModelProgramming in the FSO model entails three main tasks:
The FSO model is contained in the Scripting type library, which is located in the file Scrrun.dll. If you don't already have a reference to it, you can create one. To create a reference to the Scripting type library (Scrrun.dll)
To create a FileSystemObject object
In the second example, Note The first method works only in Visual Basic, while the second method works either in Visual Basic or VBScript. FSO MethodsThe following table shows FSO methods and the tasks that they perform:
Note The FSO model does not support the creation or deletion of drives. As you can see, some functionality in the FileSystemObject object model is redundant. For example, you can copy a file using either the CopyFile method of the FileSystemObject object, or you can use the Copy method of the File object. The methods work the same way; both versions are included to give you maximum p |
Страница: 1 |
|