One of the things about Access I don't like is the quality of the pictures it displays. We use parts diagrams showing all parts of a component exploded and have trouble reading numbers and seeing parts clearly. I have have corrected that by using a high quality application which is registered in the registry as the viewer associated with the extensions. For instance, when I open a file using OpenFile it associates the extension with the application and uses that application to display the file. If I were to call the function with the following:
Call OpenFile("anyfilename.jpg"
it would open the file in Smart Pix Manager or whatever else was registered and display the graphic with a SIGNIFICANTLY better clarity. Another advantage of this technique is that I can also use that application to ZOOM from 25% to 6000%.
Steve King
Public Sub OpenFile(strFile As String)
Dim hWnd As Long
hWnd = GetAccessHandle
Dim lngResult As Long
On Error Resume Next
lngResult = ShellExecute(hWnd, "Open", strFile, 0&, 0&, vbMaximizedFocus)
SendKeys ("^N"
End Sub
Public Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Growth follows a healthy professional curiosity