by Ralph Barton (5 Submissions)
Category: OLE/COM/DCOM/Active-X
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 3rd April 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Lots of useful tips on 'ActiveX Document Exe'. Sorry this is more a walk though than code. Ref=RB003 (This ref code can be used if you ever
* *.vbd files, have a special refernce code in them, which uses the registery to find out where the main program exe is. This is because, *.vbd files aren't programs, they are just shortcuts.
* The *.vbd files can be moved to any place on the computer, and will still work. But if the exe, is deleted or moved, none of the *.vbd files that use it will work.
* Using 'WebBrowser1.Navigate ("(YourFile).vbd")', you can load them into another exe, like an addin.
* You can then access any public functions or varibles in them using, 'WebBrowser1.Document.(YourFunction)'.
* I don't know the right way to get events from the object, but by using the code 'UserDocument.Parent.Visible = True', in the 'userdocument', you will fire the 'WebBrowser1_OnVisible' event, in the exe that is using it.
* Public data in 'userdocuments' is different for each copy of the *.vbd file being used, therefore programs can't share data in that way, but public data in modules is public to all 'userdocuments', but can't be accessed directly from a 'webbrowser' control.
* Using 'Unload Me' on a 'userdocument' will crash your program.
* 'End', will close the program for every 'webbrowser' control using it. (Not good.).
* When you put your program into a setup exe, to export it, you will have to include all the *.vbd files yourself.
* Using 'UserDocument.Parent.Name', you can find out if the program is being used though a 'webbrowser' control, or 'Internet Explorer'.
* If the user loads your program though a 'webbrowser' control, or 'Internet Explorer', then 'Command$' will be "-Embedding".
* You can't access a 'userdocument' using a form, or module.
* The exe is only unloaded when every form, and *.vbd file using it, is closed.
No comments have been posted about Lots of useful tips on 'ActiveX Document Exe'. Sorry this is more a walk though than code. Ref=RB00. Why not be the first to post a comment about Lots of useful tips on 'ActiveX Document Exe'. Sorry this is more a walk though than code. Ref=RB00.