| | |
How to load a filename on a LISTBOX
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
any pls help mo on How to load a filename on a LISTBOX.
also pls teach me that when i click on the filename loaded on the listbox
it will run,
i only need to load the names of my movieclips which is all (.avi)
then when click will play on a media player
pls help.... search and tried lot of ideas
none work
also pls teach me that when i click on the filename loaded on the listbox
it will run,
i only need to load the names of my movieclips which is all (.avi)
then when click will play on a media player
pls help.... search and tried lot of ideas
none work
•
•
Join Date: Jan 2008
Posts: 39
Reputation:
Solved Threads: 1
well if you want to add the filenames on a listbox, you will have to make use of "FileSystemObject" you can define it as
dim Fsys(or any other name of the variable) as filesystemobject
once yopu have defined it, you can reference its features by
Fsys.
try it it has worked for me. And if you want I can send you the program I made to do the same thing. As far as playing a file in media player is concerned, you will have to give reference to media player in the program and place a media player control, which will be used to play the file.
Rajesh Khanna
dim Fsys(or any other name of the variable) as filesystemobject
once yopu have defined it, you can reference its features by
Fsys.
try it it has worked for me. And if you want I can send you the program I made to do the same thing. As far as playing a file in media player is concerned, you will have to give reference to media player in the program and place a media player control, which will be used to play the file.
Rajesh Khanna
•
•
Join Date: Nov 2007
Posts: 141
Reputation:
Solved Threads: 15
•
•
•
•
any pls help mo on How to load a filename on a LISTBOX.
also pls teach me that when i click on the filename loaded on the listbox
it will run,
i only need to load the names of my movieclips which is all (.avi)
then when click will play on a media player
pls help.... search and tried lot of ideas
none work
Rather than use a listbox, I would say use a FileListBox (shown in the toolbox as a piece of paper with lines across).
After you have added that in, go to the FileListBox's properties and you'll need to change Pattern to *.avi (it is currently *.* to show all files).
On form load you'd need to set it to look at a particular directory for example:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Form_Load() File1.Path = "c:\movies" End Sub
Then you'd need to make an onClick method for the FileListBox to load the file up when a file is clicked. You could make it on double click to make it harder to accidentally run one of the movies.
You could call the media player's executable file and pass the filename (including path) as an additional command (this is the way I'd do it personally).
Alternatively, there may be a way of just running the file and it loads the default application - unfortunately I don't how how this would be done though.
Hope that helps.
•
•
•
•
any pls help mo on How to load a filename on a LISTBOX.
also pls teach me that when i click on the filename loaded on the listbox
it will run,
i only need to load the names of my movieclips which is all (.avi)
then when click will play on a media player
pls help.... search and tried lot of ideas
none work
in this sample i've used windows media player control (9 series) which in default not installed in every machine. the default one is windows media player 6.4 . so if u got any trouble on that plz forward ur problems. i'll solve them out.
see the screenshot also...
ok......
regards
Shouvik
Last edited by choudhuryshouvi; Feb 1st, 2008 at 5:27 am.
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Have a problem? Don't worry just give me a call and I'll fix it for you.
Thx alot to all of u, before i read this post i was able to make a program that save's and load a video, but somehow i can only save the name into a URL format on a database, have no idea about that fileLIstBox. and sir choudhuryshouvi thx a lot on your sample file it really really help me and my group. one's i finished my prob(thats related to this) maybe ill start a new thread about that FileListBOx, Really thx !
![]() |
Similar Threads
- Starting Python (Python)
- Need help generating a Grand Total (VB.NET)
- uploading multiple files, 'post' not working off server (works fine off local host) (JSP)
- Select files in a listbox (Python)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: VB Select Statement Query
- Next Thread: line1.bordercolor ??
Views: 2224 | Replies: 7
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






