Refreshed on 2019/11/09
This is an old project... I came into contact with VB6 when I was in elementary school, and wrote many programs one after another. During the summer vacation when I entered junior high school, I seemed to have started this project with the idea of "I am going to learn a new language, and finally write a plug-in for VB6 using VB as a farewell" (it seems like I am in middle school now hhh). However, it is not the "farewell work" I expected, but it has accompanied me throughout the three years of junior high school. From the initial "small plug-in", it has gradually expanded into a huge project. Even now, it may be the largest project I have ever written. It’s a project, right? (laughs)
Microsoft Visual Basic 6.0, an IDE/language that is older than me. When I wrote this program, VB6 had begun to fade out of people's sight, and now, it probably only exists in memory. When I was in my senior year of high school, I realized that I would no longer maintain this project, so I took the time to improve the documentation and released the program and source code on Baidu Tieba VB Bar. Since there are only a few users of VB, it has not attracted much attention, and I am aware of this.
Looking back now, I learned a lot from this project. Even though I was exploring on my own, over the years, even though it was not a systematic study, I still learned a lot of knowledge, such as:
Now this program has stopped maintenance, and I will not provide technical support (I have almost forgotten about it hhh). The program has many bugs, and the coding style is not good. Considering that almost no one uses VB6 now, this Addin itself has no practical value, but if some of the technical points in it can provide you with a reference, then it can be considered to have exerted its value:)
Develop/iCode 开发者指南.docx
is a document I wrote when releasing the source code. Some of the contents are organized as follows.
VB6 add-in program (Addin) is a plug-in that uses the interface provided by VB to enhance the IDE to implement specific functions. The main body of the project is an ActiveX DLL, which calls specific components (Microsoft Add-In Designer, etc.). These components will provide limited interfaces for controlling IDE behavior. Hook, memory modification, etc. are also used in this project. For an overview of the interface and process, see the docx document.
Compilation enhancement tools. Automatically replace EXE file icons and support high-definition icons; automatically insert Manifest files to realize functions such as automatically applying for UAC permissions and universal controls following system themes.
Add a tab bar to the IDE's workspace to facilitate switching between windows.
Collect WIN32 API and GDI+ methods, constants, types, and automatically insert declarations.
Optimized code indentation organization tool with simple code error analysis.
Detailed and comprehensive code statistics tool.
IDE color matching can be customized by modifying the memory, breaking through the monotonous color matching of VB, and comes with program import and export functions.
Improve efficiency.
Relayout the file window controls.
The architecture of iCode has been modified many times. Now, each component project is independent, and the launcher (including Connect) is independent of another project. The launcher project (called A) references the component project (called B). By calling the class module The interface implements the function. The main code is written in B. A mainly provides IDE instances and Hook information.
The advantage of this is that it facilitates transplantation. iCode is composed of many components. If they are all written in one project, it will be confusing and inconvenient for debugging. You know, due to the use of Hooks, etc., iCode often needs to be compiled and then tested. Compiling other unnecessary components will waste a lot of time. Using this architecture, first write a component project + a launcher project. After the test is completed, the real launcher of iCode will reference the component project. Just add a small amount of calling code. If there is a problem with the component, you can also start it through the original debugging.
In addition, some public methods (mainly in iFunction) are kept in sync by using the same code file.
A random picture:
Develop/iCode.chm
Addin User ManualDevelop/iCode 开发者指南.docx
contains more details during development for reference.