Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Image and Fax Viewer (Preview 1.0)

Status
Not open for further replies.

chrisjohns

Technical User
Mar 1, 2009
11
0
0
GB
Hi all, im trying to use thi but it doesnt seem to want to work for me.

I added the control (shimgvw.dll) but when i use the command everyones been suggesting on other posts

Preview1.ShowFile "<file path>", 1

I just get the error of 'Object Required'

The properties in the control (of which i find important) state:

Name - ActiveXCtl79
OLE Class - Preview class
Class - Preview.Preview.1

What am i doing wrong?

Many Thanks
 
I have never used this feature, however, one thing to check is your path.

Is it an absolute path? Is it on the same machine? Is it a mapped drive? Is it on a server?

Do you have proper permissions to access the path?

Sorry I can't provide more help.
 
i was using the path of an image stored in my documents, path shouldnt be an issue but thanks for the notion
 
>everyones been suggesting on other posts

In this forum I think we've only mentioned this once in the last 5 years (well twice, but the second time was a comment to the original post but made in a new thread because the old thread was closed).

I've never got it working properly, frankly, and prefer the Windows Image Aquisition libraries
 
try...
[tt]
Preview1.ShowFile filepathstringvariable, 0
[/tt]

Good Luck

 
Just tried a few more times and to no success, trying to find if theres an OCX to it as shimgvw.dll is the only thing i think is registered. I get the error (when checking in properties)


A problem occured while db1 was communicating with the OLE server or ActiveX control.

Close the OLE server and restart it outside of db1. Then try the original operation again inside db1.


Any thoughts?
 
Not sure what is going on with your program, but as far as displaying an image goes, I was able to display a *.jpg file with no problems.

The steps that I took were to right click on the toolbox, went to components, found the reference to the dll, selected it, and hit ok. Then added the control to the form, used your code with the modification of changing the 1 to a zero, and then used your code with the 1. In both instances the image showed with no problems. So I can only think that the image you are displaying is not supported or the filepath is incorrect in some way.

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top