Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 14th, 2007, 06:34 AM
Registered User
 
Join Date: Nov 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need Help with path for loading Pics (app.path)

Hi.....
M learning VB6....
currently having trouble with loading pics from a folder (flags) onto imgcountry.picture.....
it works fine on my PC but wen i transfer to another PC then it tells that the path can not be found....
so I am using app.path....still i get same error....
here is my code...

Code:
Select Case (Trim(frmathlete.txtcountry.Text))
   Case "samoa"
   frmmenu3.imgcountry.Picture = LoadPicture(App.Path & "\samoa.jpg")
End Select
Anyone any ideas wats wrong....
Thanks in advance!
 
Old November 14th, 2007, 08:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there.. are you sure the file is there???

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old November 15th, 2007, 04:57 AM
Registered User
 
Join Date: Nov 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi gbianchi

Thanks for the response.....

yah the file is there....
I solved it anyways thanks....
da problem was with the path name....

i just specified the img name and not the folder the pics are in...
once i included LoadPicture(App.Path & "\flags\samoa.jpg")....it works like a charm!!!

so cheers!
:D







Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementing the all-path shortest path problem bitwords XSLT 1 December 6th, 2006 11:37 AM
using app.path in database path and filename kd8con VB Databases Basics 2 October 25th, 2006 11:45 AM
Problems with loading external pics into an IFrame nancy Classic ASP Databases 2 April 26th, 2005 10:33 AM
Convert logical path to absolute path zoostar J2EE 1 April 15th, 2005 10:36 AM
DLLs and App.Path Jstmehr4u3 Pro VB 6 1 June 24th, 2003 03:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.