Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 22nd, 2003, 01:07 PM
jbelmira jbelmira is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Elmira, Ontario
Posts: 16 jbelmira User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Refresh drive, dir and file controls

I have developed an app that uses the drive, dir and file controls so that I can read what is on a CD through the drive. I need some help to get my program to refresh automatically [like windows automatically does in explorer] so that when I insert a different CD, it is not necessary to have the user do anything. i.e. the program automatically reads the CD in the drive and updates the drive, dir and file controls.

Thanks.
jb

Reply With Quote
  #2  
Old December 22nd, 2003, 10:56 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
U can use this function to judge which drive is CD-Rom:
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
'Set the graphic mode to persistent
Me.AutoRedraw = True
'Get information about the C:\
Select Case GetDriveType("C:\")
Case 2
Me.Print "Removable"
Case 3
Me.Print "Drive Fixed"
Case Is = 4
Me.Print "Remote"
Case Is = 5
Me.Print "Cd-Rom"
Case Is = 6
Me.Print "Ram disk"
Case Else
Me.Print "Unrecognized"
End Select
End Sub

And use timer to detect CD-Rom Drive's content by read it or list directory for ensuring whether this drive is ready!..If it is ready to work,U can read the CD in the drive and update the drive, dir and file controls

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Refresh drive, dir and file controls


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT