Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Relative File Location


Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2006, 09:02 AM
Tzarkahn Tzarkahn is offline
Newcomer
 
Join Date: Mar 2006
Posts: 8
Default


I have one last question how do i get the picture i want to load without putting in the whole address path I.E

C:\Mydocuments\VB\image1.jpg

so if the file is in the same folder as theproject it will just load

image1.jpg?
Reply With Quote
  #2  
Old 03-09-2006, 10:13 AM
loquin's Avatar
loquin loquin is offline
Google Hound

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Arizona, USA
Posts: 12,386
Default

Tzarkahn - if your follow-up post is an entirely different subject, please post it in a separate (new) thread.


To answer your question, use app.Path. It contains the path of the currently running app.

App.Path & "\image1.Jpg"
__________________
Lou
"I have my standards. They may be low, but I have them!" ~ Bette Middler
"It's a book about a Spanish guy called Manual. You should read it." ~ Dilbert
"To understand recursion, you must first understand recursion." ~ unknown

Last edited by loquin; 03-09-2006 at 10:22 AM.
Reply With Quote
  #3  
Old 03-09-2006, 11:11 AM
Tzarkahn Tzarkahn is offline
Newcomer
 
Join Date: Mar 2006
Posts: 8
Default

Thanks very much for your advice.

And rest assured i will make sure i dont get off topic.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->