View previous topic :: View next topic |
Author |
Message |
marcusmccallum
Joined: 17 Jan 2007 Posts: 1
|
Posted: Wed Jan 17, 2007 11:52 am Post subject: Problem with VB.Net 2003 - Btest4 example |
|
|
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 |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Thu Jan 18, 2007 1:27 am Post subject: |
|
|
I don't have VB.Net 2003, but I'd guess from the error messages that you should change:
Dim hdc As Integer
to
Dim hdc As IntPtr
Please let me know if that doesn't work. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|