Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anyone tell me how can i get a folder path when i double click on it to open using Visual Basic 6.0 ?
Posted

1 solution

Use DirListBox
VB
Private Sub Dir1_Change()
  txtFolderPath.Text = Dir1.Path
End Sub

Refer..... DriveListBox, DirListBox, and FileListBox Controls in Visual Basic 6[^]
 
Share this answer
 
Comments
Rajib Ganguly 24-May-11 1:51am    
No sir, I didn't mean that. I mean , how can I get a folder or file path when I double click on it to open without using any visual basic control i.e - Dir,Drive,File,FileSystemObject etc. But I want to improve the application using command line argument. Can you help me sir ? I can not pass a file path in my application in Windows XP. It shows an error like that "C:\MyPicture.jpg is not a valid Win32 application". Please sir help me. Thank you in advance.
thatraja 24-May-11 13:20pm    
/*I mean , how can I get a folder or file path when I double click on it to open without using any visual basic control*/
what is that? not clear. Better include your code & screenshot in your question, it will help you to get solutions quickly.
Rajib Ganguly 27-May-11 10:15am    
When I double click on a folder to open it that time (my program is already opened) all the file paths in the particular folder will be automatically added in my given listbox.


But I can't do this.

I can drag drop a file in it and I can open a file using my program when I click to open the file ,say - *.jpg will be opened using my program.

But I can't do the above task.

Please help ME.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900