hi
i want to print that chart alone. so that i used the following code.
Clipboard.Clear()
mchart1.EditCopy()
Dim chartcapture As Bitmap
Dim iData As IDataObject
iData=Clipboard.GetDataObject
If iData.GetDataPresent(DataFormats.Bitmap) Then
chartcapture = CType(iData, Bitmap)
End If
e.Graphics.DrawImage(chartcapture, 8, 80)
i just copy the chart into clipboard and then convert it into bitmap and then i printed that bitmap.
This is working in vs.net 2003 but it is not working in vs.net 2005 one fatal error is coming.
The error is
The runtime has encountered a fatal error. The address of the error was at 0x7a005c3d, on thread 0x988. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
What is the problem? can u able to rectify it? please...
i want to print that chart alone. so that i used the following code.
Clipboard.Clear()
mchart1.EditCopy()
Dim chartcapture As Bitmap
Dim iData As IDataObject
iData=Clipboard.GetDataObject
If iData.GetDataPresent(DataFormats.Bitmap) Then
chartcapture = CType(iData, Bitmap)
End If
e.Graphics.DrawImage(chartcapture, 8, 80)
i just copy the chart into clipboard and then convert it into bitmap and then i printed that bitmap.
This is working in vs.net 2003 but it is not working in vs.net 2005 one fatal error is coming.
The error is
The runtime has encountered a fatal error. The address of the error was at 0x7a005c3d, on thread 0x988. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
What is the problem? can u able to rectify it? please...