473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

OpenFileDialog Control

Hi Friends,

Can anyone please help me with the OpenFileDialog Contol in VB.Net? I want
the user to be restricted to a particular folder only for selecting a file,
i.e. they should not be able to change the directory in the OpenFileDialog!

Is there a way to implement this? Please let me know.

Thanks,
Paras Wadehra

You One Stop Entertainment Guide - http://www.paras.2ya.com/
Nov 20 '05 #1
1 1503
I believe there is no reasonable way to achieve this with the stock
OpenFileDialog.
However, if you get your hands on the VB Power Pack on GotDotNet, you can roll
your own.
Start here for a nice write up and links:
http://msdn.microsoft.com/vbasic/def...bpowerpack.asp

Look at the FileViewer and FolderViewer controls.
They are not perfect, but still very nice!
And you should be able to achieve what you want very easily with these.

Gerald

"Paras Wadehra" <paraswadehra@Please_Remove_This_Hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi Friends,

Can anyone please help me with the OpenFileDialog Contol in VB.Net? I want
the user to be restricted to a particular folder only for selecting a file,
i.e. they should not be able to change the directory in the OpenFileDialog!

Is there a way to implement this? Please let me know.

Thanks,
Paras Wadehra

You One Stop Entertainment Guide - http://www.paras.2ya.com/

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Lina | last post by:
Hello, I wanted to ask if anyone can help me complete the following code. I found this example while searching through help documnets. What i want to achieve is to open a dialog box that lets...
1
by: Johann Blake | last post by:
A number of posts have indicated developers having problem getting an OpenFileDialog to startup in a specific directory when the dialog is shown. The first time you show the dialog, the...
3
by: cider123 | last post by:
Everything I've read so far states you can't inherit or extend these dialogs because they're "sealed". I considered building my own custom control, but I haven't been able to find: 1) How to...
6
by: barbara_dave | last post by:
Hi, All, I want to use the openfiledialog to open different extension files in different directory( only one type files at one time). I set the OpenFiledialog InitialDirectory and Filter...
3
by: juststarter | last post by:
Hello all, I am using an openFileDialog box to select a file (in order to insert it in a database). When the file is selected i am filling a few textboxes with the actual path, filename and...
5
by: De kessé | last post by:
Im trying to do this from ASP.NET and it does not work. Dim ofd As New OpenFileDialog Openfiledialog is not there. But I can find it in the object browser. In my web config i can see this...
0
by: Gregaz | last post by:
I have a form in my project, which I open as a DialogBox. On that that form there are 3 TextBoxes. To one of them I want to write in a file path. To have it easier I have an OpenFileDialog control...
6
by: Mike | last post by:
Hello all, I'm trying to work with the openfiledialog and being new to vb and vb.net I'm having some problems. Wherever I have Me.OpenFileDialog1 I keep getting the following error: C:\Visual...
1
by: =?Utf-8?B?TW9uaWNh?= | last post by:
Hi 1- I want to pick a file in my website project using asp.net 2- I added System.Windows.Forms by add references to my project. 3- I attach a button to my project. 4- in side...
3
by: Martijn Mulder | last post by:
It strikes me that System.Windows.Forms.OpenFileDialog seems te 'remember' which directory it was in last, even when a new OpenFileDialog-object is created for every access to the file system....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.