ok i am maintaining an old vb6 project and it uses the driver list and the filelistbox to find file locations and now the company want to be able to open a specific file when they click on it. an example is where the file is a microsoft database they want to be able to just click on it and it opens in access so it makes it easier for them. i did some research and found something about API but i really am not sure.
thanks
open file from filelistbox
Page 1 of 14 Replies - 2077 Views - Last Post: 19 March 2013 - 03:50 AM
Replies To: open file from filelistbox
#2
Re: open file from filelistbox
Posted 17 March 2013 - 12:06 PM
This looks a good tutorial. If your question is more about opening the file in the appropriate application then using Shell() is probably simplest, and it should open in the appropriate application (according to the users Windows' settings - file associations).
Or look into the ShellExecute API:
Or look into the ShellExecute API:
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
This post has been edited by andrewsw: 17 March 2013 - 12:14 PM
#3
Re: open file from filelistbox
Posted 17 March 2013 - 12:17 PM
#4
Re: open file from filelistbox
Posted 18 March 2013 - 12:34 AM
thanks for the help will try it today
#5
Re: open file from filelistbox
Posted 19 March 2013 - 03:50 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|