Click here to Skip to main content
15,895,011 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Reset the current directory to AppPath on exit Pin
Joshua Quick16-Feb-06 7:43
Joshua Quick16-Feb-06 7:43 
AnswerRe: Reset the current directory to AppPath on exit Pin
Dave Kreskowiak16-Feb-06 10:31
mveDave Kreskowiak16-Feb-06 10:31 
AnswerRe: Reset the current directory to AppPath on exit Pin
DJLarZ16-Feb-06 21:07
DJLarZ16-Feb-06 21:07 
Questionvb.net 3003 draw tool Pin
yorickthefirst15-Feb-06 23:43
yorickthefirst15-Feb-06 23:43 
AnswerRe: vb.net 3003 draw tool Pin
Dave Kreskowiak16-Feb-06 1:30
mveDave Kreskowiak16-Feb-06 1:30 
QuestionHow to get path to the CD drive Pin
Chatura Dilan15-Feb-06 23:17
Chatura Dilan15-Feb-06 23:17 
AnswerRe: How to get path to the CD drive Pin
alien viper15-Feb-06 23:42
alien viper15-Feb-06 23:42 
GeneralRe: How to get path to the CD drive Pin
Chatura Dilan16-Feb-06 15:33
Chatura Dilan16-Feb-06 15:33 
Rose | [Rose] Thanks for your reply. When I was surfing the internet, I found some interesting tips.
Although they were in VB6 format, I converted them into VB.Net format and combined them together.

This program has,
A label “lblCDDrives”
Tow buttons “btnClose” & “btnOpen”


Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer<br />
    Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Integer<br />
<br />
    Private Const DRIVE_CDROM As Short = 5<br />
    Const ASC_A As Short = 65<br />
    Const ASC_Z As Integer = ASC_A + 25<br />
<br />
    ' Return the CD-ROM drive letters.<br />
    Private Function SearchCDDrives() As String<br />
        Dim i As Short<br />
<br />
        For i = ASC_A To ASC_Z<br />
            If GetDriveType(Chr(i) & ":\") = DRIVE_CDROM Then<br />
                SearchCDDrives = SearchCDDrives & " " & Chr(i)<br />
            End If<br />
        Next i<br />
    End Function<br />
<br />
    Private Sub btnClose_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles btnClose.Click<br />
        'Close CD Door<br />
        mciSendString("Set CDAudio Door Closed Wait", CStr(0), 0, 0)<br />
    End Sub<br />
<br />
    Private Sub btnOpen_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles btnOpen.Click<br />
        'Open CD Door<br />
        mciSendString("Set CDAudio Door Open Wait", CStr(0), 0, 0)<br />
    End Sub<br />
<br />
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
        lblCDDrives.Text = "CD drives are: "<br />
        lblCDDrives.Text = lblCDDrives.Text & SearchCDDrives()<br />
    End Sub




chatura
GeneralRe: How to get path to the CD drive Pin
alien viper16-Feb-06 16:14
alien viper16-Feb-06 16:14 
QuestionCrystal Reports Pin
microuser_200015-Feb-06 22:29
microuser_200015-Feb-06 22:29 
QuestionDatagrid > DataTable > Excel Pin
RichardBerry15-Feb-06 22:02
RichardBerry15-Feb-06 22:02 
AnswerRe: Datagrid > DataTable > Excel Pin
KreativeKai17-Feb-06 4:08
professionalKreativeKai17-Feb-06 4:08 
AnswerRe: Datagrid > DataTable > Excel Pin
Dean_SF17-Feb-06 7:44
Dean_SF17-Feb-06 7:44 
GeneralRe: Datagrid > DataTable > Excel Pin
RichardBerry21-Feb-06 3:35
RichardBerry21-Feb-06 3:35 
GeneralRe: Datagrid > DataTable > Excel Pin
Dean_SF21-Feb-06 4:13
Dean_SF21-Feb-06 4:13 
Questionproduct security Pin
brindhavijay15-Feb-06 19:49
brindhavijay15-Feb-06 19:49 
AnswerRe: product security Pin
Joshua Quick15-Feb-06 20:56
Joshua Quick15-Feb-06 20:56 
Questioncan't find keycodeV.dll Pin
shekhar8115-Feb-06 19:47
shekhar8115-Feb-06 19:47 
AnswerRe: can't find keycodeV.dll Pin
nguyenvhn15-Feb-06 20:35
nguyenvhn15-Feb-06 20:35 
AnswerRe: can't find keycodeV.dll Pin
Rana Muhammad Javed Khan15-Feb-06 21:38
Rana Muhammad Javed Khan15-Feb-06 21:38 
AnswerRe: can't find keycodeV.dll Pin
KreativeKai16-Feb-06 5:04
professionalKreativeKai16-Feb-06 5:04 
AnswerRe: can't find keycodeV.dll Pin
malharone16-Feb-06 7:28
malharone16-Feb-06 7:28 
QuestionKeeping Exe On Server and Placing Short Cut on Clients Pin
Rana Muhammad Javed Khan15-Feb-06 19:41
Rana Muhammad Javed Khan15-Feb-06 19:41 
AnswerRe: Keeping Exe On Server and Placing Short Cut on Clients Pin
Joshua Quick15-Feb-06 20:46
Joshua Quick15-Feb-06 20:46 
AnswerRe: Keeping Exe On Server and Placing Short Cut on Clients Pin
Dave Kreskowiak16-Feb-06 1:25
mveDave Kreskowiak16-Feb-06 1:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.