This is a tool to help document ActiveX components.
You can import the information from the OCX or DLL file, and if you added the description of each member in the IDE, that will be added automatically as a "short description".
With that you could already generate something useful, but the purpose is to document it better by adding a "long description", specially for the properties and methods that might not be intuitive.
Anyway, when generating the final files from the 'Report' menu, it will pick the long description if available or otherwise the short one also if available.
If no descriptions are available at all, the report generated could still have some value, but only to see the structure of Controls/Classes/Properties/Methods/Events and the parameters of each member, but will have no explanation.
The long description allows some markup to reference other members (members are properties, methods and events) or the reference other Controls or Classes, also to reference Enums (not individual constants).
The markup works like this:
[c[ControlName]] refers to a control
[o[ClassName]] refers to a class, also called 'object'
[p[PropertyName]] refers to a property
[m[MethodName]] refers to a method (function or sub)
[e[EventName]] refers to an event
[[EnumName]] refers to an enum
There are some buttons that help to do that automatically.
<b>some text</b> is for bold text.
You can also put html links if you want, by placing the html code for them.
It can output HTML, RTF, PDF (through a PDF printer driver) and plain text.
The HTML pages can be one, one per object (control/class) and one per member (property/method/events). This is set in the menu Reports/Options.
You can also set some custom header/footer/style for the HTML files.
This is a tool to help document ActiveX components.
The markup works like this:
[c[ControlName]] refers to a control
[o[ClassName]] refers to a class, also called 'object'
[p[PropertyName]] refers to a property
[m[MethodName]] refers to a method (function or sub)
[e[EventName]] refers to an event
[[EnumName]] refers to an enum
There are some buttons that help to do that automatically.
<b>some text</b> is for bold text.
You can also put html links if you want, by placing the html code for them.
It can output HTML, RTF, PDF (through a PDF printer driver) and plain text.
The HTML pages can be one, one per object (control/class) and one per member (property/method/events). This is set in the menu Reports/Options.
You can also set some custom header/footer/style for the HTML files.
If you can output JSON format, it would be perfect. Parse the VB6 project, module files bas, cls class files into JSON format, and parse a single function header Fumction sum (byval a as long ,b as long) as long into JSON, and parse each line of code into JSON.
To do this, you can convert VB6 into PYTHON, JAVA code, VC++ code.
I once got part of the code from a tool that used VB6 source code to reverse compile a program (exe, dll, ocx) developed by VB6.
With just a short VB6 code, you can get all the attributes of a DLL, OCX, ENUM, methods, events, each parameter name, and data type.
It is equivalent to a VB6 object viewer.
You have a lot of code and more complete functions. Thank you for your work.
I don't think that JSON makes sense here since the output formats needed are to be read by humans, not to store or to transmit information.
I have considered to output to markdown for making GitHub's *.md help files, but decided that it didn't worth the effort, at least for now.
But if at a point i need it or someone else ask for it, it could be added.
But JSON... i don't see the point. May be if you explain why or what would be the purpose.
In fact, I want to get all the interface, function and other information of a COM DLL or OCX. If this is a class library, provide a function, the input parameter is the DLL file name, and what is returned is all the information of the COM DLL object in JSON format.
Then it is used to make my script tool to handle events, functions, and method calls.
designer windows controls,Code intelligent prompting, COM DLL attribute analysis, so that my simple script tool IDE can be completed. Support any third-party OCX control.
I just recommend. You can also treat it as if you didn't see it. This is just my personal project.
I have another idea.There are many controls, too many property events.We can increase the statistics that have been learned and learned.In this way, if you have learned the use of half of the methods, you will show 50%.
Which other control properties are used by the most people? Which methods are more commonly used?
Listing all the attributes and methods is a normal practice, so it can be made into an independent module.
About how to collate the later data. For example, each method can write its own test project. Or a line of test code.
For example, I especially like to write these English names in Chinese, that is, every attribute method should be translated.
And add the problems encountered in the learning process to be recorded.
Listing all the attributes and methods is a normal practice, so it can be made into an independent module.
About how to collate the later data. For example, each method can write its own test project. Or a line of test code.
That would be some other tool. This one is only to document.
But you could write it. The only thing in common would be the use of TLBINF32.DLL.
Originally Posted by xiaoyao
For example, I especially like to write these English names in Chinese, that is, every attribute method should be translated.
And add the problems encountered in the learning process to be recorded.
I don't think that translating the members and parameters names would be a good idea, since the reader need to learn the names that they will have in the development environment, she/he needs to get familiar with them even when they are in another language.
But I've thought about handling different languages in the program to output the information to different languages, or even automating Google translator to help you to translate from one language to another.
That would be on version 2 or 3, if at any point they come.
Anyway, I think developers need to get used to read technical information in English.
It is time consuming to make documentation in one language, not to say making (and maintaining) it in many.
And other point is that Google translation need to be manually revised, it is not right every time, and... if you don't know the language and cannot hire a human translator to perform the revision... the output won't be as good.
When my friend developed the IDE, he translated a lot of English materials into Chinese, but did not keep the original English text.
If at the beginning, every word is classified accurately, and there are Chinese and English at the same time, it will be no problem to convert to 10 languages.
If the translation is wrong, you only need to modify one line, or ask the user to use the software to translate it.
If my friend create two fields, English and Chinese, then add German and Japanese in the future.
For me, translation is mainly used to quickly learn the use of controls.
Controls have a large number of properties, methods, and many names are not necessarily English words, and some are difficult to remember.
CC.RenderSurfaceContent Cairo.ImageList.AddImage("BG", BgFile, Srf.Width, Srf.Height), 0, 0
It's use for draw background picture on usercontrol
Srf.WriteContentToPngFile PngFile
Used to save SVG images to PNG files
Last edited by xiaoyao; May 7th, 2021 at 06:20 AM.
But JSON... i don't see the point. May be if you explain why or what would be the purpose.
JSON, XML are useful standards to use, they can be picked up by other tools, potentially useful in migration. If you had a tool that could describe all of a forms' controls properties in XML using standard descriptions for x, y position &c then with just a little tweaking a design could be pulled into any forms designer that can read XML.
As far as being human-readable is concerned I have found no problems so far with XML.
JSON seems to be the new way of doing things that is perhaps more suited to the web but following a standard is a good thing to do...in itself.
I think xiaoyiao's need is to allow him to use these and similar functions in his potential new IDE that is likely to use XML or JSON as the object descriptor storage.
In fact, many good tools, if they are packaged into a function to output, the data will be very convenient for programming twice.
For example, some people convert VB6 projects into 64-bit TWINBASIC and the like. He must have written a parsing project code, mainly because he is not willing to share this interface.
Otherwise, the form of VB6 will be parsed clearly. It is not difficult for us to recreate a form with JS or .NET for the JSON configuration.
Just like PHOTOSHOP provides some script editing functions, allowing code loop operations and batch processing pictures according to specified actions.
A tool can only be used, but if various functions are made into module interfaces, controls, and standard DLLs, it can become a USB data cable, which can be used directly by tens of thousands of developers instead of Repeat programming.
like this:
Simply put, it is to pack some more complex functions into the simplest interface for others to use, or for their own use, to improve the code reuse rate.
Maybe this is also modular development. Try yourselves as much as possible, write the same code for others only once, and you can use it directly after writing it, and you donāt need to learn.
Code:
Public Function Script(code As String) As String
Dim obj As Object
Set obj = CreateObject("MSScriptControl.ScriptControl")
obj.AllowUI = True
obj.Language = "JavaScript"
Script = obj.Eval(code)
End Function
JSON, XML are useful standards to use, they can be picked up by other tools, potentially useful in migration. If you had a tool that could describe all of a forms' controls properties in XML using standard descriptions for x, y position &c then with just a little tweaking a design could be pulled into any forms designer that can read XML.
As far as being human-readable is concerned I have found no problems so far with XML.
JSON seems to be the new way of doing things that is perhaps more suited to the web but following a standard is a good thing to do...in itself.
I think xiaoyiao's need is to allow him to use these and similar functions in his potential new IDE that is likely to use XML or JSON as the object descriptor storage.
Yes, the form designer provided in .NET can directly display all properties, but how to save it? How to read is another problem.
But JSON is definitely a universal format that supports various UNICODE languages (it will be automatically encoded and automatically restored when parsed). The amount of data is small, so it is the most suitable.
The XML format takes up too much space and may be easy to read for programming, but it takes a lot of effort to manually view or modify it. The form file form1.frm, similar to VB6, is actually very similar to the JSON format.
For example, windows api:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
How to convert this into JSON format? In this way, only a simple syntax converter can be used to directly generate call codes for DELPHI, VB.NET, C#, JAVA and other languages.
An IDE I am developing, the focus will be to support various new element UI styles, support various third-party controls, web page display, .NET controls can also be added to VB forms, including rc6.dll cario, svg vector Figure.
The webbrowser control can also display svg, animation, and many report controls and 3D controls with amazing effects.
So you need to read out the control properties, how many events, and methods there are all in a programming format. JSON is a good format.
For example, if you want to set the background color, web pages and various reports use different attribute names. With JSON+datasheets, you can use a unified name, which will automatically be set to the original attributes.
It is time consuming to make documentation in one language, not to say making (and maintaining) it in many.
And other point is that Google translation need to be manually revised, it is not right every time, and... if you don't know the language and cannot hire a human translator to perform the revision... the output won't be as good.
My friend has developed a small tool for batch translation. Open the online translation webpage, manually select the two languages to be translated, and then the next step is: paste the text in the left border and copy the text in the right border
Empty again, and then continue to cycle.
(This only requires a webbrowser control, and then learn to use web pages to fill in forms and read)
In fact, this tool can also be turned into a control, or a DLL, wouldnāt it be more convenient to make all the functions into a DLL? In fact, there is not much work added during the design. After being proficient, developing a control and developing an ordinary EXE will not take up more time.
Code:
Set vDoc = WebBrowser1.Document
For i = 0 To vDoc.All.length-1
If UCase(vDoc.All(i).tagName) = "INPUT" Then
Set vTag = vDoc.All(i)
If vTag.Type = "text" Or vTag.Type = "password" Then
Select Case vTag.Name
Case "userid"
vTag.Value = "wangquan"
Case "userps"
vTag.Value = "1282"
End Select
ElseIf vTag.Type = "submit" Then
vTag.Click
End If
End If
Next i
you memu:report to htm,(also can export to JSON TEXT file)
or change you project some code to CLASS FOR Activex dll.
like DllToJson(dll,jsonfile),then list all events,method by that dll
Last edited by xiaoyao; May 7th, 2021 at 06:44 AM.
JSON, XML are useful standards to use, they can be picked up by other tools, potentially useful in migration.
Yes, I have thought about that after considering xiaoyiao's proposal of exporting to JSON.
That could be useful to import the data into a third party reporting tool.
But the point is that the alleged reporting tool would expect the data no only in JSON (or XML), but in some specific way, unless it is very versatile and configurable.
So, if I don't know what the tool expect, I cannot output it in the right expected format. And BTW, they must exist, but I'm not aware of such tools.
Anyway, until a practical real case is presented, someone that don't like how this program outputs the information, and wants to just to use it to generate the data for later export to another reporting tool, we are talking about assumptions, and I won't spend days working on assumptions.
Originally Posted by yereverluvinuncleber
If you had a tool that could describe all of a forms' controls properties in XML using standard descriptions for x, y position &c then with just a little tweaking a design could be pulled into any forms designer that can read XML.
It does not describe forms, it is for components interfaces.
I think you are misunderstanding this program.
Originally Posted by yereverluvinuncleber
As far as being human-readable is concerned I have found no problems so far with XML.
Yes, you can also read pure html files's code if you want. But for "human readable" I was talking about like the format of a manual, or what msdn has on the web (not if you could figure the content).
I am a very creative person
In fact, as long as you manage the usage of most of the mainstream controls in the world, you can start a great company.
All the control manufacturers address, whether they are in update, telephone number, price, if you get a preferential price, you can also be an agent.
The usage of all controls can be made into multiple languages, and then write an example for each attribute to test. Although Microsoft has weakened the concept of OCX and COM DLL, the core of EDGE is also exposed to programming developers using COM objects.
The control class in .NET is actually COM.
Different programming languages cannot do without the cooperation of standard DLL, COM DLL and OCX. In fact, there are many tools that can be installed automatically, run on the command line and return text.
They can be packaged into a unified standard to use.
Including the Chinese driver wizard software, 100M, bought on a new computer, as long as the software is installed with a USB disk, the network card can be automatically recognized, and then automatically go to the website to download various drivers, and then automatically install it.
Many software installations are done in different ways, but they implement most of the automatic click-and-wait installation.
and how to use json object? rc6.dll ,or some vb6 *.bas file can make json so easy
add data to json object like treeview,like dir path.and get all data will be string.
it can be add,delete,update,it's like a simple database.
Last edited by xiaoyao; May 7th, 2021 at 07:01 AM.
What do you want to do with the JSON xiaoyao, concrete?
I could add the JSON export option with some hours work I think, but I still don't see for what.
It could even work in batch mode, where you call the program with two parameters: the path to the input OCX or DLL, and the path to the desired output JSON file.
Of course it won't have any information added, that was the main purpose of this program.
But I don't see the point, other than making generic web pages about components interfaces.
What do you want to do with the JSON xiaoyao, concrete?
I could add the JSON export option with some hours work I think, but I still don't see for what.
It could even work in batch mode, where you call the program with two parameters: the path to the input OCX or DLL, and the path to the desired output JSON file.
Of course it won't have any information added, that was the main purpose of this program.
But I don't see the point, other than making generic web pages about components interfaces.
like i add ocx from vbs, i need khnow ocx have how much method.
I have a special idea, which is to create a form in VBS and add controls, so I need to know every method, property, and event of the control.
Of course, there are many uses, as long as everything is made into a common format, it will always be very convenient.
For example, what should we do when the new crown epidemic comes?
1. Wear a mask
2. Less contact
3. Less gatherings
If the United States required strict requirements at the first time, it is estimated that the plague would have ended a year ago.
The world needs strict standards. The data and methods are all like this
Of course I understand, it was a generalisation. Just explaining why xiaoyiao might find such an export useful in general terms.
Such as the development of various controls, compilers, code conversion, tlb generation, GDIPLUS, etc. I will be useful. It is not easy to develop a simple IDE. After all, personal ability is limited, but it is not impossible. It is just that with more code support, it can be developed better. Just like a .NET form designer I posted earlier. In the end, only 20-30 lines of actual code were used (about 60 lines of total code). If the best method is not used, it may take 5000-20000 lines of code.
like this,it's use Append (s="abc", append "ddd",s ="abcddd")
i like chage sub name to "add"
it's not addline,so i need change use:
sub addline(s)
append "ddd"
append vbcrlf
end sub
It also takes a lot of time to learn the process usage inside
If you can output JSON format, it would be perfect. Parse the VB6 project, module files bas, cls class files into JSON format, and parse a single function header Fumction sum (byval a as long ,b as long) as long into JSON, and parse each line of code into JSON.
To do this, you can convert VB6 into PYTHON, JAVA code, VC++ code.
The tool provided by Eduardo is excellent.
I don't know if the new version that Eduardo- provided in #Post24 meets your requirements. If you use RC6, implementing the JSON data format becomes an extremely simple task. Once you've put all the information into RC6.cCollection, you only need one line of code to get the data in JSON format: oCollection.SerializeToJSONString. Here are a few examples:
Code:
Public Sub Test_Json_01()
Dim JSON As RC6.cCollection
Set JSON = New_c.JSONArray
JSON.Add "AAA"
JSON.Add "BBB"
MsgBox JSON.SerializeToJSONString
End Sub
Code:
Public Sub Test_Json_02()
Dim JSON As RC6.cCollection
Set JSON = New_c.JSONObject
JSON.Prop("Key") = "File"
JSON.Prop("Caption") = "&File"
MsgBox JSON.SerializeToJSONString
End Sub
Code:
Public Sub Test_Json_03()
Dim Root As RC6.cCollection: Set Root = New_c.JSONObject
Dim Child As RC6.cCollection: Set Child = New_c.JSONObject
Root.Prop("Key") = "File"
Root.Prop("Caption") = "&File"
Child.Prop("Key") = "New"
Child.Prop("Caption") = "&New Project"
Set Root.Prop("SubMenu") = Child
MsgBox Root.SerializeToJSONString
End Sub
Code:
Public Sub Test_Json_04()
Dim Root As RC6.cCollection
Dim SubMenu As RC6.cCollection
Set Root = New_c.JSONObject
Root.Prop("Key") = "File"
Root.Prop("Caption") = "&File"
Set SubMenu = New_c.JSONArray
SubMenu.Add GetSubMenu("New", "&New Project")
SubMenu.Add GetSubMenu("Open", "&Open Project")
Set Root.Prop("SubMenu") = SubMenu
MsgBox Root.SerializeToJSONString
End Sub
Private Function GetSubMenu(Key As String, Caption As String) As RC6.cCollection
Dim JSON As RC6.cCollection
Set JSON = New_c.JSONObject
JSON.Prop("Key") = Key
JSON.Prop("Caption") = Caption
Set GetSubMenu = JSON
End Function
Code:
Public Sub Test_Json_05()
Dim Root As RC6.cCollection
Dim sSubMenuJSON As String
sSubMenuJSON = "[{'Key':'New','Caption':'&New Project'},{'Key':'Open','Caption':'&Open Project'}]"
sSubMenuJSON = VBA.Replace(sSubMenuJSON, "'", Chr(34))
Set Root = New_c.JSONObject
Root.Prop("Key") = "File"
Root.Prop("Caption") = "&File"
Set Root.Prop("SubMenu") = New_c.JSONDecodeToCollection(sSubMenuJSON)
MsgBox Root.SerializeToJSONString
End Sub
Why do I want to output com DLL properties, methods, events, and parameters using a common interface. To put it bluntly, I don't know how to use tlbinfo. DLL, so if you are good at it, just output the result to JSON format, and I can read it.
It is how to write the call of the tlbinfo. DLL into a module with the least code.
Like how to use minimal code? 500 lines. Implements an object type library facility.listview left+listview right+ The following text box displays the parameter and the type
Microsoft has done a better job, but we don't have the source code.
It's a very creative and useful tool. I like it. I like the treeview.
Can it extend to export CHM format so that Windows can open it and maintain the treeview display structure?
Or, can you make a shareware CHM editor?
As it happens, I need to document an ActiveX component which has many properties, methods, and events. I downloaded and right away ran the release version of your documenter, didn't even look at the source code.
This will make this task SO much easier . MUCH appreciated!
That's the idea. You can enter the basic description for each member in the IDE: menu Tools, Procedure attributes. And then compile the OCX with that information that will be displayed also in the object browser and property window. The documenter will take that information automatically as the "short description".
Then, if you want, you can also add a (optional) long description.
If there is a long description for a member, the documenter will use that, if not, then it will use the short description (if available).