Extension Modules > COM

ActiveX with VB.NET

(1/2) > >>

Support:
I was curious if Visual BASIC .NET could create controls Dave could use with his Script BASIC COM extension module. From my initial research, it looks like it can.

Create ActiveX in .NET Step by Step

How to generate an OCX activex control using VB.NET

dzzie:
yup should work without a problem, I have used .NET code from VB6 projects through COM before. You just have to set the COM aware attribute to true
and then register the typelib or generate a registry file to include on  distribution.

Support:
That's great news Dave. I'm assuming this holds true for visual COM controls. (ribbon control, ...)

The Date Picker control might be a good first one to try. You already nailed the VB ActiveX version.



I attached the project and the compiled .exe for this.

dzzie:
attached, see readme

Support:
Amazing!




--- Code: ---import com.inc

cs = CreateObject("Sample.Sample")

if cs = 0 then
print "Failed to create the C# com object did you register the dll with regasm and have .NET installed?"
return
end if

d = CallByName(cs, "GetDate")
print "User Selected date: ", d

--- End code ---

C:\SB22\sbcom\sbvb6>scriba cs_date.sb
User Selected date: 6/23/2014
C:\SB22\sbcom\sbvb6>


Q. What does the return do in your example?

Navigation

[0] Message Index

[#] Next page

Go to full version