Private Declare Function GetDC _ Lib "user32" _ ( _ ByVal hwnd As Long _ ) _ As Long Private Declare Function BitBlt _ Lib "gdi32" _ ( _ ByVal hDestDC As Long, _ ByVal x As Long, _ ByVal y As Long, _ ByVal nWidth As Long, _ ByVal nHeight As Long, _ ByVal hSrcDC As Long, _ ByVal xSrc As Long, _ ByVal ySrc As Long, _ ByVal dwRop As Long _ ) _ As Long
Private Sub Command1_Click() Dim hDcChart As Long Me.ScaleMode = 3 'Pixels
'Retrouver le DC du chart hDcChart = GetDC(MSChart1.hwnd) 'Copie l'image BitBlt Picture1.hDC, 0, 0, MSChart1.Width, MSChart1.Height, hDcChart, 0, 0, vbSrcCopy End Sub
Private Declare Function GetDC _
Lib "user32" _
( _
ByVal hwnd As Long _
) _
As Long
Private Declare Function BitBlt _
Lib "gdi32" _
( _
ByVal hDestDC As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal dwRop As Long _
) _
As Long
Private Sub Command1_Click()
Dim hDcChart As Long
Me.ScaleMode = 3 'Pixels
'Retrouver le DC du chart
hDcChart = GetDC(MSChart1.hwnd)
'Copie l'image
BitBlt Picture1.hDC, 0, 0, MSChart1.Width, MSChart1.Height, hDcChart, 0,
0, vbSrcCopy
End Sub
Private Declare Function GetDC _ Lib "user32" _ ( _ ByVal hwnd As Long _ ) _ As Long Private Declare Function BitBlt _ Lib "gdi32" _ ( _ ByVal hDestDC As Long, _ ByVal x As Long, _ ByVal y As Long, _ ByVal nWidth As Long, _ ByVal nHeight As Long, _ ByVal hSrcDC As Long, _ ByVal xSrc As Long, _ ByVal ySrc As Long, _ ByVal dwRop As Long _ ) _ As Long
Private Sub Command1_Click() Dim hDcChart As Long Me.ScaleMode = 3 'Pixels
'Retrouver le DC du chart hDcChart = GetDC(MSChart1.hwnd) 'Copie l'image BitBlt Picture1.hDC, 0, 0, MSChart1.Width, MSChart1.Height, hDcChart, 0, 0, vbSrcCopy End Sub