Results 1 to 2 of 2

Thread: browser window

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    Ohio
    Posts
    1

    Question browser window

    I need to associate a "scanned" in barcode with a file on the computer. Once I scan in the bar code what code do I use to automaticaly bring up a "windows explorer" window to browse to the file that I want to associate with it?

    Thank you

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Use this to open Explorer to any folder that you wish on your hard drive.
    VB Code:
    1. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    2.  
    3. Private Const SW_SHOWNORMAL = 1
    4.  
    5. Private Sub OpenExplorer(Optional StartDirectory As String)
    6. ShellExecute 0, "Explore", StartDirectory, vbNullString, vbNullString, SW_SHOWNORMAL
    7. End Sub
    8.  
    9. Private Sub Command1_Click()
    10. 'To Launch Windows Explorer With Specific Directory
    11. OpenExplorer ("C:\Program Files\")
    12. End Sub

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