mortalino
Messages postés6786Date d'inscriptionvendredi 16 décembre 2005StatutMembreDernière intervention21 décembre 201118 15 sept. 2006 à 03:09
Salut,
aide toi de ceci :
(je t'ai laissé qques fonctions d'API pouvant te servir en commentaire)
<small> Coloration syntaxique automatique
</small>
Private Const CCHDEVICENAME As Long = 32&
Private Const CCHFORMNAME As Long = 32&
Private Const PD_RETURNDC As Long = &H100
Private Const PD_RETURNIC As Long = &H200
Private Const NULL_PTR As Long = 0&
Private Type DEVMODE
dmDeviceName As String * CCHDEVICENAME
dmSpecVersion As Integer
dmDriverVersion As Integer
dmSize As Integer
dmDriverExtra As Integer
dmFields As Long
dmOrientation As Integer
dmPaperSize As Integer
dmPaperLength As Integer
dmPaperWidth As Integer
dmScale As Integer
dmCopies As Integer
dmDefaultSource As Integer
dmPrintQuality As Integer
dmColor As Integer
dmDuplex As Integer
dmYResolution As Integer
dmTTOption As Integer
dmCollate As Integer
dmFormName As String * CCHFORMNAME
dmUnusedPadding As Integer
dmBitsPerPel As Long
dmPelsWidth As Long
dmPelsHeight As Long
dmDisplayFlags As Long
dmDisplayFrequency As Long
End Type
Private Type DEVNAMES
wDriverOffset As Integer
wDeviceOffset As Integer
wOutputOffset As Integer
wDefault As Integer
End Type
Private Type InformationImprimante
lStructSize As Long
hwndOwner As Long
hDevMode As Long
hDevNames As Long
hdc As Long
flags As Long
nFromPage As Integer
nToPage As Integer
nMinPage As Integer
nMaxPage As Integer
nCopies As Integer
hInstance As Long
lCustData As Long
lpfnPrintHook As Long
lpfnSetupHook As Long
lpPrintTemplateName As String
lpSetupTemplateName As String
hPrintTemplate As Long
hSetupTemplate As Long
End Type
'Private Declare Function PrintDlg Lib "comdlg32.dll" Alias "PrintDlgA" (pPrintdlg As InformationImprimante) As Long
'Private Declare Function GlobalAlloc Lib "Kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
'Private Declare Function GlobalFree Lib "Kernel32" (ByVal hMem As Long) As Long
Private Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As Long
'Private Declare Function CopyMemory Lib "Kernel32" Alias "RtlMoveMemory" (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
Sub Impression2()
Dim imprimanteSelectionne As InformationImprimante
Dim infoDevice As DEVMODE
Dim adresseStructureDEVMODE As Long
On Error GoTo Saut
With imprimanteSelectionne
.lStructSize = Len (imprimanteSelectionne)
.hDevMode = NULL_PTR
.hDevNames = NULL_PTR
.flags = PD_RETURNIC
End With
DraaFil
Messages postés264Date d'inscriptionmercredi 16 avril 2003StatutMembreDernière intervention23 mars 2012 16 sept. 2006 à 03:01
pkoi vbTab ne fonctionne pas chez moi, je vais expliquer ce que je veux faire, j'ai 2 colonne (p-t plus) mais la longeur de valeur varie pour chaque enregistrement. je voudrais que la deuxieme colonne commence a un point precie(une valeur).