Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access System.Drawing in QM
#1
Is it possible to use typelib or dispatch in QM2 to access to "System.Drawing" library without the need of using C#?

for example:
Macro Add Bitmap Image
Code:
Copy      Help
#ret
using System;
using System.Drawing;        // for using Bitmap

public class Testing
{
,static public void Main(string[] argc)
,,// ---- Adds a Bitmap to the current page ----
,,...
,,Bitmap bm = new Bitmap(infile);
,,...
}
#2
Not possible. Most classes in System.Drawing.dll aren't COM-visible. You can see it in ILSpy. COM-visible assemblies or classes have attribute [ComVisible(true)].

There are some QM GDI+ classes without .NET:
GDI+
#3
Thanks for the clarification. Your explanation helps me understand more about "COM visible" thing.
I could run it using C# though, just wanted to know if I could use it in a more QM way only.


Forum Jump:


Users browsing this thread: 1 Guest(s)