开发者

Visual Basic and C++

I was reading a little into Visual Basic and it seemed a rather simple way to implement some GUI...So I was looking for a way to interface my C++ code to a Visual Basic snippet of code. For example, receive input f开发者_StackOverflow社区rom a Visual Basic app and send it over to C++ code to continue the logic of the program based on the input of that event.


If you are talking about VB6 then the normal way is to create COM objects in C++ and use them from VB6, however I think in the long run you would benefit from - presuming Windows/Microsoft is your platform of choice - going over to .NET. You could convert your C++ code to C++/CLI and use VB.NET or better C# as GUI language. (caveat: You may also then come to like C# so much that you write the whole app in C# in the end).


You have some options :

  1. You could create a Visual Basic GUI and create some Dynamic link libraries (DLL) for your C++ code. In order to call the C++ code, you would have to put the necessary measures so that your GUI can communicate with the C++ code.

  2. You can drop the idea of using Visual Basic and use C++ with a cross-platform library such as Qt.

  3. You can drop the idea of using Visual Basic and use C++ with MFC.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜