PDFs con codigo
Hola que tal, mire me pasaron este código que se supone genera pdf, pero esta en visual y quisiera preguntar si es epuede adactar a VFP6, es que em falta exp en esto de comando si me pudera ayudar estari a muy agradecido.
Private Sub cmdcirculos_Click()
Dim x As Single
Dim xcentro As Single, ycentro As Single
Dim Radio As Single
Dim Salto As Single
Dim Alfa As Integer
Set Pdf = New PdfDoc
Pdf.AddPage (1)
xcentro = Pdf.GetPageWidth / 2
ycentro = Pdf.GetPageHeight / 2
Radio = ycentro * 1.5
Salto = 0.5
Alfa = Pdf.SetAlpha(0.1, 0.1, 2)
Pdf.SetAlphaState Alfa
While Radio > 0
Pdf.SetDrawColor Rnd(255) * 255, Rnd(255) * 255, Rnd(255) * 255
Pdf.DrawCircle xcentro, ycentro, Radio, 0, 0, PDF_STYLE_DRAW, 0
Radio = Radio - Salto
Wend
NombreDocumento = "circulos.pdf"
Pdf.SaveAsFile (NombreDocumento)
MsgBox ("Ok")
End Sub
Private Sub cmdcirculos_Click()
Dim x As Single
Dim xcentro As Single, ycentro As Single
Dim Radio As Single
Dim Salto As Single
Dim Alfa As Integer
Set Pdf = New PdfDoc
Pdf.AddPage (1)
xcentro = Pdf.GetPageWidth / 2
ycentro = Pdf.GetPageHeight / 2
Radio = ycentro * 1.5
Salto = 0.5
Alfa = Pdf.SetAlpha(0.1, 0.1, 2)
Pdf.SetAlphaState Alfa
While Radio > 0
Pdf.SetDrawColor Rnd(255) * 255, Rnd(255) * 255, Rnd(255) * 255
Pdf.DrawCircle xcentro, ycentro, Radio, 0, 0, PDF_STYLE_DRAW, 0
Radio = Radio - Salto
Wend
NombreDocumento = "circulos.pdf"
Pdf.SaveAsFile (NombreDocumento)
MsgBox ("Ok")
End Sub
1 respuesta
Respuesta de Hector Cevallos
1