Confused about creating dll with Drawing library
Hi,
I have a program (Windows Form Project) which plots some points on a graph and then convert this graph as .bmp file and finally save this .bmp file in user defined path in PC. For sure I need System.Drawing, System.Drawing.2D for performing above functions.
Now I am trying the include same functionality in .dll and integrate this dll in LabWindows(CVI) and TestStand. I am not been able to find a way to do that because:
- If I try to make a new project of "Class Library" type then I can not incude System.Drawing and System.Drawing.2D in it.
Can anyone please provide solution ot the problem? Does any one of you ever tried doing it and could resolve the issue?
Regards
Ricky
Re: Confused about creating dll with Drawing library
There should be no problem doing this (I have created .dll's using the System.Drawing namespace). What you need to do is:
(1) First add a reference to System.Drawing. This tutorial should help (it's for VS, but if you use, say, SharpDevelop, it's approximately the same): http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspx
(2) Add this at the top of any class referencing System.Drawing functions:
Code:
using System.Drawing;
using System.Drawing.Drawing2D;
Does that help?
Re: Confused about creating dll with Drawing library
Thanks BioPhysEgnr. It worked!
I did not even think of doing it.
Re: Confused about creating dll with Drawing library
Great! Yeah, linking in external libraries in a new programming language is always confusing the first time.