473,480 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Loading a picture during run time

1 New Member
How to get a picture file (*.jpg extension) in Image tool box in the form during run time. I used
Image1.Picture = LoadPicture(photoname)

photoname is from table which contains file name (eg. pict.jpg).

But it is not working. Can anybody give some information regarding this. I am using MS-Access 97.

With thanks,
Pratheepa .M
Jun 8 '07 #1
3 12882
ADezii
8,834 Recognized Expert Expert
How to get a picture file (*.jpg extension) in Image tool box in the form during run time. I used
Image1.Picture = LoadPicture(photoname)

photoname is from table which contains file name (eg. pict.jpg).

But it is not working. Can anybody give some information regarding this. I am using MS-Access 97.

With thanks,
Pratheepa .M
To dynamically Load a Picture into an Image Control you must use the Absolute Path to the Image as in:
Expand|Select|Wrap|Line Numbers
  1. Me![Image1].Picture = LoadPicture("C:\Graphics\Inventory\Wrench.jpg")
Jun 8 '07 #2
davidoceans
4 New Member
To dynamically Load a Picture into an Image Control you must use the Absolute Path to the Image as in:
Expand|Select|Wrap|Line Numbers
  1. Me![Image1].Picture = LoadPicture("C:\Graphics\Inventory\Wrench.jpg")

You can also use App.Path

Me![Image1].Picture = LoadPicture(App.Path & "\Inventory\Wrench.jpg")

If there is a folder called Inventory in the same folder as your Application, it will look there for the images

Cheers
D.O.
Jun 17 '07 #3
ADezii
8,834 Recognized Expert Expert
You can also use App.Path

Me![Image1].Picture = LoadPicture(App.Path & "\Inventory\Wrench.jpg")

If there is a folder called Inventory in the same folder as your Application, it will look there for the images

Cheers
D.O.
App.Path will work in Visual Basic not VBA.
Jun 17 '07 #4

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

Similar topics

3
3679
by: GQ | last post by:
We have a Web page that at load time will execute and build: a DHTML Menu/Data Driven, an Iframe with Detail Data, an Iframe to display Progress Information and another iframe with totals...
2
2508
by: Mark Richards | last post by:
An applet on one of my pages uses a big picture as background. I want to load it before the applet and the rest of the html source. By doing this I want to avoid that the pane of the applet is...
4
3723
by: Adrian MacNair | last post by:
Hi, I created an image gallery which displays 63 images in a slideshow. The problem is that the show was slow because each image loaded one at a time during the show. No problem right? I just...
15
2308
by: Geoff Cox | last post by:
Hello I have following type of code in the header function pre_load_pics() { if (document.images) { var image1 = new Image(400,265); image1.scr = "pic1.jpg";
1
1734
by: Amr Moselhy | last post by:
Hi Everyone i m trying to create a crystal report that contains a picture and this picture differs according to certain database information . the name of the picture to be included in the report...
1
3342
by: John Cosmas | last post by:
I've got a page which loads up a different user control into a placeholder control every time a button is clicked on the parent page. I use a statement like...
6
8298
by: snazzy | last post by:
I have a problem where using innerHTML to rewrite a DIV or removeChild to kill a DIV that either of them, if excuted before the page is done loading will stop the page in its tracks. ...
4
12810
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property,...
6
2550
by: Ivan Bútora | last post by:
I have recently looked at http://alistapart.com/articles/imagegallery to implement a simple picture gallery on a webpage that I'm working on. Everything works fine; however, I have one question....
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6743
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
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4787
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.