473,396 Members | 1,917 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,396 software developers and data experts.

Allocate Images which are outside the application folder

14
Hi

How do I allocate the application point to an directory folders which are outside where the application executed?

E.g my application execute at /bin/Debug in VB 2005 folder

I wanted it to point to some external folders to display images, x:/project/images/

Do i use the GetDirectory () or GetFiles () in VB 2k5?

regards
Mar 24 '07 #1
3 1443
kenobewan
4,871 Expert 4TB
Please provide more information. Thanks.
Mar 26 '07 #2
Mulm3h
14
ok

I coded a vb application which has a picturebox showing images which they were located at /bin/debug folder.....

I use the Getcurrentdirectory to get the image from there and display on the picturebox.

everything works fine when i debug it, because of the image locate in the same directory of the application.

However when i use the publish funtion in vb 2k5.... it only pubish the codes and the application in the debug folder, but didnt not include the folder where i stored th image on, therefore the program cannot find those images and return an exception error, saying image not found.

I just wondering is there a way to publish the porgram so that the setup.exe file will also include the image folder
Mar 27 '07 #3
If your directory is a child of the application exe, you can reference the images like this: Note: Separate string vars are declared for clarity.

//C# code:
string strAppPath = Application.StartupPath;
string strImagePath = strAppPath + "/images/";

' VB code
Dim strAppPath As String = Application.StartupPath
Dim strImagePath As String = strAppPath + "/images/";

Good Luck!
Mar 28 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: LarryM | last post by:
Hi, NB, not to stop capturing the single displayed Image, but to stop downloading the entire image directory. (In my Website you will do a search, and get some thumbnails, and these can be...
7
by: Benoit St-Jean | last post by:
I am looking at options/ways to store 12 million gif/jpg images in a database. Either we store a link to the file or we store the image itself in the database. Images will range from 4k to 35k in...
5
by: pmud | last post by:
Hi, On our webserver we have many web projects deployed. Each project has its own folder for Images. Many of the images are common between projects.. I need to create a separate folder in...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
2
by: Oleg | last post by:
I need to configure my web application to see a folder outside it's root. I know I need to configure my web.config file, but don't know how. Can you help?
2
by: gurnandank | last post by:
Hi, I have a web application which uses SSL on one the folders. When I developed application the set up was webroot and under that folder called 'secure'. My ISP has provided a folder called...
8
by: darrel | last post by:
Is there a way to prohibit images from being viewed (linked directly to) unless they are loaded from a page in my application? I'm working on a project where one can create galleries of images....
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
12
by: John Kotuby | last post by:
Hi all, Maybe this is a simple problem found in ASP.NET 2.0 course 101, but I must have missed it. When I create a page in Visual Web Developer and use URLs like "/images/picture.gif " or a link...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.