Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 10-02-2007, 03:23 PM   #1 (permalink)
"The RaCaLaNGeL"©
 
romeo_8693's Avatar
 
Join Date: Dec 2005
Location: Goa/Pune
Posts: 389
Default Visual Basic help!


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?
__________________
Without sorrows happiness would be boring!
romeo_8693 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 10-02-2007, 03:33 PM   #2 (permalink)
"The RaCaLaNGeL"©
 
romeo_8693's Avatar
 
Join Date: Dec 2005
Location: Goa/Pune
Posts: 389
Default Re: Visual Basic help!

i know its common dialog control,but it if select a folder and click open it opens the folder..i dnt want dat...instead of open button a want sumthing like select,so wen a select the folder and click select it passes the path of that folder and not opn it....
__________________
Without sorrows happiness would be boring!
romeo_8693 is offline  
Old 10-02-2007, 03:47 PM   #3 (permalink)
In The Zone
 
Join Date: Sep 2006
Posts: 319
Default Re: Visual Basic help!

Ok so this is the thing.I hope that u must be knowing DirListBox which displays the folder of a particular drive .First u can use the DriveListBox then the DirListBox. Need answer in detail ?????????????
__________________
Visit now ;)
www.indiandevs.com - for great free designs :)
www.indiandevs.com/technoworld/ for latest technology news and tricks
Siddharth Maheshwari is offline  
Old 10-02-2007, 03:53 PM   #4 (permalink)
"The RaCaLaNGeL"©
 
romeo_8693's Avatar
 
Join Date: Dec 2005
Location: Goa/Pune
Posts: 389
Default Re: Visual Basic help!

yup...wic component to select?
__________________
Without sorrows happiness would be boring!
romeo_8693 is offline  
Old 10-02-2007, 07:24 PM   #5 (permalink)
Apprentice
 
vinit suri's Avatar
 
Join Date: Feb 2007
Posts: 87
Smile Re: Visual Basic help!

dude u can use dir listbox or the .path property of common dialog box......?????? try it out...
vinit suri is offline  
Old 12-02-2007, 02:43 PM   #6 (permalink)
"The RaCaLaNGeL"©
 
romeo_8693's Avatar
 
Join Date: Dec 2005
Location: Goa/Pune
Posts: 389
Default Re: Visual Basic help!

ill try..
__________________
Without sorrows happiness would be boring!
romeo_8693 is offline  
Old 12-02-2007, 05:15 PM   #7 (permalink)
In The Zone
 
Join Date: Sep 2006
Posts: 319
Lightbulb Re: Visual Basic help!

I got that .

Can u see the folder icon and a drive icon in the tollbar containing commands.You can select the drive for the drives and folder for the folders.

For details on how to use them rep.
__________________
Visit now ;)
www.indiandevs.com - for great free designs :)
www.indiandevs.com/technoworld/ for latest technology news and tricks
Siddharth Maheshwari is offline  
Old 12-02-2007, 07:24 PM   #8 (permalink)
"The RaCaLaNGeL"©
 
romeo_8693's Avatar
 
Join Date: Dec 2005
Location: Goa/Pune
Posts: 389
Default Re: Visual Basic help!

yeah pls....
__________________
Without sorrows happiness would be boring!
romeo_8693 is offline  
Old 13-02-2007, 02:53 PM   #9 (permalink)
In The Zone
 
Join Date: Sep 2006
Posts: 319
Lightbulb Re: Visual Basic help!

Ok so lets begin :-

U can see that in the general toolbar of VB6 there r thre icons(circled in the image) :-



The drive icon is for drive scroller , folder icon for folder box and file icon for file box.

Now if uwant to set the path of the folder to the drive so in the change value of drive put the following line:-
Code:
dir1.path=drive1.drive
So whenever the user will change the drive the folders will get updated.

Now suppose if uwant to show the caption of the form = the location where the user is browsing.
so put the following command:-
Code:
form1.caption=dir1.path
I have also created a sample rough project (Especially for u) to give an example.

Reply if this helped you or if u have a question.But plz do reply.
__________________
Visit now ;)
www.indiandevs.com - for great free designs :)
www.indiandevs.com/technoworld/ for latest technology news and tricks

Last edited by Siddharth Maheshwari; 16-02-2007 at 12:21 PM.
Siddharth Maheshwari is offline  
Old 13-02-2007, 07:44 PM   #10 (permalink)
Right Off the Assembly Line
 
Join Date: Dec 2005
Location: Guwahati
Posts: 36
Default Re: Visual Basic help!

Hi dude! Could you please advise me where I can get a good tutorials for VB6?
Kerry is offline  
Old 15-02-2007, 05:34 PM   #11 (permalink)
"The RaCaLaNGeL"©
 
romeo_8693's Avatar
 
Join Date: Dec 2005
Location: Goa/Pune
Posts: 389
Default Re: Visual Basic help!

thaks a million 4 the efforts sid...dil se...
@kerry:i am a beginner in vb.im learning frm a buk i got frm coll lib.
__________________
Without sorrows happiness would be boring!
romeo_8693 is offline  
Old 15-02-2007, 08:08 PM   #12 (permalink)
In The Zone
 
Join Date: Sep 2006
Posts: 319
Lightbulb Re: Visual Basic help!

Quote:
Originally Posted by romeo_8693
thaks a million 4 the efforts sid...dil se...
@kerry:i am a beginner in vb.im learning frm a buk i got frm coll lib.
I also think myself to be a beginner
and can i know delete that attachement
__________________
Visit now ;)
www.indiandevs.com - for great free designs :)
www.indiandevs.com/technoworld/ for latest technology news and tricks
Siddharth Maheshwari is offline  
Old 15-02-2007, 08:33 PM   #13 (permalink)
In The Zone
 
deepak.krishnan's Avatar
 
Join Date: Jan 2005
Location: Palakkad/Bangalore
Posts: 423
Wink Re: Visual Basic help!

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!!!
__________________
.dk

Last edited by deepak.krishnan; 15-02-2007 at 08:33 PM. Reason: Automerged Doublepost
deepak.krishnan is offline  
Old 16-02-2007, 10:50 AM   #14 (permalink)
"The RaCaLaNGeL"©
 
romeo_8693's Avatar
 
Join Date: Dec 2005
Location: Goa/Pune
Posts: 389
Default Re: Visual Basic help!

@sid
yes u can...
__________________
Without sorrows happiness would be boring!
romeo_8693 is offline  
Old 17-02-2007, 01:14 PM   #15 (permalink)
"The RaCaLaNGeL"©
 
romeo_8693's Avatar
 
Join Date: Dec 2005
Location: Goa/Pune
Posts: 389
Default Re: Visual Basic help!

@sid...
dude that works but not exactly how i want it...the way i want is:if u have winamp then there is a option to add directory to playlist...wen u click it,it opens a dialog box to select a folder(tree view)...i want it this way...
__________________
Without sorrows happiness would be boring!
romeo_8693 is offline  
Old 17-02-2007, 02:06 PM   #16 (permalink)
In The Zone
 
Join Date: Sep 2006
Posts: 319
Default Re: Visual Basic help!

i will tell u that on monday.
Today i have to prepare for the NSO class 9th Level 2exam going to be held tommorow .
Bye
__________________
Visit now ;)
www.indiandevs.com - for great free designs :)
www.indiandevs.com/technoworld/ for latest technology news and tricks
Siddharth Maheshwari is offline  
Old 17-02-2007, 02:43 PM   #17 (permalink)
"The RaCaLaNGeL"©
 
romeo_8693's Avatar
 
Join Date: Dec 2005
Location: Goa/Pune
Posts: 389
Default Re: Visual Basic help!

k...
__________________
Without sorrows happiness would be boring!
romeo_8693 is offline  
Old 17-02-2007, 03:29 PM   #18 (permalink)
Right Off the Assembly Line
 
Join Date: Jan 2007
Posts: 12
Lightbulb Re: Visual Basic help!

Quote:
Originally Posted by romeo_8693
k...
He means to say that he will tell u on monday.He is going to give an exam of class ninth
pchacker is offline  
Old 17-02-2007, 07:55 PM   #19 (permalink)
In The Zone
 
deepak.krishnan's Avatar
 
Join Date: Jan 2005
Location: Palakkad/Bangalore
Posts: 423
Lightbulb Re: Visual Basic help!

Quote:
Originally Posted by romeo_8693
@sid...
dude that works but not exactly how i want it...the way i want is:if u have winamp then there is a option to add directory to playlist...wen u click it,it opens a dialog box to select a folder(tree view)...i want it this way...
Did you try what I said??? Is that what you wanted???
__________________
.dk
deepak.krishnan is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by clinton
- by Charan
- by Krow

Advertisement




All times are GMT +5.5. The time now is 11:54 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2