From: Michael Cole on
I have a very unusual problem with getting this control to work. Issue is
as follows.

- Start a new project and add a single form.
- Put a single AcroPDF control on the form.
- Run the app in either design mode or by compiling and running the exe - no
problems.
- Save all files and close down VB.
- Now, open up the project in VB again, and then open up the form - get an
error of "Line 13: Cannot load control AcroPDF1.", and the form comes up
with the control not there.
- Note that you can re-add the control and everything works fine again - it
just will not stick.

Appended are the copies of both the VBP and the form for reference - any
suggestions would be welcome, as I am at a loss as to where to go. Note
that this has been duplicated on a second machine.

-- VBP --

Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINDOW
S\System32\stdole2.tlb#OLE Automation
Object={05BFD3F1-6319-4F30-B752-C7A22889BCC4}#1.0#0; AcroPDF.dll
Reference=*\G{5F226421-415D-408D-9A09-0DCD94E25B48}#1.0#0#..\..\..\..\Progra
m Files\Adobe\Acrobat 7.0\ActiveX\AcroIEHelper.dll#AcroIEHelper 1.0 Type
Library
Reference=*\G{05BFD3F1-6319-4F30-B752-C7A22889BCC4}#1.0#0#..\..\..\..\Progra
m Files\Adobe\Acrobat 7.0\ActiveX\AcroPDF.dll#Adobe Acrobat 7.0 Browser
Control Type Library 1.0
Reference=*\G{4F878389-E58A-11D3-BEE9-00C04FA0D6BA}#1.0#0#..\..\..\..\Progra
m Files\Adobe\Acrobat 7.0\ActiveX\GbDetect.dll#GBDetect 1.0 Type Library
Form=Form1.frm
IconForm="Form1"
Startup="Form1"
ExeName32="Project1.exe"
Command32=""
Name="Project1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="Hansen Technologies"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1


-- Form --

VERSION 5.00
Object = "{05BFD3F1-6319-4F30-B752-C7A22889BCC4}#1.0#0"; "AcroPDF.dll"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 6540
ClientLeft = 60
ClientTop = 450
ClientWidth = 7845
LinkTopic = "Form1"
ScaleHeight = 6540
ScaleWidth = 7845
StartUpPosition = 3 'Windows Default
Begin AcroPDFLibCtl.AcroPDF AcroPDF1
Height = 5535
Left = 360
TabIndex = 1
Top = 360
Width = 6975
_cx = 12303
_cy = 9763
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
AcroPDF1.LoadFile "HUB99.pdf"

End Sub

Private Sub Form_Resize()

AcroPDF1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight

End Sub


--
Regards,

Michael Cole


From: Ken Halter on
"Michael Cole" <noone(a)hansen.com> wrote in message
news:%23YNn5HvcFHA.3492(a)TK2MSFTNGP14.phx.gbl...
>I have a very unusual problem with getting this control to work. Issue is
> as follows.
>

I repro'd the problem... strange... anyway, if you click on the Make tab and
turn "Remove info about unused controls" off, you can load it at runtime...
'=============
Option Explicit

Private mobjPDF As AcroPDFLibCtl.AcroPDF

Private Sub Form_Activate()
mobjPDF.Visible = True
End Sub

Private Sub Form_Load()
Set mobjPDF = Controls.Add("AcroPDF.PDF.1", "Test")
Call mobjPDF.LoadFile("C:\Program Files\Adobe\Acrobat
7.0\Help\ENU\Reader.pdf")
End Sub

Private Sub Form_Resize()
With mobjPDF
.Move 0, 0, ScaleWidth, ScaleHeight
End With
End Sub
'=============

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..


From: Jeff Johnson [MVP: VB] on

"Michael Cole" <noone(a)hansen.com> wrote in message
news:%23YNn5HvcFHA.3492(a)TK2MSFTNGP14.phx.gbl...

>I have a very unusual problem with getting this control to work.

Out of curiosity, is this control part of the free Acrobat Reader or do you
need the full-blown Acrobat product to use it?


From: Michael Cole on
Jeff Johnson [MVP: VB] wrote:
> "Michael Cole" <noone(a)hansen.com> wrote in message
> news:%23YNn5HvcFHA.3492(a)TK2MSFTNGP14.phx.gbl...
>
>> I have a very unusual problem with getting this control to work.
>
> Out of curiosity, is this control part of the free Acrobat Reader or
> do you need the full-blown Acrobat product to use it?

I'm assuming that it came with the free Reader product. It was installed
from an installation exe named "AdbeRdr70_enu_full.exe", which someone else
provided, so it looks like the free Reader download.


--
Regards,

Michael Cole


From: Michael Cole on
Ken Halter wrote:
> "Michael Cole" <noone(a)hansen.com> wrote in message
> news:%23YNn5HvcFHA.3492(a)TK2MSFTNGP14.phx.gbl...
>> I have a very unusual problem with getting this control to work.
>> Issue is as follows.
>>
>
> I repro'd the problem... strange... anyway, if you click on the Make
> tab and turn "Remove info about unused controls" off, you can load it
> at runtime...

I have now done that, and it works fine. I'm now thinking that perhaps this
is by intent, given that the control now comes from a dll rather than an ocx
(as it was in v6 and earlier).

I might actually now have a play around, and see if I can write some sort of
generic loader, that can figure out what version of Acrobat is installed (if
any) and then load the appropriate control at runtime.

--
Regards,

Michael Cole