Sunday, August 2, 2009

In visual basic i developed a programme at current directory,c:\program files\visual basic\VB86 or like that.

i referenced a picture file in programs in a statement


image1.picture=LoadPicture"D:\najeeb" that file exists in D: directory. But when i run program the run time error file not found occur. What is the problem?If there any mistake in file reference? what will happen if i saved the exe application file in some other directory? Please explain the file referencing technique?

In visual basic i developed a programme at current directory,c:\program files\visual basic\VB86 or like that.
Are you using single slashes '\' to represent the directory separator? I'm not sure about visual basic, but many languages use the single slash as an escape for characters that can't be added to a string any other way. Try replacing every slash in the name of the file with two slashes '\\' instead.
Reply:needs to be





image1.picture=LoadPicture("D:\najeeb....





assuming it's a jpg, or whatever the extension really is...


No comments:

Post a Comment