Extension Modules > COM

Couple Api ideas for embedding

<< < (12/14) > >>

Support:
I wasn't sure what value the VB5CCE version would offer so thanks for clearing that up. Is any of the runtime components of VB5CCE usable for anything? From what I gather I can create a standard VB form, save the it as a project file, load it in standard VB and create a standalone .exe with it. If anything maybe it can be used as an IDE / Debugger of sorts.

dzzie:
all of the things i did in the vb6 demo can be done from the vb5 cce

the user control will be the class, and it will display the form. same mechanisms at play

Support:
So are you saying VB5CCE wasn't a waste of time and can be used in the SB VB COM project?

dzzie:
yup still works fine in vb5cce see attached

Support:
Very Cool!

I had to register the OCX this time. (no dll)




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

function Button1_Click(arg)
print "Back in script basic Button1_Click arg=", arg, "\n"
Button1_Click = arg + 1
end function

obj = CreateObject("VB5.CCESample")

if obj = 0 then
    print "CreateObject failed!\n"
else
    print "obj = ", obj, "\n"
       
    oCollection = CallByName(obj, "CallBackHandlers", VbGet)
    print "oCollection = ", oCollection, "\n"
   
    CallByName(oCollection, "Add", VbMethod, ADDRESS(Button1_Click()), "frmCallBack.cmdOp1_Click" )
   
    retVal = CallByName(obj, "LaunchCallBackForm", vbMethod, 21)
    print "LaunchCallBackForm returned ", retVal, "\n"
   
    ReleaseObject(obj)
    print "test complete!\n"
end if

--- End code ---

C:\SB22\sbcom\sbvb4>scriba VB5_Example.sb
obj = 1400632
oCollection = 1406752
Back in script basic Button1_Click arg=21
LaunchCallBackForm returned 22
test complete!

C:\SB22\sbcom\sbvb4>

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version