PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Traduction code VB
Traduction code VB
Débuté par Mas Fabien, 19 avr. 2005 16:22 - 3 réponses
Posté le 19 avril 2005 - 16:22
bonjour, j'ai trouve ces extraits de code ecrit en visual basic,
y a t il un moyen de les traduire pour windev ?


BEPPRINTLib est une reference ajoutee ds vb

Option Explicit
Private WithEvents oPrintJobMonitor As BEPPRINTLib.PrintJobMonitor
------------------------------------------------------------------------
Private sub test()
Dim oPrinter As BEPPRINTLib.Printer
Dim oPrintJob As BEPPRINTLib.PrintJob
Dim nResult As BEPPRINTLib.prnConversionResult

Set oPrinter = CreateObject("easyPdfSdk.Printer")
Set oPrintJob = oPrinter.PrintJob
Set oPrintJobMonitor = oPrinter.PrintJobMonitor
Call oPrintJob.PrintOut(inFileName, outFileName)
Posté le 19 avril 2005 - 16:58
voici une autre formulation du code vb
COM Objects in Visual Basic
BCL COM Objects can be accessed from a variety of programming environments.
This brief example shows how to access a COM Object from Visual Basic.

1.. Create a new project. Click Project -> References, and select the BCL
COM Object:

2.. Create an Object in VB Code:

Dim oPrinter As BEPPRINTLib.Printer
Set oPrinter = CreateObject("EasyPdfSdk.Printer")


3.. Reference COM Method in VB Code:

Dim oPrintJob as BEPPRINTLib.PrintJob
Set oPrinjob = oPrinter.PrintJob
call oPrintJob.PrintOut(inFileName,outFileName)

impossiblde trouver quelque part ce mysterieux "BCL COM Object:" ds windev
....
"Mas Fabien" <fabien@iom.fr> a écrit dans le message de news:
4264ee16$1@news.pcsoft.fr...

bonjour, j'ai trouve ces extraits de code ecrit en visual basic,
y a t il un moyen de les traduire pour windev ?


BEPPRINTLib est une reference ajoutee ds vb

Option Explicit
Private WithEvents oPrintJobMonitor As BEPPRINTLib.PrintJobMonitor
------------------------------------------------------------------------
Private sub test()
Dim oPrinter As BEPPRINTLib.Printer
Dim oPrintJob As BEPPRINTLib.PrintJob
Dim nResult As BEPPRINTLib.prnConversionResult

Set oPrinter = CreateObject("easyPdfSdk.Printer")
Set oPrintJob = oPrinter.PrintJob
Set oPrintJobMonitor = oPrinter.PrintJobMonitor
Call oPrintJob.PrintOut(inFileName, outFileName)

Posté le 20 avril 2005 - 00:32
Pourquoi n'utilises tu pas la commande d'importation d'un projet VB vers WIndev

Menu Windev Fichier /Importation

A par quelques mots tous le projet est importé
Posté le 20 avril 2005 - 21:20
essaye
oPrintJob est un objet "EasyPdfSdk.Printer"
si cela fonctionne :
oPrintJob>>NomLaMethode(parametre)
Toto = oPrintJob>>NomDeLaPropriete


"Mas Fabien" <fabien@iom.fr> a écrit dans le message de
news:4264f663$1@news.pcsoft.fr...

voici une autre formulation du code vb
COM Objects in Visual Basic
BCL COM Objects can be accessed from a variety of programming

environments.
This brief example shows how to access a COM Object from Visual Basic.

1.. Create a new project. Click Project -> References, and select the

BCL
COM Object:

2.. Create an Object in VB Code:

Dim oPrinter As BEPPRINTLib.Printer
Set oPrinter = CreateObject("EasyPdfSdk.Printer")


3.. Reference COM Method in VB Code:

Dim oPrintJob as BEPPRINTLib.PrintJob
Set oPrinjob = oPrinter.PrintJob
call oPrintJob.PrintOut(inFileName,outFileName)

impossiblde trouver quelque part ce mysterieux "BCL COM Object:" ds windev
...
"Mas Fabien" <fabien@iom.fr> a écrit dans le message de news:
4264ee16$1@news.pcsoft.fr...

bonjour, j'ai trouve ces extraits de code ecrit en visual basic,
y a t il un moyen de les traduire pour windev ?


BEPPRINTLib est une reference ajoutee ds vb

Option Explicit
Private WithEvents oPrintJobMonitor As BEPPRINTLib.PrintJobMonitor
------------------------------------------------------------------------
Private sub test()
Dim oPrinter As BEPPRINTLib.Printer
Dim oPrintJob As BEPPRINTLib.PrintJob
Dim nResult As BEPPRINTLib.prnConversionResult

Set oPrinter = CreateObject("easyPdfSdk.Printer")
Set oPrintJob = oPrinter.PrintJob
Set oPrintJobMonitor = oPrinter.PrintJobMonitor
Call oPrintJob.PrintOut(inFileName, outFileName)