Image Display (1 Viewer)

Emma35

Registered User.
Local time
Today, 09:48
Joined
Sep 18, 2012
Messages
467
Hi Everyone,
I have a command button which i need to open an image. Is there a way i can get the attached image to open and display just the image itself without the black border area ?. I've tried cropping it but makes no difference. The code i'm using in the OnClick event of the command button is below. Btw i can't grab the image and insert it into an image control as this will be from a map....i need it to just pop open and then close when we 'X' out of it
Thanks guys

Code:
ShellToFile "U:\Emma\Images\IMG_1976.png"
 

Attachments

  • IMG_1976.png
    IMG_1976.png
    866.4 KB · Views: 65

Gasman

Enthusiastic Amateur
Local time
Today, 17:48
Joined
Sep 21, 2011
Messages
14,470
Are you talking about the area outside of the picture?
 

Emma35

Registered User.
Local time
Today, 09:48
Joined
Sep 18, 2012
Messages
467
Are you talking about the area outside of the picture?
Yes the black area.......i just want the image on it's own. I think the default viewer is Photos....can i tell Access to open it the way i want it ?
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:48
Joined
Sep 21, 2011
Messages
14,470
Yes the black area.......i just want the image on it's own. I think the default viewer is Photos....can i tell Access to open it the way i want it ?
My thoughts were to enlarge the image, so the canvas is not visible.
I think this site reduces it by default as I expanded this and it fills the whole laptop screen.
1698404968412.png
 

Attachments

  • IMG_1976.jpg
    IMG_1976.jpg
    1.4 MB · Views: 54
Last edited:

Emma35

Registered User.
Local time
Today, 09:48
Joined
Sep 18, 2012
Messages
467
Thanks Gasman....i've been asked to make the image open to about half the screen size so i don't really want to make it bigger. Could i create a separate form to hold the image ?....i could then control the size a bit better. Although i'm not sure how i would get the different images to load in the form as there will be quite a few on the map and i don't fancy making a new form for each one
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:48
Joined
Sep 21, 2011
Messages
14,470
Sorry, I have not played around with pictures much.
I just know you should have the best quality and largest you can.
It is OK to make it smaller, but enlarging it, you lose definition.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:48
Joined
Feb 28, 2001
Messages
27,332
You might be able to do this as a "borderless" image but normally the answer is no because it is still an image in an application window. If you look into some Windows API calls, you might be able to do it.
 

isladogs

MVP / VIP
Local time
Today, 17:48
Joined
Jan 14, 2017
Messages
18,258
Use a borderless form with the image filling the entire form?
 

Emma35

Registered User.
Local time
Today, 09:48
Joined
Sep 18, 2012
Messages
467
You might be able to do this as a "borderless" image but normally the answer is no because it is still an image in an application window. If you look into some Windows API calls, you might be able to do it.
Thanks for the suggestion Doc Man but API calls are miles out of my league :)
 

Emma35

Registered User.
Local time
Today, 09:48
Joined
Sep 18, 2012
Messages
467
I did a bit of investigating and found a way to do this using PowerPoint so not a disaster. Thanks everyone for the suggestions
 

isladogs

MVP / VIP
Local time
Today, 17:48
Joined
Jan 14, 2017
Messages
18,258
This actually works great but it's a lot of work creating a separate form for each image
Why would you need to do so. Just use a single form and change the image path as required
 

isladogs

MVP / VIP
Local time
Today, 17:48
Joined
Jan 14, 2017
Messages
18,258
I insert maps into image controls all the time. Nothing complex about it.
 

moke123

AWF VIP
Local time
Today, 12:48
Joined
Jan 11, 2013
Messages
3,940
I insert maps into image controls all the time. Nothing complex about it.
This thread actually inspired me to take a fresh look at google maps due to the new Edge Browser Control. I stopped using them a few years back due to changes in google maps and the crappy web browser control. I'm currently writing a few classes to handle geocoding, static maps, and embedded maps. I'm really liking the new Edge Browser Control.
 

isladogs

MVP / VIP
Local time
Today, 17:48
Joined
Jan 14, 2017
Messages
18,258
There's a lot of good things about the new Edge browser but also still too many irritating issues.
Part of the latest Access Europe meeting led by John Heaser included maps in the Edge browser control using Open Street Maps and Leaflet.

I'd like to see your class modules when they're done.
 

Emma35

Registered User.
Local time
Today, 09:48
Joined
Sep 18, 2012
Messages
467
Why would you need to do so. Just use a single form and change the image path as required
That would be ideal isladogs but i wouldn't be capable of writing the VBA to male it happen
 

Emma35

Registered User.
Local time
Today, 09:48
Joined
Sep 18, 2012
Messages
467
What are the images? I thought you were talking about maps.
HI moke......i'm working with a map which has a series of locations marked on it (using large red dots). The idea is to click a dot and make an image of the location appear
 

Users who are viewing this thread

Top Bottom