Problem with VB.Net 2003 - Btest4 example
Posted: Wed Jan 17, 2007 11:52 am
Hi David,
I have downloaded the DPlot Jr. I am having trouble getting it too run on VB.NET 2003. The problem is in the following file of the BTest4.vb file.
Private Sub Picture1_Paint(ByVal eventSender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)
Dim hdc As Integer
Dim ret As Integer
Dim g As Graphics = e.Graphics
If hemf <> 0 Then
g.Clear(Color.White)
hdc = g.GetHdc ---------------------------àLine 522
ret = PlayEnhMetaFile(hdc, hemf, rcPic)
g.ReleaseHdc(hdc) ------------------------àLine 524
End If
End Sub
The error returned is
C:\Marcus\DPlot Attempt\BTEST4.VB(522): Value of type 'System.IntPtr' cannot be converted to 'Integer'.
C:\Marcus\DPlot Attempt\BTEST4.VB(524): Value of type 'Integer' cannot be converted to 'System.IntPtr'.
Any ideas on how to fix this?
Regards
Marcus
I have downloaded the DPlot Jr. I am having trouble getting it too run on VB.NET 2003. The problem is in the following file of the BTest4.vb file.
Private Sub Picture1_Paint(ByVal eventSender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)
Dim hdc As Integer
Dim ret As Integer
Dim g As Graphics = e.Graphics
If hemf <> 0 Then
g.Clear(Color.White)
hdc = g.GetHdc ---------------------------àLine 522
ret = PlayEnhMetaFile(hdc, hemf, rcPic)
g.ReleaseHdc(hdc) ------------------------àLine 524
End If
End Sub
The error returned is
C:\Marcus\DPlot Attempt\BTEST4.VB(522): Value of type 'System.IntPtr' cannot be converted to 'Integer'.
C:\Marcus\DPlot Attempt\BTEST4.VB(524): Value of type 'Integer' cannot be converted to 'System.IntPtr'.
Any ideas on how to fix this?
Regards
Marcus