请问一下fixed,floppy,cdrom,ramdisk,network这些控件在哪个页卡下,谢谢(50分)

  • 主题发起人 主题发起人 不菜
  • 开始时间 开始时间

不菜

Unregistered / Unconfirmed
GUEST, unregistred user!
请问一下fixed,floppy,cdrom,ramdisk,network这些控件在哪个页卡下,谢谢<br>procedure TFrmMain.FormCreate(Sender: TObject);<br>var<br>&nbsp; Drive: Char;<br>&nbsp; AddedIndex: Integer;<br>begin<br>&nbsp; {利用一个循环依次检测从a到z的驱动器是否存在以及驱动器的类型。<br>&nbsp; 利用了Windwos API函数GetDrivetype, 如果驱动器不存在则返回0,<br>&nbsp; 否则返回驱动器的类型(DRIVE_REMOVABLE、DRIVE_FIXED、DRIVE_REMOTE)。<br>&nbsp; 根据驱动器类型,添加不同图形对象到DriveTabSet中。在添加过程中,<br>&nbsp; DriveTabSet的TabIndex被设置为当前驱动器。}<br>&nbsp; for Drive := 'a' to 'z' do<br>&nbsp; begin<br>&nbsp; &nbsp; case GetDriveType(PChar(Drive + ':/')) of<br>&nbsp; &nbsp; &nbsp; DRIVE_REMOVABLE:<br>&nbsp; &nbsp; &nbsp; &nbsp; AddedIndex := DriveTabSet.Tabs.AddObject(Drive, Floppy.Picture.Graphic);<br>&nbsp; &nbsp; &nbsp; DRIVE_FIXED:<br>&nbsp; &nbsp; &nbsp; &nbsp; AddedIndex := DriveTabSet.Tabs.AddObject(Drive, Fixed.Picture.Graphic);<br>&nbsp; &nbsp; &nbsp; DRIVE_CDROM:<br>&nbsp; &nbsp; &nbsp; &nbsp; AddedIndex := DriveTabSet.Tabs.AddObject(Drive, CDRom.Picture.Graphic);<br>&nbsp; &nbsp; &nbsp; DRIVE_RAMDISK:<br>&nbsp; &nbsp; &nbsp; &nbsp; AddedIndex := DriveTabSet.Tabs.AddObject(Drive, RamDisk.Picture.Graphic);<br>&nbsp; &nbsp; &nbsp; DRIVE_REMOTE:<br>&nbsp; &nbsp; &nbsp; &nbsp; AddedIndex := DriveTabSet.Tabs.AddObject(Drive, Network.Picture.Graphic);<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; AddedIndex := 0;<br>&nbsp; &nbsp; end;<br>&nbsp; &nbsp; if UpCase(Drive) = FileList.Drive then<br>&nbsp; &nbsp; &nbsp; DriveTabSet.TabIndex := AddedIndex;<br>&nbsp; end;<br>end;<br>请问一下fixed,floppy,cdrom,ramdisk,network这些控件在哪个页卡下,谢谢
 
来自:不菜 [:D]<br>搂猪,那些都是常量~~~~~~~~~~~~
 
不会吧,在object Treeview有fixed,floppy,cdrom,ramdisk,network,splitter1,这些会是<br>常量?
 
fixed,floppy,cdrom,ramdisk,network,这些都是控件的名字,根据上面的代码,也就是<br>TImage控件,用于给Combobox里面的相应的磁盘设置相应的图片的。splitter1这个是TSplitter<br>控件, HOHOHOHOHO……………………
 
我第一次接触这个控件,呵
 
接受答案了.
 
后退
顶部