Results 1 to 7 of 7

Thread: Help with VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    never u mind
    Posts
    3

    Help with VB6

    i wanted to make a little program to open and close my DVD drive, i have done that but then i wanted to open and close my CDRW drive so i put a COMBO box.
    but i dont know what the coding would be to link the 2 buttons to the combo box so it can open and close the drives that i pick.



    please help me







    THE ROAD TO SUCCESS IS ALWAYS UNDER CONSTRUCTION

  2. #2
    Addicted Member Jez1's Avatar
    Join Date
    Oct 2001
    Location
    Warwickshire, England
    Posts
    185

    ...

    Assuming that you have a button, "Command1" and a combo "Combo1" on your form, this should do it:

    In button:
    Code:
    Select Case Combo1.Text
      Case Is = "Item1"
        MsgBox ("Item1 is selected")
      Case Is = "Item2"
        MsgBox ("Item2 is selected")
      Case Else
        MsgBox ("No items selected")
    End Select
    Jez

  3. #3
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Done!
    Attached Files Attached Files

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    never u mind
    Posts
    3
    this form is good but it does not do the job.
    i tried it but it does not open my other drive

  5. #5
    Junior Member -_MAD-HATTAH_-'s Avatar
    Join Date
    Sep 2002
    Location
    PHX AZ
    Posts
    25
    worx awesome for me...i took a look at the code and \/\/0\/\/! for a n00b that was a lil overwhelming! ;-)
    -_MAD-HATTAH_-

  6. #6

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    never u mind
    Posts
    3
    so there is no one there to help with the program

  7. #7
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    I've tested this on a few PC's and didn't have any problems, there is another API call to use to open the drive I think, but it'll probably give youthe same result as I think this is possibly down to your particular drive.

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width