Browse the directory system
-
yes. In vb.net we have the same 'FolderBrowserDialog'. you can use it for the folder selection.
Sathesh Pandian
I am not using VB.NET. My application is in plain VB. it is VB 6.0 from Visual Studio 6.0.. I tried to convert it to Visual Studio 2005, but then there were many other issues seen while running the application. Can you please help me with something in VB
-
I am not using VB.NET. My application is in plain VB. it is VB 6.0 from Visual Studio 6.0.. I tried to convert it to Visual Studio 2005, but then there were many other issues seen while running the application. Can you please help me with something in VB
k tell me. what problems you are facing now?
Sathesh Pandian
-
k tell me. what problems you are facing now?
Sathesh Pandian
This is an enhancement to the already existing project. I want to enter a directory path to save some files. I want the user the choose the directory. For this I have introduced the 'Browse' button in the code. But I dont know how the directory structure will be seen on clicking on Browse. I tried just entered this line of code ' Dim theFolderBrowser As New FolderBrowserDialog ' and executed the application. But on clicking on 'Browse' it said the User-defined variable is not supported. How can I have the dirctory structure visible. I am using plain VB
-
This is an enhancement to the already existing project. I want to enter a directory path to save some files. I want the user the choose the directory. For this I have introduced the 'Browse' button in the code. But I dont know how the directory structure will be seen on clicking on Browse. I tried just entered this line of code ' Dim theFolderBrowser As New FolderBrowserDialog ' and executed the application. But on clicking on 'Browse' it said the User-defined variable is not supported. How can I have the dirctory structure visible. I am using plain VB
after that you can try like this... for VS 2005 if theFolderBrowser.showdialog= Windows.Forms.DialogResult.OK Then filename=theFolderBrowser.filename end if For VS 2003 if theFolderBrowser.showdialog= DialogResult.OK Then filename=theFolderBrowser.filename end if
Sathesh Pandian
-
after that you can try like this... for VS 2005 if theFolderBrowser.showdialog= Windows.Forms.DialogResult.OK Then filename=theFolderBrowser.filename end if For VS 2003 if theFolderBrowser.showdialog= DialogResult.OK Then filename=theFolderBrowser.filename end if
Sathesh Pandian
Thanx, I got the thing working
-
Thanx, I got the thing working
if you have any doubts, send your queries to me. i will surely help you.
Sathesh Pandian
-
if you have any doubts, send your queries to me. i will surely help you.
Sathesh Pandian
I had another query When I send the data to the server, the server forms an xml of the data and sends me the url to that xml. Now, I am needed to save this xml into a particular directory(already known). How to I read and save this file ? I am not having a trace of the flow with me, so I dont have an idea how I will get the data in the xml and furthur will save it. Can anyone help me to know how can I read the xml from the url to the xml and how do I save this file into a directory
-
I had another query When I send the data to the server, the server forms an xml of the data and sends me the url to that xml. Now, I am needed to save this xml into a particular directory(already known). How to I read and save this file ? I am not having a trace of the flow with me, so I dont have an idea how I will get the data in the xml and furthur will save it. Can anyone help me to know how can I read the xml from the url to the xml and how do I save this file into a directory
you can try this you know filename that is the url you also know the directory path (savepath) Dim xmlDoc As New XmlDocument xmlDoc.Load(filename) xmldoc.save(Savepath)
Sathesh Pandian
-
you can try this you know filename that is the url you also know the directory path (savepath) Dim xmlDoc As New XmlDocument xmlDoc.Load(filename) xmldoc.save(Savepath)
Sathesh Pandian
for the filename I will have to specify the whole path on the network system right ? I mean the xml will be on the server, so it will be \\ am I correct ?
-
for the filename I will have to specify the whole path on the network system right ? I mean the xml will be on the server, so it will be \\ am I correct ?
is it physical path or virtual path? if it is a valid path you can use tht link in the filename.
Sathesh Pandian
-
is it physical path or virtual path? if it is a valid path you can use tht link in the filename.
Sathesh Pandian
Sorry, What does a physical path or virtual path mean? The server is expected to send something like 'www.server1.com\file.xml' This is just an assumption, as we dont have the server implementation done and so cant get the actual packet trace.
-
Sorry, What does a physical path or virtual path mean? The server is expected to send something like 'www.server1.com\file.xml' This is just an assumption, as we dont have the server implementation done and so cant get the actual packet trace.
ok you can use the load method like this xmldoc.load("www.samples.com\1.xml") no problem with this.
Sathesh Pandian
-
Sorry, What does a physical path or virtual path mean? The server is expected to send something like 'www.server1.com\file.xml' This is just an assumption, as we dont have the server implementation done and so cant get the actual packet trace.
For better understanding, presently the server is responding with an URL pointing to the shopping cart which is then opened in the browser. These urls are in the form like http://www.abc.com/ The application now wants the server to form xmls and send an URL pointing to the XML, back to the client. I dont know how the client will get it back, I think it should be like 'www.server1.com\file.xml' or 'http://www.abc.com/file.xml' Do you have any idea how it will be like. and Also the main point is that I should be able to save that xml file into the directory
-
ok you can use the load method like this xmldoc.load("www.samples.com\1.xml") no problem with this.
Sathesh Pandian
For better understanding, presently the server is responding with an URL pointing to the shopping cart which is then opened in the browser. These urls are in the form like http://www.abc.com/ The application now wants the server to form xmls and send an URL pointing to the XML, back to the client. I dont know how the client will get it back, I think it should be like 'www.server1.com\file.xml' or 'http://www.abc.com/file.xml' Do you have any idea how it will be like. and Also the main point is that I should be able to save that xml file into the directory
-
For better understanding, presently the server is responding with an URL pointing to the shopping cart which is then opened in the browser. These urls are in the form like http://www.abc.com/ The application now wants the server to form xmls and send an URL pointing to the XML, back to the client. I dont know how the client will get it back, I think it should be like 'www.server1.com\file.xml' or 'http://www.abc.com/file.xml' Do you have any idea how it will be like. and Also the main point is that I should be able to save that xml file into the directory
you can try like this only "http:\\www.samples.com\like.xml"
Sathesh Pandian
-
you can try like this only "http:\\www.samples.com\like.xml"
Sathesh Pandian
How do I check if a folder already exists on the system without including any classes? I dont know why the Try-Catch block does not work in my code. It gives compilation error that try is not excepted
-
This is an enhancement to the already existing project. I want to enter a directory path to save some files. I want the user the choose the directory. For this I have introduced the 'Browse' button in the code. But I dont know how the directory structure will be seen on clicking on Browse. I tried just entered this line of code ' Dim theFolderBrowser As New FolderBrowserDialog ' and executed the application. But on clicking on 'Browse' it said the User-defined variable is not supported. How can I have the dirctory structure visible. I am using plain VB
There is no FolderBrowserDialog in VB6. You have to make your own from scratch. It's a bad idea to look at C# or VB.NET code and try to convert it to VB6. There is SO MUCH that the .NET Framework supplies, like the FolderBrowserDialog class, that you have to recreate from scratch that it makes using VB6 nearly impossible because of the time you'll waste reinventing everything you see C# and VB.NET using in the .NET Base Class Library.
Dave Kreskowiak Microsoft MVP - Visual Basic