0

I am trying to create a vbscript that will call a C# form, and then return back to the script. The idea is to use C# as my form creator for my vbscript.

This is how I want the flow to work:

enter image description here

The func1, func2, and func3 will run depending on the input from the C# form.

I am not sure the best way to do this. I was hoping there was a way to make the form a DLL and have a return parameter.

user2970916
  • 1,146
  • 3
  • 15
  • 37
  • 1
    Why do you need to do this? Why not just use c# entirely? – rory.ap Feb 16 '15 at 20:55
  • 1
    What you're trying to do is called interoperability, i.e. the ability for "managed" code (.NET) and "unmanaged" code, -- COM (vbscript) to communicate. It's too big a thing to talk about here on SO. I would suggest you go seek information about it elsewhere. – rory.ap Feb 16 '15 at 20:57
  • 1
    Have a look at this question: [How to call C# DLL function from VBScript](http://stackoverflow.com/questions/769332/how-to-call-c-sharp-dll-function-from-vbscript?rq=1). Add check all the **Related** links provided on the right-hand side of this page. – Wernfried Domscheit Feb 19 '15 at 12:42
  • I did eventually find a question/answer similar to that one. However, I found a way around it by using the Shell() and waiting for a return value from main. – user2970916 Feb 19 '15 at 14:33

0 Answers0