UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Opening A Jpeg With Windows Photo Viewer, Any Versions    
 
   
LeeAnn
post May 31 2019, 03:10 PM
Post#1



Posts: 1,271
Joined: 2-February 00
From: Mississippi USA Central Time Zone


I hope I am posting this in the right forum, if not someone can move it if they want. I have a series of links that open up jpg files. They open in Internet Explorer which opens them up but the image is on the left side of the screen and it just looks bad. I want instead to use Windows Photo Viewer instead which opens them image centered. Is there a way in html to tell the link to use that application? I hope I explained that well. Also Chrome and Firefox opens the images fine in the center, why does IE not do that?????

--------------------
Lee Ann Davidson
Go to the top of the page
 
theDBguy
post May 31 2019, 03:15 PM
Post#2


Access Wiki and Forums Moderator
Posts: 75,526
Joined: 19-June 07
From: SunnySandyEggo


Hi. If they are links, then IE (or whichever is your default Internet browser) will take over. Have you tried right-clicking the links and select Open or View image, or something else?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
LeeAnn
post May 31 2019, 03:48 PM
Post#3



Posts: 1,271
Joined: 2-February 00
From: Mississippi USA Central Time Zone


That will not do. I need for it to open like that for everyone. I have an Intranet site that I work with and I would like to have Internet Explorer to get out of the way and use something that knows how to open images nicely (lol). I love how Chrome opens the images up but IE is being the typical piece of software I just love (not really) and opens the pictures in an ugly way. I would like to have the pictures open up in the center of the screen. I know there has to be a better way. If I can get the pictures to open up in Windows Photo Viewer which puts the pictures in the center of the screen nice and pretty. Not sure why IE is like this but it does not surprise me, there are a lot of things I do not like about IE. I had hoped Edge would better but I have tested it with that and nope, the pictures are all left justified.

thumbdn.gif <Rant> I can maybe understand the reasoning behind IE opening up everything that it can, but if you make it open up ugly...... This is one of the many reasons I don't care for IE and don't use it outside work. <End of Rant>


Thanks for the help DBGuy, I hope someone can give me an answer.

--------------------
Lee Ann Davidson
Go to the top of the page
 
DanielPineault
post May 31 2019, 04:43 PM
Post#4


UtterAccess VIP
Posts: 6,653
Joined: 30-June 11



Short answer is no.

Perhaps you could setup a modal window with the layout/formatting as you want it and open links there that way you have some level of control and no matter what browser is used (or is the user's default browser) you guarantee the look/feel. Just a thought.

--------------------
Daniel Pineault (2010-2018 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
theDBguy
post May 31 2019, 05:51 PM
Post#5


Access Wiki and Forums Moderator
Posts: 75,526
Joined: 19-June 07
From: SunnySandyEggo


Okay then, let's back up a bit, you said you have some links you click, where are these links located? On a HTML page?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
jleach
post Jun 2 2019, 07:00 PM
Post#6


UtterAccess Editor
Posts: 10,004
Joined: 7-December 09
From: St Augustine, FL


You can't easily do it from HTML, for security reasons (imagine going to a random webpage that allowed any given link to specify the program and parameters to run on your own computer... that'd be an open door to rampant malware).

It is possible, but probably not feasible. You can specify an application protocol and use the application protocol to run something on the local machine with a special link (e.g., sometimes you can go to a web meeting or some other special type of file/applet, and after you install the applet on your computer and tell your browser it's allowed to run, you can join a web meeting (or whatever) with it: it's the same setup). So, you need a) a custom application on each client machine that will open the desired application via application protocol in the html link. Possible, but not generally feasible.

Another solution (again possible, and still probably not feasible, but perhaps more feasible than an application protocol), is to sync javascript events from the HTML to VBA, then use VBA to ShellExecute the correct application (photo viewer) to the path in question. This is easier than an app protocol, but still a bit of work to set up, requiring a web browser control to load the page, a spot of custom JS to intercept the click event on the link, then a special class in VBA to receive that event (and a registry setting for browser emulation, most likely). If this is an avenue you want to explore, do a search for "Dymeng Browse Embed" and you should find a web page on my site that has a sample of "embedded html/js in VBA", which uses the same event receipt concept (although that demo uses charting, it can be adapted). Admittedly, this demo is not set up wonderfully and has the quality of a proof of concept rather than a "drop and go" piece of work, so some heavy wrenching around may be required.

Another idea is that there may be a setting on the local machines which control the default behavior of IE (or perhaps a registry hack you can try).

All in all though, my main question would be the same as Leo's: where is this image/path/html located? If we know that, we can narrow in on options (maybe we're lucky and it'll be a simple fix!)

Cheers

--------------------
Go to the top of the page
 
jleach
post Jun 2 2019, 07:05 PM
Post#7


UtterAccess Editor
Posts: 10,004
Joined: 7-December 09
From: St Augustine, FL


Just thought too, if this isn't related to Access/VBA in any way and is purely an IE question, maybe you can find an add-on for IE that will do what you're looking for? Might be something that enough people have been irked about that someone went and made one (or something that'll get you similar results, like a chrome-ish viewer, or whatever).

--------------------
Go to the top of the page
 
LeeAnn
post Jun 3 2019, 07:58 AM
Post#8



Posts: 1,271
Joined: 2-February 00
From: Mississippi USA Central Time Zone


The links are located in HTML page. I think I am just going to have to be content with the clunky way IE opens up the jpgs though. It looks so ugly, but there seems to be no easy way to get what I want.

Thanks for all the help, the answers were what I sort of expected I would get.

Thanks again....

--------------------
Lee Ann Davidson
Go to the top of the page
 
GroverParkGeorge
post Jun 3 2019, 08:01 AM
Post#9


UA Admin
Posts: 35,138
Joined: 20-June 02
From: Newcastle, WA


"The links are located in HTML page."

And where do the images open, in the same page, in a new page in the same browser instance?

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
theDBguy
post Jun 3 2019, 08:33 AM
Post#10


Access Wiki and Forums Moderator
Posts: 75,526
Joined: 19-June 07
From: SunnySandyEggo


Hi. Do you have control over this HTML page, meaning, can you modify it?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
LeeAnn
post Jun 3 2019, 10:47 AM
Post#11



Posts: 1,271
Joined: 2-February 00
From: Mississippi USA Central Time Zone


Yes I can modify it.

--------------------
Lee Ann Davidson
Go to the top of the page
 
theDBguy
post Jun 3 2019, 11:54 AM
Post#12


Access Wiki and Forums Moderator
Posts: 75,526
Joined: 19-June 07
From: SunnySandyEggo


Okay, just as a long shot, I tried searching for maybe some sort of JavaScript you can use to execute when the user clicks on the link. But as Jack said, the consensus is this could potentially be dangerous, and the ones I found and tried didn't quite work out. You might try searching for it yourself and maybe you'll get lucky. Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
DanielPineault
post Jun 3 2019, 12:44 PM
Post#13


UtterAccess VIP
Posts: 6,653
Joined: 30-June 11



I still don't get why you wouldn't just employ a modal popup to display it in the manner you would like. You say you like the way Chrome handles it, well, with a modal, you could emulate that or do even better.

Javascript is often blocked for security reason and there is not guarantee (unless this is within an organization and you can control such settings). Even with Javascript, you typically would need to setup the registry, ... which can become tedious to do on all your users PCs.

For the javascript approach you could look over https://github.com/felix-d-git/DesktopAppLink and https://stackoverflow.com/questions/2800081...using-hyperlink

--------------------
Daniel Pineault (2010-2018 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
LeeAnn
post Jun 3 2019, 02:38 PM
Post#14



Posts: 1,271
Joined: 2-February 00
From: Mississippi USA Central Time Zone


I suppose I should have stated that I am pulling the pictures from LiveLink (don't know if any of you are familiar with that). Not sure if a modal would popup would work but it might be something to look into but I do not think I can get a document from LiveLink into something like that. Just irks me that Microsoft does not go for what looks good, just get the functionality to work. Centering graphics on a screen looks so much better....

Thanks again for the help. Again I think I may have to just accept the ugliness of IE and how it opens graphic files.

--------------------
Lee Ann Davidson
Go to the top of the page
 
GroverParkGeorge
post Jun 3 2019, 05:47 PM
Post#15


UA Admin
Posts: 35,138
Joined: 20-June 02
From: Newcastle, WA


I'm not sure this is fair or accurate. "Microsoft does not go for what looks good, just get the functionality to work." A lot of people might argue that the opposite has too often been true. Shiny interfaces over solid performance (think Office ribbon vs menus).

Frankly, if you work much at all with HTML in a browser, you quickly learn that there is almost too much twiddling available. Centering, aligning left, etc., etc., etc. All features of html.

What is happening here is that you are saying the DEFAULT behavior doesn't suit your needs in this case. Okay, but if the DEFAULT is not what you want, perhaps it's a matter of learning how to modify the html accordingly.

"Centering graphics on a screen looks so much better..."

Like many UI considerations, beauty is in the eye of the beholder to a large degree, wouldn't you think? What one person prefers may, or may not be what another person prefers. Again, if this is a crucial feature of your application, which apparently is being developed for that environment using a tool like Visual Studio or other such application, perhaps the key is to master that application's features and functions for the IE environment.

There can be a counter-argument that each browser should not go off on its own in how it handles rendering, but that would eliminate the need for all but one browser....

In the end, I think Daniel's suggested approach makes the most sense. Figure out how to take advantage of your software to get the results you want.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
LeeAnn
post Jun 5 2019, 03:29 PM
Post#16



Posts: 1,271
Joined: 2-February 00
From: Mississippi USA Central Time Zone


Well I looked up and down for a way to get the Livelink link to open using a modal popup but no success. This has frustrated me to no end. I hate saying something cannot be done, but in this instance I am going to throw in the towel for now.

I know I made some bad remarks regarding IE, I get so frustrated when I cannot get something to work the way I would like. I loved the way Chrome opens up the jpegs, it looks better having the pictures centered.

Thanks everyone for the assistance. I actually got to learn quite a bit about a few things.

--------------------
Lee Ann Davidson
Go to the top of the page
 
theDBguy
post Jun 5 2019, 03:35 PM
Post#17


Access Wiki and Forums Moderator
Posts: 75,526
Joined: 19-June 07
From: SunnySandyEggo


Hi LeeAnn. Sorry to hear you didn't find a suitable solution. Did you try using JavaScript?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
DanielPineault
post Jun 5 2019, 06:32 PM
Post#18


UtterAccess VIP
Posts: 6,653
Joined: 30-June 11



LeeAnn,

Take a look at the following little demo I put together for you. I don't know if this will work with live link, but it may be worth a quick try.
Attached File(s)
Attached File  popup_link_demo_.zip ( 65.14K )Number of downloads: 0
 

--------------------
Daniel Pineault (2010-2018 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    18th June 2019 - 04:06 PM