Results 1 to 3 of 3

Thread: คำถามเกี่ยวกับ VB6

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Posts
    1


    ผมกำลังหัดเขียนโปรแกรมโดยใช้ VB6 ครับ

    ทีนี้ติดอยู่ ตรงที่ว่า เวลาผมเลือกไฟล์ ใน File list box แล้ว ต้องการจะให้ ไฟล์ exe ตัวนั้นรันขึ้นมาโดยการกด ปุ่ม ที่สร้างแยกออกมาครับ

    ไม่ทราบว่ามี Code ไหนที่พอจะช่วยได้บ้างครับ

    พอดีผมได้ Code

    Function GotoProgram(URL As String)

    Dim valReturn As Long

    valReturn = ShellExecute(0&, vbNullString, URL, vbNullString, "C:\", 1)

    End Function

    ตัวนี้มาครับ แต่ว่ามันไม่มีอะไรตอบสนองเลยครับ รบกวนช่วยทีนะครับ

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Thailand
    Posts
    211




    ต้องมี drive + directory + filename


    GotoProgram (Dir1.Path & File1.FileName)


  3. #3
    Junior Member CkW's Avatar
    Join Date
    Aug 2009
    Location
    หน้าคอม
    Posts
    22


    **Hidden Content: To see this hidden content your post count must be 5 or greater.**

    ง่ายมากๆๆ ครับ
    Credit : CkW

Similar Threads

  1. Replies: 2
    Last Post: 16-05-2009, 01:59 PM
  2. Replies: 5
    Last Post: 06-05-2008, 08:38 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Posting Permissions

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