DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with VB.Net 2003 - Btest4 example

 
Post new topic   Reply to topic    DPlot Forum Index -> Excel
View previous topic :: View next topic  
Author Message
marcusmccallum



Joined: 17 Jan 2007
Posts: 1

PostPosted: Wed Jan 17, 2007 11:52 am    Post subject: Problem with VB.Net 2003 - Btest4 example Reply with quote

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
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Thu Jan 18, 2007 1:27 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Excel All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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