Quote:
|
Originally Posted by Kerry
Hi dude! Could you please advise me where I can get a good tutorials for VB6?
|
Try this site:
www.freevbcode.com
Its a great one.
__________
Quote:
|
Originally Posted by romeo_8693
i want to add a control which opens "open file" dialog!but it shudnt take a file instead i just want the folder path to be returnd to prog.how do i do this?
|
For that you will have add a CommonDialog control which if not present in the toolbar, you will have to add from the Components(ctrl+t)
Then, to show the open dialog box,
add the foll. code in the event in which you want the open dialog box to appear.
Code:
cd.Filter = "AllFiles|*.txt"
FileName = cd.FileName
cd.ShowOpen
frmmain.Caption = cd.FileName
In the above code, cd is the name of the common dialog box. Then the FileName is an inbuilt keyword in
VB which give the filename of the file selected in the Dialog box.
.Filter is used to display only a set of files which have a specific extension such as .exe,.txt etc.
After that,I have displayed the file name in the form,s caption using the last line of code.
If you want the whole path and the file name to be displayed, use the following code:
Code:
frmmain.caption=cd.Path + "/" + cd.FileName
If there is any error, just let me know....I will correct it if you want!!!