Looking for example projects and “how to create” VB6 Active X EXE's

两盒软妹~` 提交于 2020-02-03 10:00:06

问题


I'm learning how to create an VB6 Active X EXE. (I need to add the ability for a number of VB6 apps to "phone home" to a server and I'd like centralize this but don't want to do it with a DLL because I'd like to only need Firewall permission for one program (the "phone home ActiveX EXE).

I've found a few tutorials but I'm looking for a downloadable project to "play around with".


回答1:


A tutorial and a project: the VB6 documentation has a good tutorial Creating an ActiveX EXE Component.

A more detailed version of the project is available in the samples that come with VB6. I can't find it available for download - have a look in your VB6 install directory or on the CD.

Dan Appleman's excellent book Developing COM/ActiveX components with Visual Basic 6 has good in-depth coverage of ActiveX exes. You can usually pick it up second hand very cheaply.




回答2:


This one worked well: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=52172&lngWId=1

This one technicall worked (as an ActiveX EXE) but couldn't get it to actually do the work the ActiveX EXE was supposed to do (download files) : http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=28667&lngWId=1

Tip to allow you to debug both the Host and Server (ActiveX EXE) in VB6:

  1. You'll have two VBP project files: one for the ActiveX EXE "server" and one for the host app calling it.
  2. Load each into separate VB6 IDE instances.
  3. Run the ActiveX one first.
  4. In the second one, add the ActiveX VBP file (not the .exe) as a reference: (Project > References> Browse... and add the vbp file.



回答3:


check these:

http://www.codeproject.com/KB/COM/CompleteActiveX.aspx

http://msdn.microsoft.com/en-us/library/c6hzbzz6(VS.80).aspx

http://pages.cpsc.ucalgary.ca/~saul/vb_examples/tutorial10/activex01.html



来源:https://stackoverflow.com/questions/2886104/looking-for-example-projects-and-how-to-create-vb6-active-x-exes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!