Hola SesgaSoft.
No recuerdo de donde tome el ejemplo, tiene un problema en
ThisForm.PDF1.Visible = .T.
Espero te sirva.
Saludos
Mauricio Pulla
Cuenca-Ecuador
**************************************************
DEFINE CLASS form1 AS form
DataSession = 2
Top = 0
Left = 0
Height = 419
Width = 613
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
ADD OBJECT grdmatprima AS grid WITH ;
ColumnCount = 3, ;
DeleteMark = .F., ;
Height = 200, ;
Left = 132, ;
Panel = 1, ;
RecordSource = "matprima", ;
RecordSourceType = 1, ;
Top = 96, ;
Visible = .F., ;
Width = 462, ;
Name = "grdMatprima", ;
Column1.ControlSource = "matprima.cmpcod", ;
Column1.Visible = .F., ;
Column1.Name = "Column3", ;
Column2.ControlSource = "matprima.cdescri", ;
Column2.Width = 274, ;
Column2.Visible = .F., ;
Column2.Name = "Column7", ;
Column3.ControlSource = "matprima.ncanact", ;
Column3.Visible = .F., ;
Column3.InputMask = "9,999,999.999", ;
Column3.Name = "Column15"
ADD OBJECT form1.grdmatprima.column3.header1 AS header WITH ;
Caption = "Codigo", ;
Name = "Header1"
ADD OBJECT form1.grdmatprima.column3.text1 AS textbox WITH ;
BorderStyle = 0, ;
Margin = 0, ;
Visible = .F., ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(255,255,255), ;
Name = "Text1"
ADD OBJECT form1.grdmatprima.column7.header1 AS header WITH ;
Caption = "cdescri", ;
Name = "Header1"
ADD OBJECT form1.grdmatprima.column7.text1 AS textbox WITH ;
BorderStyle = 0, ;
Margin = 0, ;
Visible = .F., ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(255,255,255), ;
Name = "Text1"
ADD OBJECT form1.grdmatprima.column15.header1 AS header WITH ;
Caption = "ncanact", ;
Name = "Header1"
ADD OBJECT form1.grdmatprima.column15.text1 AS textbox WITH ;
BorderStyle = 0, ;
Margin = 0, ;
Visible = .F., ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(255,255,255), ;
Name = "Text1"
ADD OBJECT cuadro AS shape WITH ;
Top = 48, ;
Left = 6, ;
Height = 372, ;
Width = 600, ;
SpecialEffect = 0, ;
Name = "Cuadro"
ADD OBJECT cmdmuestra AS commandbutton WITH ;
Top = 7, ;
Left = 6, ;
Height = 37, ;
Width = 37, ;
Picture = "..\..\icoms\ab.ico", ;
Caption = "", ;
Name = "CmdMuestra"
PROCEDURE Init
set procedure to c:\mat_prima\progs\classpdf additive
Thisform.addobject("PDF1","cPDF","PDF.PdfCtrl.5")
WITH Thisform
.PDF1.Top = .Cuadro.Top - 4
.PDF1.Left = .Cuadro.Left - 4
.PDF1.Height = .Cuadro.Height - 4
.PDF1.Width = .Cuadro.Width - 4
.PDF1.Visible = .T.
ENDWITH
ENDPROC
PROCEDURE cmdmuestra.Click
lcFileName = GETFILE('pdf', 'Archivo pdf')
IF !EMPTY(lcFileName)
Thisform.PDF1.LoadFile(lcFileName)
ENDIF
ENDPROC
ENDDEFINE
*
*-- EndDefine: form1
**************************************************
*-*-classpdf.prg
DEFINE CLASS cPDF AS OleControl
Class = "Olecontrol"
OleClass = "PDF.PdfCtrl.5"
ENDDEFINE